summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--.travis.yml2
-rw-r--r--Makefile.in4
-rw-r--r--TODO29
-rwxr-xr-xbootstrap729
-rw-r--r--config/arch/alpha.in57
-rw-r--r--config/arch/alpha.in.256
-rw-r--r--config/arch/arm.in99
-rw-r--r--config/arch/arm.in.296
-rw-r--r--config/arch/microblaze.in4
-rw-r--r--config/arch/mips.in41
-rw-r--r--config/arch/mips.in.238
-rw-r--r--config/arch/nios2.in3
-rw-r--r--config/arch/powerpc.in45
-rw-r--r--config/arch/powerpc.in.242
-rw-r--r--config/arch/sh.in65
-rw-r--r--config/arch/sh.in.225
-rw-r--r--config/arch/xtensa.in17
-rw-r--r--config/arch/xtensa.in.233
-rw-r--r--config/binutils.in4
-rw-r--r--config/binutils/binutils.in197
-rw-r--r--config/binutils/binutils.in.282
-rw-r--r--config/cc.in11
-rw-r--r--config/cc/gcc.in520
-rw-r--r--config/cc/gcc.in.2387
-rw-r--r--config/comp_libs.in203
-rw-r--r--config/comp_libs/cloog.in11
-rw-r--r--config/comp_libs/expat.in3
-rw-r--r--config/comp_libs/gettext.in3
-rw-r--r--config/comp_libs/gmp.in7
-rw-r--r--config/comp_libs/isl.in26
-rw-r--r--config/comp_libs/libelf.in3
-rw-r--r--config/comp_libs/libiconv.in3
-rw-r--r--config/comp_libs/mpc.in3
-rw-r--r--config/comp_libs/mpfr.in3
-rw-r--r--config/comp_libs/ncurses.in59
-rw-r--r--config/comp_libs/zlib.in3
-rw-r--r--config/comp_tools.in15
-rw-r--r--config/comp_tools/autoconf.in7
-rw-r--r--config/comp_tools/automake.in6
-rw-r--r--config/comp_tools/libtool.in6
-rw-r--r--config/comp_tools/m4.in5
-rw-r--r--config/comp_tools/make.in10
-rw-r--r--config/companion_libs.in186
-rw-r--r--config/companion_libs/cloog.in51
-rw-r--r--config/companion_libs/expat.in25
-rw-r--r--config/companion_libs/gettext.in25
-rw-r--r--config/companion_libs/gmp.in83
-rw-r--r--config/companion_libs/isl.in92
-rw-r--r--config/companion_libs/libelf.in25
-rw-r--r--config/companion_libs/libiconv.in24
-rw-r--r--config/companion_libs/mpc.in61
-rw-r--r--config/companion_libs/mpfr.in67
-rw-r--r--config/companion_libs/ncurses.in75
-rw-r--r--config/companion_libs/zlib.in19
-rw-r--r--config/companion_tools.in15
-rw-r--r--config/companion_tools/autoconf.in29
-rw-r--r--config/companion_tools/automake.in40
-rw-r--r--config/companion_tools/libtool.in23
-rw-r--r--config/companion_tools/m4.in34
-rw-r--r--config/companion_tools/make.in45
-rw-r--r--config/config.in5
-rw-r--r--config/debug/duma.in22
-rw-r--r--config/debug/gdb.in316
-rw-r--r--config/debug/gdb.in.gdbserver2
-rw-r--r--config/debug/gdb.in.native4
-rw-r--r--config/debug/ltrace.in28
-rw-r--r--config/debug/strace.in97
-rw-r--r--config/global.in4
-rw-r--r--config/global/extract.in45
-rw-r--r--config/kernel.in10
-rw-r--r--config/kernel/linux.in302
-rw-r--r--config/kernel/linux.in.240
-rw-r--r--config/kernel/windows.in2
-rw-r--r--config/libc.in23
-rw-r--r--config/libc/avr-libc.in67
-rw-r--r--config/libc/avr-libc.in.28
-rw-r--r--config/libc/bionic.in94
-rw-r--r--config/libc/glibc.in440
-rw-r--r--config/libc/glibc.in.2245
-rw-r--r--config/libc/mingw-w64.in43
-rw-r--r--config/libc/mingw.in159
-rw-r--r--config/libc/musl.in83
-rw-r--r--config/libc/musl.in.251
-rw-r--r--config/libc/newlib.in305
-rw-r--r--config/libc/newlib.in.2176
-rw-r--r--config/libc/uClibc.in239
-rw-r--r--config/libc/uClibc.in.2110
-rw-r--r--config/target.in69
-rw-r--r--config/toolchain.in24
-rw-r--r--configure.ac2
-rw-r--r--ct-ng.in4
-rw-r--r--kconfig/kconfig.mk1
-rwxr-xr-xmaintainer/addToolVersion.sh238
-rwxr-xr-xmaintainer/gen-kconfig.sh160
-rw-r--r--maintainer/kconfig-choice.template32
-rw-r--r--maintainer/kconfig-menu.template20
-rw-r--r--maintainer/kconfig-versions.template301
-rw-r--r--maintainer/package-versions.template13
-rwxr-xr-xmaintainer/test-packages.sh196
-rw-r--r--packages/GNU.help6
-rw-r--r--packages/Linaro.help4
-rw-r--r--packages/android-ndk/package.desc4
-rw-r--r--packages/android-ndk/r10e/version.desc1
-rw-r--r--packages/android-ndk/r11c/version.desc1
-rw-r--r--packages/android-ndk/r12b/version.desc1
-rw-r--r--packages/android-ndk/r13b/version.desc1
-rw-r--r--packages/android-ndk/r14b/version.desc0
-rw-r--r--packages/android-ndk/r15c/version.desc0
-rw-r--r--packages/autoconf/2.65/version.desc1
-rw-r--r--packages/autoconf/2.69/version.desc0
-rw-r--r--packages/autoconf/package.desc4
-rw-r--r--packages/autoconf/version.desc1
-rw-r--r--packages/automake/1.11.6/version.desc1
-rw-r--r--packages/automake/1.14.1/version.desc1
-rw-r--r--packages/automake/1.15.1/version.desc0
-rw-r--r--packages/automake/package.desc4
-rw-r--r--packages/avr-libc/1.8.1/version.desc0
-rw-r--r--packages/avr-libc/2.0.0/version.desc0
-rw-r--r--packages/avr-libc/package.desc3
-rw-r--r--packages/binutils-linaro/2.23.2-2013.10-4/version.desc2
-rw-r--r--packages/binutils-linaro/2.24.0-2014.11-2/version.desc1
-rw-r--r--packages/binutils-linaro/2.25.0-2015.01-2/version.desc1
-rw-r--r--packages/binutils-linaro/package.desc6
-rw-r--r--packages/binutils/2.23.2/120-sh-conf.patch (renamed from patches/binutils/2.23.2/120-sh-conf.patch)0
-rw-r--r--packages/binutils/2.23.2/300-001_ld_makefile_patch.patch (renamed from patches/binutils/2.23.2/300-001_ld_makefile_patch.patch)0
-rw-r--r--packages/binutils/2.23.2/300-012_check_ldrunpath_length.patch (renamed from patches/binutils/2.23.2/300-012_check_ldrunpath_length.patch)0
-rw-r--r--packages/binutils/2.23.2/310-fix-gold-pthreads-typo.patch (renamed from patches/binutils/2.26/310-fix-gold-pthreads-typo.patch)0
-rw-r--r--packages/binutils/2.23.2/500-sysroot.patch (renamed from patches/binutils/2.26/500-sysroot.patch)0
-rw-r--r--packages/binutils/2.23.2/600-poison-system-directories.patch (renamed from patches/binutils/2.23.2/600-poison-system-directories.patch)0
-rw-r--r--packages/binutils/2.23.2/900-xtensa-trampolines.patch (renamed from patches/binutils/2.24/900-xtensa-trampolines.patch)0
-rw-r--r--packages/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch (renamed from patches/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch)0
-rw-r--r--packages/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch (renamed from patches/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch)0
-rw-r--r--packages/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch (renamed from patches/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch)0
-rw-r--r--packages/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch (renamed from patches/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch)0
-rw-r--r--packages/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch (renamed from patches/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch)0
-rw-r--r--packages/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch (renamed from patches/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch)0
-rw-r--r--packages/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch (renamed from patches/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch)0
-rw-r--r--packages/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch (renamed from patches/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch)0
-rw-r--r--packages/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch (renamed from patches/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch)0
-rw-r--r--packages/binutils/2.23.2/version.desc2
-rw-r--r--packages/binutils/2.24/001-fix-enable-install-libiberty-flag.patch (renamed from patches/binutils/2.24/001-fix-enable-install-libiberty-flag.patch)0
-rw-r--r--packages/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch (renamed from patches/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch)0
-rw-r--r--packages/binutils/2.24/120-sh-conf.patch (renamed from patches/binutils/2.24/120-sh-conf.patch)0
-rw-r--r--packages/binutils/2.24/300-001_ld_makefile_patch.patch (renamed from patches/binutils/2.24/300-001_ld_makefile_patch.patch)0
-rw-r--r--packages/binutils/2.24/300-012_check_ldrunpath_length.patch (renamed from patches/binutils/2.24/300-012_check_ldrunpath_length.patch)0
-rw-r--r--packages/binutils/2.24/310-fix-gold-pthreads-typo.patch (renamed from patches/binutils/2.25.1/310-fix-gold-pthreads-typo.patch)0
-rw-r--r--packages/binutils/2.24/500-sysroot.patch (renamed from patches/binutils/2.25.1/500-sysroot.patch)0
-rw-r--r--packages/binutils/2.24/600-poison-system-directories.patch (renamed from patches/binutils/2.24/600-poison-system-directories.patch)0
-rw-r--r--packages/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch (renamed from patches/binutils/2.28/700-Fix-library-paths-on-PowerPC.patch)0
-rw-r--r--packages/binutils/2.24/900-xtensa-trampolines.patch (renamed from patches/binutils/2.23.2/900-xtensa-trampolines.patch)0
-rw-r--r--packages/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch (renamed from patches/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch)0
-rw-r--r--packages/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch (renamed from patches/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch)0
-rw-r--r--packages/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch (renamed from patches/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch)0
-rw-r--r--packages/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch (renamed from patches/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch)0
-rw-r--r--packages/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch (renamed from patches/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch)0
-rw-r--r--packages/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch (renamed from patches/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch)0
-rw-r--r--packages/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch (renamed from patches/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch)0
-rw-r--r--packages/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch (renamed from patches/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch)0
-rw-r--r--packages/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch (renamed from patches/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch)0
-rw-r--r--packages/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch (renamed from patches/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch)0
-rw-r--r--packages/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch (renamed from patches/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch)0
-rw-r--r--packages/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch (renamed from patches/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch)0
-rw-r--r--packages/binutils/2.24/913-xtensa-add-auto-litpools-option.patch (renamed from patches/binutils/2.24/913-xtensa-add-auto-litpools-option.patch)0
-rw-r--r--packages/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch (renamed from patches/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch)0
-rw-r--r--packages/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch (renamed from patches/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch)0
-rw-r--r--packages/binutils/2.24/version.desc2
-rw-r--r--packages/binutils/2.25.1/120-sh-conf.patch (renamed from patches/binutils/2.28/120-sh-conf.patch)0
-rw-r--r--packages/binutils/2.25.1/300-001_ld_makefile_patch.patch (renamed from patches/binutils/2.28/300-001_ld_makefile_patch.patch)0
-rw-r--r--packages/binutils/2.25.1/300-012_check_ldrunpath_length.patch (renamed from patches/binutils/2.28/300-012_check_ldrunpath_length.patch)0
-rw-r--r--packages/binutils/2.25.1/310-fix-gold-pthreads-typo.patch (renamed from patches/binutils/2.24/310-fix-gold-pthreads-typo.patch)0
-rw-r--r--packages/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch (renamed from patches/binutils/2.26/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch)0
-rw-r--r--packages/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch (renamed from patches/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch)0
-rw-r--r--packages/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch (renamed from patches/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch)0
-rw-r--r--packages/binutils/2.25.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch (renamed from patches/binutils/2.28/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch)0
-rw-r--r--packages/binutils/2.25.1/400-arm-rotate_left-fix.patch (renamed from patches/binutils/2.25.1/400-arm-rotate_left-fix.patch)0
-rw-r--r--packages/binutils/2.25.1/500-sysroot.patch (renamed from patches/binutils/2.24/500-sysroot.patch)0
-rw-r--r--packages/binutils/2.25.1/600-poison-system-directories.patch (renamed from patches/binutils/2.25.1/600-poison-system-directories.patch)0
-rw-r--r--packages/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch (renamed from patches/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch)0
-rw-r--r--packages/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch (renamed from patches/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch)0
-rw-r--r--packages/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch (renamed from patches/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch)0
-rw-r--r--packages/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch (renamed from patches/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch)0
-rw-r--r--packages/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch (renamed from patches/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch)0
-rw-r--r--packages/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch (renamed from patches/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch)0
-rw-r--r--packages/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch (renamed from patches/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch)0
-rw-r--r--packages/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch (renamed from patches/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch)0
-rw-r--r--packages/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch (renamed from patches/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch)0
-rw-r--r--packages/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch (renamed from patches/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch)0
-rw-r--r--packages/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch (renamed from patches/binutils/2.26/914-xtensa-fix-signedness-of-gas-relocations.patch)0
-rw-r--r--packages/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch (renamed from patches/binutils/2.26/915-xtensa-fix-.init-.fini-literals-moving.patch)0
-rw-r--r--packages/binutils/2.25.1/version.desc2
-rw-r--r--packages/binutils/2.26.1/120-sh-conf.patch (renamed from patches/binutils/2.27/120-sh-conf.patch)0
-rw-r--r--packages/binutils/2.26.1/300-001_ld_makefile_patch.patch (renamed from patches/binutils/2.27/300-001_ld_makefile_patch.patch)0
-rw-r--r--packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch (renamed from patches/binutils/2.27/300-012_check_ldrunpath_length.patch)0
-rw-r--r--packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch (renamed from patches/binutils/2.23.2/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 patches/binutils/2.25.1/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 patches/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 patches/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 patches/binutils/2.27/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 patches/binutils/2.23.2/500-sysroot.patch)0
-rw-r--r--packages/binutils/2.26.1/600-poison-system-directories.patch (renamed from patches/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 patches/binutils/2.26/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 patches/binutils/2.25.1/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 patches/binutils/2.25.1/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.27/100-missing-break.patch (renamed from patches/binutils/2.27/100-missing-break.patch)0
-rw-r--r--packages/binutils/2.27/120-sh-conf.patch (renamed from patches/binutils/2.26/120-sh-conf.patch)0
-rw-r--r--packages/binutils/2.27/300-001_ld_makefile_patch.patch (renamed from patches/binutils/2.26/300-001_ld_makefile_patch.patch)0
-rw-r--r--packages/binutils/2.27/300-012_check_ldrunpath_length.patch (renamed from patches/binutils/2.26/300-012_check_ldrunpath_length.patch)0
-rw-r--r--packages/binutils/2.27/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch (renamed from patches/binutils/2.28/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch)0
-rw-r--r--packages/binutils/2.27/330-Dont-link-to-libfl-as-its-unnecessary.patch (renamed from patches/binutils/2.28/330-Dont-link-to-libfl-as-its-unnecessary.patch)0
-rw-r--r--packages/binutils/2.27/340-Darwin-gold-binary-cc-include-string-not-cstring.patch (renamed from patches/binutils/2.27/340-Darwin-gold-binary-cc-include-string-not-cstring.patch)0
-rw-r--r--packages/binutils/2.27/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch (renamed from patches/binutils/2.26/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch)0
-rw-r--r--packages/binutils/2.27/500-sysroot.patch (renamed from patches/binutils/2.28/500-sysroot.patch)0
-rw-r--r--packages/binutils/2.27/600-poison-system-directories.patch (renamed from patches/binutils/2.28/600-poison-system-directories.patch)0
-rw-r--r--packages/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch (renamed from patches/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch)0
-rw-r--r--packages/binutils/2.27/999-xtensa-reverse-shift-count.patch (renamed from patches/binutils/2.27/999-xtensa-reverse-shift-count.patch)0
-rw-r--r--packages/binutils/2.27/version.desc1
-rw-r--r--packages/binutils/2.28.1/120-sh-conf.patch (renamed from patches/binutils/2.25.1/120-sh-conf.patch)0
-rw-r--r--packages/binutils/2.28.1/300-001_ld_makefile_patch.patch (renamed from patches/binutils/2.25.1/300-001_ld_makefile_patch.patch)0
-rw-r--r--packages/binutils/2.28.1/300-012_check_ldrunpath_length.patch (renamed from patches/binutils/2.25.1/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 patches/binutils/2.27/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 patches/binutils/2.27/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 patches/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 patches/binutils/2.25.1/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 patches/binutils/2.27/500-sysroot.patch)0
-rw-r--r--packages/binutils/2.28.1/600-poison-system-directories.patch (renamed from patches/binutils/2.27/600-poison-system-directories.patch)0
-rw-r--r--packages/binutils/2.28.1/version.desc0
-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.desc0
-rw-r--r--packages/binutils/package.desc5
-rw-r--r--packages/cloog/0.18.1/version.desc1
-rw-r--r--packages/cloog/0.18.4/version.desc0
-rw-r--r--packages/cloog/package.desc5
-rw-r--r--packages/duma/2_5_15/100-cross-compile.patch (renamed from patches/duma/2_5_15/100-cross-compile.patch)0
-rw-r--r--packages/duma/2_5_15/110-separate_cpp.patch (renamed from patches/duma/2_5_15/110-separate_cpp.patch)0
-rw-r--r--packages/duma/2_5_15/200-cpp11-new-operator.patch (renamed from patches/duma/2_5_15/200-cpp11-new-operator.patch)0
-rw-r--r--packages/duma/2_5_15/version.desc0
-rw-r--r--packages/duma/package.desc5
-rw-r--r--packages/elf2flt/package.desc2
-rw-r--r--packages/expat/2.1.1/version.desc1
-rw-r--r--packages/expat/2.2.3/version.desc0
-rw-r--r--packages/expat/package.desc5
-rw-r--r--packages/gcc-linaro/4.8-2015.06/001_gcc_bug_62231.patch (renamed from patches/gcc/linaro-4.8-2015.06/001_gcc_bug_62231.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/002_gcc_bug_62231.patch (renamed from patches/gcc/linaro-4.8-2015.06/002_gcc_bug_62231.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/100-uclibc-conf.patch (renamed from patches/gcc/linaro-4.9-2017.01/100-uclibc-conf.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/1000-libtool-leave-framework-alone.patch (renamed from patches/gcc/linaro-4.9-2017.01/1000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/1000-powerpc-link-with-math-lib.patch.conditional (renamed from patches/gcc/linaro-4.8-2015.06/1000-powerpc-link-with-math-lib.patch.conditional)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/111-pr65730.patch (renamed from patches/gcc/linaro-4.8-2015.06/111-pr65730.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/130-pr43538.patch (renamed from patches/gcc/linaro-4.9-2017.01/130-pr43538.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch (renamed from patches/gcc/linaro-4.9-2017.01/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/132-build_gcc-5_with_gcc-6.patch (renamed from patches/gcc/linaro-4.8-2015.06/132-build_gcc-5_with_gcc-6.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/301-missing-execinfo_h.patch (renamed from patches/gcc/linaro-4.9-2017.01/301-missing-execinfo_h.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/305-libmudflap-susv3-legacy.patch (renamed from patches/gcc/linaro-4.8-2015.06/305-libmudflap-susv3-legacy.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from patches/gcc/linaro-4.8-2015.06/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/810-arm-softfloat-libgcc.patch (renamed from patches/gcc/linaro-4.8-2015.06/810-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/830-arm_unbreak_armv4t.patch (renamed from patches/gcc/linaro-4.9-2017.01/830-arm_unbreak_armv4t.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/841-PR57717-E500v2.patch (renamed from patches/gcc/linaro-4.8-2015.06/841-PR57717-E500v2.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/842-PR60155.patch (renamed from patches/gcc/linaro-4.8-2015.06/842-PR60155.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/843-aarch64-vmlaq_lane_s32-typo.patch (renamed from patches/gcc/linaro-4.8-2015.06/843-aarch64-vmlaq_lane_s32-typo.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/850-libstdcxx-uclibc-c99.patch (renamed from patches/gcc/linaro-4.8-2015.06/850-libstdcxx-uclibc-c99.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/851-PR-other-56780.patch (renamed from patches/gcc/linaro-4.8-2015.06/851-PR-other-56780.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/870-xtensa-add-mauto-litpools-option.patch (renamed from patches/gcc/linaro-5.4-2017.05/870-xtensa-add-mauto-litpools-option.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/871-xtensa-reimplement-register-spilling.patch (renamed from patches/gcc/linaro-4.9-2017.01/871-xtensa-reimplement-register-spilling.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch (renamed from patches/gcc/linaro-4.9-2017.01/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/873-xtensa-fix-_Unwind_GetCFA.patch (renamed from patches/gcc/linaro-4.9-2017.01/873-xtensa-fix-_Unwind_GetCFA.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/874-gcc-xtensa-fix-fprintf-format-specifiers.patch (renamed from patches/gcc/linaro-4.8-2015.06/874-gcc-xtensa-fix-fprintf-format-specifiers.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/900-musl-support.patch (renamed from patches/gcc/linaro-4.8-2015.06/900-musl-support.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/950-cygwin64.patch (renamed from patches/gcc/linaro-4.8-2015.06/950-cygwin64.patch)0
-rw-r--r--packages/gcc-linaro/4.8-2015.06/version.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/4.9-2017.01/001-gcc_bug_62231.patch (renamed from patches/gcc/linaro-4.9-2017.01/001-gcc_bug_62231.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/002-gcc_bug_62231.patch (renamed from patches/gcc/linaro-4.9-2017.01/002-gcc_bug_62231.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/100-uclibc-conf.patch (renamed from patches/gcc/linaro-4.8-2015.06/100-uclibc-conf.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/1000-libtool-leave-framework-alone.patch (renamed from patches/gcc/linaro-4.8-2015.06/1000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/1000-powerpc-link-with-math-lib.patch.conditional (renamed from patches/gcc/linaro-4.9-2017.01/1000-powerpc-link-with-math-lib.patch.conditional)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/1100-msp430-string-literals.patch (renamed from patches/gcc/linaro-4.9-2017.01/1100-msp430-string-literals.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/111-pr65730.patch (renamed from patches/gcc/linaro-4.9-2017.01/111-pr65730.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch (renamed from patches/gcc/linaro-4.9-2017.01/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/130-pr43538.patch (renamed from patches/gcc/linaro-4.8-2015.06/130-pr43538.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch (renamed from patches/gcc/linaro-4.8-2015.06/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch (renamed from patches/gcc/linaro-4.9-2017.01/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/301-missing-execinfo_h.patch (renamed from patches/gcc/linaro-4.8-2015.06/301-missing-execinfo_h.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from patches/gcc/linaro-4.9-2017.01/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/810-arm-softfloat-libgcc.patch (renamed from patches/gcc/linaro-6.3-2017.05/810-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/830-arm_unbreak_armv4t.patch (renamed from patches/gcc/linaro-4.8-2015.06/830-arm_unbreak_armv4t.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/840-microblaze-enable-dwarf-eh-support.patch (renamed from patches/gcc/linaro-4.9-2017.01/840-microblaze-enable-dwarf-eh-support.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/850-libstdcxx-uclibc-c99.patch (renamed from patches/gcc/linaro-4.9-2017.01/850-libstdcxx-uclibc-c99.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/860-cilk-wchar.patch (renamed from patches/gcc/linaro-4.9-2017.01/860-cilk-wchar.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/870-xtensa-add-mauto-litpools-option.patch (renamed from patches/gcc/linaro-4.9-2017.01/870-xtensa-add-mauto-litpools-option.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/871-xtensa-reimplement-register-spilling.patch (renamed from patches/gcc/linaro-4.8-2015.06/871-xtensa-reimplement-register-spilling.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch (renamed from patches/gcc/linaro-4.8-2015.06/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/873-xtensa-fix-_Unwind_GetCFA.patch (renamed from patches/gcc/linaro-4.8-2015.06/873-xtensa-fix-_Unwind_GetCFA.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/874-xtensa-add-uclinux-support.patch (renamed from patches/gcc/linaro-4.9-2017.01/874-xtensa-add-uclinux-support.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/875-gcc-xtensa-fix-fprintf-format-specifiers.patch (renamed from patches/gcc/linaro-4.9-2017.01/875-gcc-xtensa-fix-fprintf-format-specifiers.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/880-nios2_legitimize_address.patch (renamed from patches/gcc/linaro-4.9-2017.01/880-nios2_legitimize_address.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/890-fix-m68k-compile.patch (renamed from patches/gcc/linaro-4.9-2017.01/890-fix-m68k-compile.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/891-fix-m68k-uclinux.patch (renamed from patches/gcc/linaro-4.9-2017.01/891-fix-m68k-uclinux.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/930-libgcc-disable-split-stack-nothreads.patch (renamed from patches/gcc/linaro-4.9-2017.01/930-libgcc-disable-split-stack-nothreads.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/940-uclinux-enable-threads.patch (renamed from patches/gcc/linaro-4.9-2017.01/940-uclinux-enable-threads.patch)0
-rw-r--r--packages/gcc-linaro/4.9-2017.01/version.desc0
-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/5.4-2017.05/100-uclibc-conf.patch (renamed from patches/gcc/linaro-6.3-2017.05/100-uclibc-conf.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/1000-libtool-leave-framework-alone.patch (renamed from patches/gcc/linaro-5.4-2017.05/1000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/110-xtensa-implement-trap-pattern.patch (renamed from patches/gcc/linaro-5.4-2017.05/110-xtensa-implement-trap-pattern.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/1100-msp430-string-literals.patch (renamed from patches/gcc/linaro-5.4-2017.05/1100-msp430-string-literals.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch (renamed from patches/gcc/linaro-5.4-2017.05/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/301-missing-execinfo_h.patch (renamed from patches/gcc/linaro-6.3-2017.05/301-missing-execinfo_h.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from patches/gcc/linaro-6.3-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch (renamed from patches/gcc/linaro-6.3-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/810-arm-softfloat-libgcc.patch (renamed from patches/gcc/linaro-5.4-2017.05/810-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/830-arm_unbreak_armv4t.patch (renamed from patches/gcc/linaro-6.3-2017.05/830-arm_unbreak_armv4t.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/840-microblaze-enable-dwarf-eh-support.patch (renamed from patches/gcc/linaro-5.4-2017.05/840-microblaze-enable-dwarf-eh-support.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/850-libstdcxx-uclibc-c99.patch (renamed from patches/gcc/linaro-5.4-2017.05/850-libstdcxx-uclibc-c99.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/860-cilk-wchar.patch (renamed from patches/gcc/linaro-6.3-2017.05/860-cilk-wchar.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/870-xtensa-add-mauto-litpools-option.patch (renamed from patches/gcc/linaro-4.8-2015.06/870-xtensa-add-mauto-litpools-option.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/871-xtensa-reimplement-register-spilling.patch (renamed from patches/gcc/linaro-5.4-2017.05/871-xtensa-reimplement-register-spilling.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch (renamed from patches/gcc/linaro-5.4-2017.05/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/873-xtensa-fix-_Unwind_GetCFA.patch (renamed from patches/gcc/linaro-5.4-2017.05/873-xtensa-fix-_Unwind_GetCFA.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/874-xtensa-add-uclinux-support.patch (renamed from patches/gcc/linaro-5.4-2017.05/874-xtensa-add-uclinux-support.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch (renamed from patches/gcc/linaro-5.4-2017.05/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/876-xtensa-fix-libgcc-build-with-text-section-literals.patch (renamed from patches/gcc/linaro-5.4-2017.05/876-xtensa-fix-libgcc-build-with-text-section-literals.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch (renamed from patches/gcc/linaro-5.4-2017.05/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/878-xtensa-Fix-PR-target-78603.patch (renamed from patches/gcc/linaro-5.4-2017.05/878-xtensa-Fix-PR-target-78603.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/879-gcc-xtensa-fix-fprintf-format-specifiers.patch (renamed from patches/gcc/linaro-5.4-2017.05/879-gcc-xtensa-fix-fprintf-format-specifiers.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/890-fix-m68k-compile.patch (renamed from patches/gcc/linaro-6.3-2017.05/890-fix-m68k-compile.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/891-fix-m68k-uclinux.patch (renamed from patches/gcc/linaro-6.3-2017.05/891-fix-m68k-uclinux.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/892-microblaze-uclibc.patch (renamed from patches/gcc/linaro-5.4-2017.05/892-microblaze-uclibc.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/902-unwind-fix-for-musl.patch (renamed from patches/gcc/linaro-5.4-2017.05/902-unwind-fix-for-musl.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/910-nios2-bad-multilib-default.patch (renamed from patches/gcc/linaro-5.4-2017.05/910-nios2-bad-multilib-default.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/930-libgcc-disable-split-stack-nothreads.patch (renamed from patches/gcc/linaro-6.3-2017.05/930-libgcc-disable-split-stack-nothreads.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/940-uclinux-enable-threads.patch (renamed from patches/gcc/linaro-6.3-2017.05/940-uclinux-enable-threads.patch)0
-rw-r--r--packages/gcc-linaro/5.4-2017.05/version.desc0
-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/100-uclibc-conf.patch (renamed from patches/gcc/linaro-5.4-2017.05/100-uclibc-conf.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/1000-libtool-leave-framework-alone.patch (renamed from patches/gcc/linaro-6.3-2017.05/1000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/301-missing-execinfo_h.patch (renamed from patches/gcc/linaro-5.4-2017.05/301-missing-execinfo_h.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from patches/gcc/linaro-5.4-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch (renamed from patches/gcc/linaro-5.4-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/810-arm-softfloat-libgcc.patch (renamed from patches/gcc/linaro-4.9-2017.01/810-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/830-arm_unbreak_armv4t.patch (renamed from patches/gcc/linaro-5.4-2017.05/830-arm_unbreak_armv4t.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/860-cilk-wchar.patch (renamed from patches/gcc/linaro-5.4-2017.05/860-cilk-wchar.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch (renamed from patches/gcc/linaro-6.3-2017.05/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/871-xtensa-Fix-PR-target-78118.patch (renamed from patches/gcc/linaro-6.3-2017.05/871-xtensa-Fix-PR-target-78118.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/872-xtensa-Fix-PR-target-78603.patch (renamed from patches/gcc/linaro-6.3-2017.05/872-xtensa-Fix-PR-target-78603.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/873-gcc-xtensa-fix-fprintf-format-specifiers.patch (renamed from patches/gcc/linaro-6.3-2017.05/873-gcc-xtensa-fix-fprintf-format-specifiers.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/890-fix-m68k-compile.patch (renamed from patches/gcc/linaro-5.4-2017.05/890-fix-m68k-compile.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/891-fix-m68k-uclinux.patch (renamed from patches/gcc/linaro-5.4-2017.05/891-fix-m68k-uclinux.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/892-libgcc-mkmap-symver-support-skip_underscore.patch (renamed from patches/gcc/linaro-6.3-2017.05/892-libgcc-mkmap-symver-support-skip_underscore.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch (renamed from patches/gcc/linaro-6.3-2017.05/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch (renamed from patches/gcc/linaro-6.3-2017.05/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/895-bfin-define-REENTRANT.patch (renamed from patches/gcc/linaro-6.3-2017.05/895-bfin-define-REENTRANT.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/900-libgfortran-missing-include.patch (renamed from patches/gcc/linaro-6.3-2017.05/900-libgfortran-missing-include.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/910-nios2-bad-multilib-default.patch (renamed from patches/gcc/linaro-6.3-2017.05/910-nios2-bad-multilib-default.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/930-libgcc-disable-split-stack-nothreads.patch (renamed from patches/gcc/linaro-5.4-2017.05/930-libgcc-disable-split-stack-nothreads.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/940-uclinux-enable-threads.patch (renamed from patches/gcc/linaro-5.4-2017.05/940-uclinux-enable-threads.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/951-bionic-ndk.patch (renamed from patches/gcc/linaro-6.3-2017.05/951-bionic-ndk.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/952-bionic-errno.patch (renamed from patches/gcc/linaro-6.3-2017.05/952-bionic-errno.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/970-crystax.patch (renamed from patches/gcc/linaro-6.3-2017.05/970-crystax.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/971-crystax.patch (renamed from patches/gcc/linaro-6.3-2017.05/971-crystax.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/972-crystax.patch (renamed from patches/gcc/linaro-6.3-2017.05/972-crystax.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/973-crystax.patch (renamed from patches/gcc/linaro-6.3-2017.05/973-crystax.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/974-crystax.patch (renamed from patches/gcc/linaro-6.3-2017.05/974-crystax.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/975-crystax.patch (renamed from patches/gcc/linaro-6.3-2017.05/975-crystax.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/976-crystax.patch (renamed from patches/gcc/linaro-6.3-2017.05/976-crystax.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/977-crystax.patch (renamed from patches/gcc/linaro-6.3-2017.05/977-crystax.patch)0
-rw-r--r--packages/gcc-linaro/6.3-2017.05/version.desc0
-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/7.1-2017.05/100-uclibc-conf.patch (renamed from patches/gcc/7.1.0/100-uclibc-conf.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/1000-libtool-leave-framework-alone.patch (renamed from patches/gcc/7.1.0/1000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/111-alpha-bad-eh_frame.patch (renamed from patches/gcc/7.1.0/111-alpha-bad-eh_frame.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from patches/gcc/7.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch (renamed from patches/gcc/7.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/810-arm-softfloat-libgcc.patch (renamed from patches/gcc/7.1.0/810-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/860-cilk-wchar.patch (renamed from patches/gcc/7.1.0/860-cilk-wchar.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/870-gcc-xtensa-fix-fprintf-format-specifiers.patch (renamed from patches/gcc/7.1.0/870-gcc-xtensa-fix-fprintf-format-specifiers.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/891-fix-m68k-uclinux.patch (renamed from patches/gcc/7.1.0/891-fix-m68k-uclinux.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/900-libgfortran-missing-include.patch (renamed from patches/gcc/7.1.0/900-libgfortran-missing-include.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/910-nios2-bad-multilib-default.patch (renamed from patches/gcc/7.1.0/910-nios2-bad-multilib-default.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/930-libgcc-disable-split-stack-nothreads.patch (renamed from patches/gcc/7.1.0/930-libgcc-disable-split-stack-nothreads.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/951-bionic-ndk.patch (renamed from patches/gcc/7.1.0/951-bionic-ndk.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/952-bionic-errno.patch (renamed from patches/gcc/7.1.0/952-bionic-errno.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/970-crystax.patch (renamed from patches/gcc/7.1.0/970-crystax.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/971-crystax.patch (renamed from patches/gcc/7.1.0/971-crystax.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/972-crystax.patch (renamed from patches/gcc/7.1.0/972-crystax.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/973-crystax.patch (renamed from patches/gcc/7.1.0/973-crystax.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/974-crystax.patch (renamed from patches/gcc/7.1.0/974-crystax.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/975-crystax.patch (renamed from patches/gcc/7.1.0/975-crystax.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/976-crystax.patch (renamed from patches/gcc/7.1.0/976-crystax.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/977-crystax.patch (renamed from patches/gcc/7.1.0/977-crystax.patch)0
-rw-r--r--packages/gcc-linaro/7.1-2017.05/version.desc0
-rw-r--r--packages/gcc-linaro/package.desc6
-rw-r--r--packages/gcc/4.8.5/001_gcc_bug_62231.patch (renamed from patches/gcc/4.8.5/001_gcc_bug_62231.patch)0
-rw-r--r--packages/gcc/4.8.5/002_gcc_bug_62231.patch (renamed from patches/gcc/4.8.5/002_gcc_bug_62231.patch)0
-rw-r--r--packages/gcc/4.8.5/100-uclibc-conf.patch (renamed from patches/gcc/4.9.4/100-uclibc-conf.patch)0
-rw-r--r--packages/gcc/4.8.5/1000-libtool-leave-framework-alone.patch (renamed from patches/gcc/4.9.4/1000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional (renamed from patches/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional)0
-rw-r--r--packages/gcc/4.8.5/111-alpha-bad-eh_frame.patch (renamed from patches/gcc/6.3.0/111-alpha-bad-eh_frame.patch)0
-rw-r--r--packages/gcc/4.8.5/111-pr65730.patch (renamed from patches/gcc/4.8.5/111-pr65730.patch)0
-rw-r--r--packages/gcc/4.8.5/130-pr43538.patch (renamed from patches/gcc/4.9.4/130-pr43538.patch)0
-rw-r--r--packages/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch (renamed from patches/gcc/4.9.4/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch)0
-rw-r--r--packages/gcc/4.8.5/132-build_gcc-5_with_gcc-6.patch (renamed from patches/gcc/4.8.5/132-build_gcc-5_with_gcc-6.patch)0
-rw-r--r--packages/gcc/4.8.5/301-missing-execinfo_h.patch (renamed from patches/gcc/4.9.4/301-missing-execinfo_h.patch)0
-rw-r--r--packages/gcc/4.8.5/305-libmudflap-susv3-legacy.patch (renamed from patches/gcc/4.8.5/305-libmudflap-susv3-legacy.patch)0
-rw-r--r--packages/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from patches/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--packages/gcc/4.8.5/810-arm-softfloat-libgcc.patch (renamed from patches/gcc/4.8.5/810-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc/4.8.5/830-arm_unbreak_armv4t.patch (renamed from patches/gcc/4.9.4/830-arm_unbreak_armv4t.patch)0
-rw-r--r--packages/gcc/4.8.5/841-PR57717-E500v2.patch (renamed from patches/gcc/4.8.5/841-PR57717-E500v2.patch)0
-rw-r--r--packages/gcc/4.8.5/842-PR60155.patch (renamed from patches/gcc/4.8.5/842-PR60155.patch)0
-rw-r--r--packages/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch (renamed from patches/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch)0
-rw-r--r--packages/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch (renamed from patches/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch)0
-rw-r--r--packages/gcc/4.8.5/851-PR-other-56780.patch (renamed from patches/gcc/4.8.5/851-PR-other-56780.patch)0
-rw-r--r--packages/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch (renamed from patches/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch)0
-rw-r--r--packages/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch (renamed from patches/gcc/4.9.4/871-xtensa-reimplement-register-spilling.patch)0
-rw-r--r--packages/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch (renamed from patches/gcc/4.9.4/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch)0
-rw-r--r--packages/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch (renamed from patches/gcc/4.9.4/873-xtensa-fix-_Unwind_GetCFA.patch)0
-rw-r--r--packages/gcc/4.8.5/874-gcc-xtensa-fix-fprintf-format-specifiers.patch (renamed from patches/gcc/4.8.5/874-gcc-xtensa-fix-fprintf-format-specifiers.patch)0
-rw-r--r--packages/gcc/4.8.5/875-xtensa-fix-PR-target-82181.patch31
-rw-r--r--packages/gcc/4.8.5/900-musl-support.patch (renamed from patches/gcc/4.8.5/900-musl-support.patch)0
-rw-r--r--packages/gcc/4.8.5/950-cygwin64.patch (renamed from patches/gcc/4.8.5/950-cygwin64.patch)0
-rw-r--r--packages/gcc/4.8.5/version.desc2
-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/001-gcc_bug_62231.patch (renamed from patches/gcc/4.9.4/001-gcc_bug_62231.patch)0
-rw-r--r--packages/gcc/4.9.4/002-gcc_bug_62231.patch (renamed from patches/gcc/4.9.4/002-gcc_bug_62231.patch)0
-rw-r--r--packages/gcc/4.9.4/100-uclibc-conf.patch (renamed from patches/gcc/4.8.5/100-uclibc-conf.patch)0
-rw-r--r--packages/gcc/4.9.4/1000-libtool-leave-framework-alone.patch (renamed from patches/gcc/4.8.5/1000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc/4.9.4/1000-powerpc-link-with-math-lib.patch.conditional (renamed from patches/gcc/4.9.4/1000-powerpc-link-with-math-lib.patch.conditional)0
-rw-r--r--packages/gcc/4.9.4/1100-msp430-string-literals.patch (renamed from patches/gcc/4.9.4/1100-msp430-string-literals.patch)0
-rw-r--r--packages/gcc/4.9.4/111-alpha-bad-eh_frame.patch (renamed from patches/gcc/5.4.0/111-alpha-bad-eh_frame.patch)0
-rw-r--r--packages/gcc/4.9.4/111-pr65730.patch (renamed from patches/gcc/4.9.4/111-pr65730.patch)0
-rw-r--r--packages/gcc/4.9.4/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch (renamed from patches/gcc/4.9.4/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch)0
-rw-r--r--packages/gcc/4.9.4/130-pr43538.patch (renamed from patches/gcc/4.8.5/130-pr43538.patch)0
-rw-r--r--packages/gcc/4.9.4/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch (renamed from patches/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch)0
-rw-r--r--packages/gcc/4.9.4/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch (renamed from patches/gcc/4.9.4/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch)0
-rw-r--r--packages/gcc/4.9.4/301-missing-execinfo_h.patch (renamed from patches/gcc/4.8.5/301-missing-execinfo_h.patch)0
-rw-r--r--packages/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from patches/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--packages/gcc/4.9.4/810-arm-softfloat-libgcc.patch (renamed from patches/gcc/6.3.0/810-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc/4.9.4/830-arm_unbreak_armv4t.patch (renamed from patches/gcc/4.8.5/830-arm_unbreak_armv4t.patch)0
-rw-r--r--packages/gcc/4.9.4/840-microblaze-enable-dwarf-eh-support.patch (renamed from patches/gcc/4.9.4/840-microblaze-enable-dwarf-eh-support.patch)0
-rw-r--r--packages/gcc/4.9.4/850-libstdcxx-uclibc-c99.patch (renamed from patches/gcc/4.9.4/850-libstdcxx-uclibc-c99.patch)0
-rw-r--r--packages/gcc/4.9.4/860-cilk-wchar.patch (renamed from patches/gcc/4.9.4/860-cilk-wchar.patch)0
-rw-r--r--packages/gcc/4.9.4/870-xtensa-add-mauto-litpools-option.patch (renamed from patches/gcc/4.9.4/870-xtensa-add-mauto-litpools-option.patch)0
-rw-r--r--packages/gcc/4.9.4/871-xtensa-reimplement-register-spilling.patch (renamed from patches/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch)0
-rw-r--r--packages/gcc/4.9.4/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch (renamed from patches/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch)0
-rw-r--r--packages/gcc/4.9.4/873-xtensa-fix-_Unwind_GetCFA.patch (renamed from patches/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch)0
-rw-r--r--packages/gcc/4.9.4/874-xtensa-add-uclinux-support.patch (renamed from patches/gcc/4.9.4/874-xtensa-add-uclinux-support.patch)0
-rw-r--r--packages/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch (renamed from patches/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch)0
-rw-r--r--packages/gcc/4.9.4/876-xtensa-fix-PR-target-82181.patch31
-rw-r--r--packages/gcc/4.9.4/880-nios2_legitimize_address.patch (renamed from patches/gcc/4.9.4/880-nios2_legitimize_address.patch)0
-rw-r--r--packages/gcc/4.9.4/890-fix-m68k-compile.patch (renamed from patches/gcc/4.9.4/890-fix-m68k-compile.patch)0
-rw-r--r--packages/gcc/4.9.4/891-fix-m68k-uclinux.patch (renamed from patches/gcc/4.9.4/891-fix-m68k-uclinux.patch)0
-rw-r--r--packages/gcc/4.9.4/900-musl-support.patch (renamed from patches/gcc/4.9.4/900-musl-support.patch)0
-rw-r--r--packages/gcc/4.9.4/901-microblaze-uclibc.patch (renamed from patches/gcc/4.9.4/901-microblaze-uclibc.patch)0
-rw-r--r--packages/gcc/4.9.4/930-libgcc-disable-split-stack-nothreads.patch (renamed from patches/gcc/4.9.4/930-libgcc-disable-split-stack-nothreads.patch)0
-rw-r--r--packages/gcc/4.9.4/940-uclinux-enable-threads.patch (renamed from patches/gcc/4.9.4/940-uclinux-enable-threads.patch)0
-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/100-uclibc-conf.patch (renamed from patches/gcc/6.3.0/100-uclibc-conf.patch)0
-rw-r--r--packages/gcc/5.4.0/1000-libtool-leave-framework-alone.patch (renamed from patches/gcc/5.4.0/1000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch (renamed from patches/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch)0
-rw-r--r--packages/gcc/5.4.0/1100-msp430-string-literals.patch (renamed from patches/gcc/5.4.0/1100-msp430-string-literals.patch)0
-rw-r--r--packages/gcc/5.4.0/111-alpha-bad-eh_frame.patch (renamed from patches/gcc/4.9.4/111-alpha-bad-eh_frame.patch)0
-rw-r--r--packages/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch (renamed from patches/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch)0
-rw-r--r--packages/gcc/5.4.0/301-missing-execinfo_h.patch (renamed from patches/gcc/6.3.0/301-missing-execinfo_h.patch)0
-rw-r--r--packages/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from patches/gcc/6.3.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--packages/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch (renamed from patches/gcc/6.3.0/380-gcc-plugin-POSIX-include-sys-select-h.patch)0
-rw-r--r--packages/gcc/5.4.0/810-arm-softfloat-libgcc.patch (renamed from patches/gcc/5.4.0/810-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc/5.4.0/830-arm_unbreak_armv4t.patch (renamed from patches/gcc/6.3.0/830-arm_unbreak_armv4t.patch)0
-rw-r--r--packages/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch (renamed from patches/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch)0
-rw-r--r--packages/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch (renamed from patches/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch)0
-rw-r--r--packages/gcc/5.4.0/860-cilk-wchar.patch (renamed from patches/gcc/6.3.0/860-cilk-wchar.patch)0
-rw-r--r--packages/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch (renamed from patches/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch)0
-rw-r--r--packages/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch (renamed from patches/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch)0
-rw-r--r--packages/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch (renamed from patches/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch)0
-rw-r--r--packages/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch (renamed from patches/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch)0
-rw-r--r--packages/gcc/5.4.0/874-xtensa-add-uclinux-support.patch (renamed from patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch)0
-rw-r--r--packages/gcc/5.4.0/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch (renamed from patches/gcc/5.4.0/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch)0
-rw-r--r--packages/gcc/5.4.0/876-xtensa-fix-libgcc-build-with-text-section-literals.patch (renamed from patches/gcc/5.4.0/876-xtensa-fix-libgcc-build-with-text-section-literals.patch)0
-rw-r--r--packages/gcc/5.4.0/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch (renamed from patches/gcc/5.4.0/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch)0
-rw-r--r--packages/gcc/5.4.0/878-xtensa-Fix-PR-target-78603.patch (renamed from patches/gcc/5.4.0/878-xtensa-Fix-PR-target-78603.patch)0
-rw-r--r--packages/gcc/5.4.0/879-gcc-xtensa-fix-fprintf-format-specifiers.patch (renamed from patches/gcc/5.4.0/879-gcc-xtensa-fix-fprintf-format-specifiers.patch)0
-rw-r--r--packages/gcc/5.4.0/880-xtensa-fix-PR-target-82181.patch31
-rw-r--r--packages/gcc/5.4.0/890-fix-m68k-compile.patch (renamed from patches/gcc/6.3.0/890-fix-m68k-compile.patch)0
-rw-r--r--packages/gcc/5.4.0/891-fix-m68k-uclinux.patch (renamed from patches/gcc/6.3.0/891-fix-m68k-uclinux.patch)0
-rw-r--r--packages/gcc/5.4.0/892-microblaze-uclibc.patch (renamed from patches/gcc/5.4.0/892-microblaze-uclibc.patch)0
-rw-r--r--packages/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch (renamed from patches/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch)0
-rw-r--r--packages/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch (renamed from patches/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch)0
-rw-r--r--packages/gcc/5.4.0/902-unwind-fix-for-musl.patch (renamed from patches/gcc/5.4.0/902-unwind-fix-for-musl.patch)0
-rw-r--r--packages/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch (renamed from patches/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch)0
-rw-r--r--packages/gcc/5.4.0/904-musl-libc-config.patch (renamed from patches/gcc/5.4.0/904-musl-libc-config.patch)0
-rw-r--r--packages/gcc/5.4.0/905-add-musl-support-to-gcc.patch (renamed from patches/gcc/5.4.0/905-add-musl-support-to-gcc.patch)0
-rw-r--r--packages/gcc/5.4.0/906-mips-musl-support.patch (renamed from patches/gcc/5.4.0/906-mips-musl-support.patch)0
-rw-r--r--packages/gcc/5.4.0/907-x86-musl-support.patch (renamed from patches/gcc/5.4.0/907-x86-musl-support.patch)0
-rw-r--r--packages/gcc/5.4.0/908-arm-musl-support.patch (renamed from patches/gcc/5.4.0/908-arm-musl-support.patch)0
-rw-r--r--packages/gcc/5.4.0/909-aarch64-musl-support.patch (renamed from patches/gcc/5.4.0/909-aarch64-musl-support.patch)0
-rw-r--r--packages/gcc/5.4.0/910-nios2-bad-multilib-default.patch (renamed from patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch)0
-rw-r--r--packages/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch (renamed from patches/gcc/6.3.0/930-libgcc-disable-split-stack-nothreads.patch)0
-rw-r--r--packages/gcc/5.4.0/940-uclinux-enable-threads.patch (renamed from patches/gcc/6.3.0/940-uclinux-enable-threads.patch)0
-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/6.4.0/100-uclibc-conf.patch (renamed from patches/gcc/5.4.0/100-uclibc-conf.patch)0
-rw-r--r--packages/gcc/6.4.0/1000-libtool-leave-framework-alone.patch (renamed from patches/gcc/6.3.0/1000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc/6.4.0/301-missing-execinfo_h.patch (renamed from patches/gcc/5.4.0/301-missing-execinfo_h.patch)0
-rw-r--r--packages/gcc/6.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from patches/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--packages/gcc/6.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch (renamed from patches/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch)0
-rw-r--r--packages/gcc/6.4.0/810-arm-softfloat-libgcc.patch (renamed from patches/gcc/4.9.4/810-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc/6.4.0/830-arm_unbreak_armv4t.patch (renamed from patches/gcc/5.4.0/830-arm_unbreak_armv4t.patch)0
-rw-r--r--packages/gcc/6.4.0/831-ARM-PR-target-70473-Reduce-size-of-Cortex-A8-automat.patch (renamed from patches/gcc/6.3.0/831-ARM-PR-target-70473-Reduce-size-of-Cortex-A8-automat.patch)0
-rw-r--r--packages/gcc/6.4.0/860-cilk-wchar.patch (renamed from patches/gcc/5.4.0/860-cilk-wchar.patch)0
-rw-r--r--packages/gcc/6.4.0/870-xtensa-fix-PR-target-82181.patch31
-rw-r--r--packages/gcc/6.4.0/890-fix-m68k-compile.patch (renamed from patches/gcc/5.4.0/890-fix-m68k-compile.patch)0
-rw-r--r--packages/gcc/6.4.0/891-fix-m68k-uclinux.patch (renamed from patches/gcc/5.4.0/891-fix-m68k-uclinux.patch)0
-rw-r--r--packages/gcc/6.4.0/892-libgcc-mkmap-symver-support-skip_underscore.patch (renamed from patches/gcc/6.3.0/892-libgcc-mkmap-symver-support-skip_underscore.patch)0
-rw-r--r--packages/gcc/6.4.0/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch (renamed from patches/gcc/6.3.0/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch)0
-rw-r--r--packages/gcc/6.4.0/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch (renamed from patches/gcc/6.3.0/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch)0
-rw-r--r--packages/gcc/6.4.0/895-bfin-define-REENTRANT.patch (renamed from patches/gcc/6.3.0/895-bfin-define-REENTRANT.patch)0
-rw-r--r--packages/gcc/6.4.0/900-libgfortran-missing-include.patch (renamed from patches/gcc/6.3.0/900-libgfortran-missing-include.patch)0
-rw-r--r--packages/gcc/6.4.0/910-nios2-bad-multilib-default.patch (renamed from patches/gcc/6.3.0/910-nios2-bad-multilib-default.patch)0
-rw-r--r--packages/gcc/6.4.0/930-libgcc-disable-split-stack-nothreads.patch (renamed from patches/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch)0
-rw-r--r--packages/gcc/6.4.0/940-uclinux-enable-threads.patch (renamed from patches/gcc/5.4.0/940-uclinux-enable-threads.patch)0
-rw-r--r--packages/gcc/6.4.0/951-bionic-ndk.patch (renamed from patches/gcc/6.3.0/951-bionic-ndk.patch)0
-rw-r--r--packages/gcc/6.4.0/952-bionic-errno.patch (renamed from patches/gcc/6.3.0/952-bionic-errno.patch)0
-rw-r--r--packages/gcc/6.4.0/970-crystax.patch (renamed from patches/gcc/6.3.0/970-crystax.patch)0
-rw-r--r--packages/gcc/6.4.0/971-crystax.patch (renamed from patches/gcc/6.3.0/971-crystax.patch)0
-rw-r--r--packages/gcc/6.4.0/972-crystax.patch (renamed from patches/gcc/6.3.0/972-crystax.patch)0
-rw-r--r--packages/gcc/6.4.0/973-crystax.patch (renamed from patches/gcc/6.3.0/973-crystax.patch)0
-rw-r--r--packages/gcc/6.4.0/974-crystax.patch (renamed from patches/gcc/6.3.0/974-crystax.patch)0
-rw-r--r--packages/gcc/6.4.0/975-crystax.patch (renamed from patches/gcc/6.3.0/975-crystax.patch)0
-rw-r--r--packages/gcc/6.4.0/976-crystax.patch (renamed from patches/gcc/6.3.0/976-crystax.patch)0
-rw-r--r--packages/gcc/6.4.0/977-crystax.patch (renamed from patches/gcc/6.3.0/977-crystax.patch)0
-rw-r--r--packages/gcc/6.4.0/version.desc0
-rw-r--r--packages/gcc/7.2.0/100-uclibc-conf.patch15
-rw-r--r--packages/gcc/7.2.0/1000-libtool-leave-framework-alone.patch14
-rw-r--r--packages/gcc/7.2.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch160
-rw-r--r--packages/gcc/7.2.0/380-gcc-plugin-POSIX-include-sys-select-h.patch11
-rw-r--r--packages/gcc/7.2.0/810-arm-softfloat-libgcc.patch30
-rw-r--r--packages/gcc/7.2.0/860-cilk-wchar.patch56
-rw-r--r--packages/gcc/7.2.0/870-xtensa-fix-PR-target-82181.patch31
-rw-r--r--packages/gcc/7.2.0/891-fix-m68k-uclinux.patch18
-rw-r--r--packages/gcc/7.2.0/900-libgfortran-missing-include.patch10
-rw-r--r--packages/gcc/7.2.0/910-nios2-bad-multilib-default.patch28
-rw-r--r--packages/gcc/7.2.0/930-libgcc-disable-split-stack-nothreads.patch14
-rw-r--r--packages/gcc/7.2.0/951-bionic-ndk.patch58
-rw-r--r--packages/gcc/7.2.0/952-bionic-errno.patch19
-rw-r--r--packages/gcc/7.2.0/970-crystax.patch553
-rw-r--r--packages/gcc/7.2.0/971-crystax.patch25
-rw-r--r--packages/gcc/7.2.0/972-crystax.patch302
-rw-r--r--packages/gcc/7.2.0/973-crystax.patch20
-rw-r--r--packages/gcc/7.2.0/974-crystax.patch24
-rw-r--r--packages/gcc/7.2.0/975-crystax.patch31
-rw-r--r--packages/gcc/7.2.0/976-crystax.patch21
-rw-r--r--packages/gcc/7.2.0/977-crystax.patch33
-rw-r--r--packages/gcc/7.2.0/version.desc0
-rw-r--r--packages/gcc/package.desc5
-rw-r--r--packages/gdb-linaro/7.3-2011.12/version.desc2
-rw-r--r--packages/gdb-linaro/7.4-2012.06/version.desc2
-rw-r--r--packages/gdb-linaro/7.5-2012.12/version.desc2
-rw-r--r--packages/gdb-linaro/7.6.1-2013.10/version.desc2
-rw-r--r--packages/gdb-linaro/7.7-2014.05/version.desc2
-rw-r--r--packages/gdb-linaro/7.7.1-2014.06-1/version.desc2
-rw-r--r--packages/gdb-linaro/7.8-2014.09/version.desc1
-rw-r--r--packages/gdb-linaro/package.desc6
-rw-r--r--packages/gdb/6.8a/100-dwarf-stack-overflow.patch (renamed from patches/gdb/6.8a/100-dwarf-stack-overflow.patch)0
-rw-r--r--packages/gdb/6.8a/110-security-errata-20050610.patch (renamed from patches/gdb/6.8a/110-security-errata-20050610.patch)0
-rw-r--r--packages/gdb/6.8a/120-tdep-opcode-include-workaround.patch (renamed from patches/gdb/6.8a/120-tdep-opcode-include-workaround.patch)0
-rw-r--r--packages/gdb/6.8a/130-reg-no-longer-active.patch (renamed from patches/gdb/6.8a/130-reg-no-longer-active.patch)0
-rw-r--r--packages/gdb/6.8a/140-sim-ppc-have-config-h.patch (renamed from patches/gdb/6.8a/140-sim-ppc-have-config-h.patch)0
-rw-r--r--packages/gdb/6.8a/150-handle-stpcpy-define.patch (renamed from patches/gdb/6.8a/150-handle-stpcpy-define.patch)0
-rw-r--r--packages/gdb/6.8a/version.desc3
-rw-r--r--packages/gdb/7.0.1a/100-sim-ppc-have-config-h.patch (renamed from patches/gdb/7.0a/100-sim-ppc-have-config-h.patch)0
-rw-r--r--packages/gdb/7.0.1a/version.desc3
-rw-r--r--packages/gdb/7.0a/100-sim-ppc-have-config-h.patch (renamed from patches/gdb/7.0.1a/100-sim-ppc-have-config-h.patch)0
-rw-r--r--packages/gdb/7.0a/version.desc3
-rw-r--r--packages/gdb/7.10.1/100-musl_fix.patch (renamed from patches/gdb/8.0/100-musl_fix.patch)0
-rw-r--r--packages/gdb/7.10.1/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch (renamed from patches/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch)0
-rw-r--r--packages/gdb/7.10.1/111-xtensa-make-sure-ar_base-is-initialized.patch (renamed from patches/gdb/8.0/111-xtensa-make-sure-ar_base-is-initialized.patch)0
-rw-r--r--packages/gdb/7.10.1/112-WIP-end-of-prologue-detection-hack.patch (renamed from patches/gdb/8.0/112-WIP-end-of-prologue-detection-hack.patch)0
-rw-r--r--packages/gdb/7.10.1/version.desc1
-rw-r--r--packages/gdb/7.11.1/100-musl_fix.patch (renamed from patches/gdb/7.12.1/100-musl_fix.patch)0
-rw-r--r--packages/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch (renamed from patches/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch)0
-rw-r--r--packages/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch (renamed from patches/gdb/7.12.1/111-xtensa-make-sure-ar_base-is-initialized.patch)0
-rw-r--r--packages/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch (renamed from patches/gdb/7.12.1/112-WIP-end-of-prologue-detection-hack.patch)0
-rw-r--r--packages/gdb/7.11.1/version.desc0
-rw-r--r--packages/gdb/7.12.1/100-musl_fix.patch (renamed from patches/gdb/7.11.1/100-musl_fix.patch)0
-rw-r--r--packages/gdb/7.12.1/101-uclibc-no-gettimeofday-clobber.patch (renamed from patches/gdb/8.0/101-uclibc-no-gettimeofday-clobber.patch)0
-rw-r--r--packages/gdb/7.12.1/111-xtensa-make-sure-ar_base-is-initialized.patch (renamed from patches/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch)0
-rw-r--r--packages/gdb/7.12.1/112-WIP-end-of-prologue-detection-hack.patch (renamed from patches/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch)0
-rw-r--r--packages/gdb/7.12.1/200-allow-android.patch (renamed from patches/gdb/8.0/200-allow-android.patch)0
-rw-r--r--packages/gdb/7.12.1/version.desc0
-rw-r--r--packages/gdb/7.1a/version.desc3
-rw-r--r--packages/gdb/7.2a/100-sim-ppc-lz-fix.patch (renamed from patches/gdb/7.2a/100-sim-ppc-lz-fix.patch)0
-rw-r--r--packages/gdb/7.2a/version.desc3
-rw-r--r--packages/gdb/7.3.1/version.desc2
-rw-r--r--packages/gdb/7.4.1/00_all_ptrace_setsiginfo.patch (renamed from patches/gdb/7.4.1/00_all_ptrace_setsiginfo.patch)0
-rw-r--r--packages/gdb/7.4.1/05_all_readline-headers.patch (renamed from patches/gdb/7.4.1/05_all_readline-headers.patch)0
-rw-r--r--packages/gdb/7.4.1/version.desc2
-rw-r--r--packages/gdb/7.5.1/version.desc2
-rw-r--r--packages/gdb/7.6.1/version.desc2
-rw-r--r--packages/gdb/7.7.1/version.desc2
-rw-r--r--packages/gdb/7.8.1/version.desc1
-rw-r--r--packages/gdb/7.9.1/version.desc1
-rw-r--r--packages/gdb/8.0/100-musl_fix.patch (renamed from patches/gdb/7.10/100-musl_fix.patch)0
-rw-r--r--packages/gdb/8.0/101-uclibc-no-gettimeofday-clobber.patch (renamed from patches/gdb/7.12.1/101-uclibc-no-gettimeofday-clobber.patch)0
-rw-r--r--packages/gdb/8.0/111-xtensa-make-sure-ar_base-is-initialized.patch (renamed from patches/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch)0
-rw-r--r--packages/gdb/8.0/112-WIP-end-of-prologue-detection-hack.patch (renamed from patches/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch)0
-rw-r--r--packages/gdb/8.0/200-allow-android.patch (renamed from patches/gdb/7.12.1/200-allow-android.patch)0
-rw-r--r--packages/gdb/8.0/version.desc0
-rw-r--r--packages/gdb/package.desc5
-rw-r--r--packages/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch (renamed from patches/gettext/0.19.8.1/110-Fix-linker-error-redefinition-of-vasprintf.patch)0
-rw-r--r--packages/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch (renamed from patches/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch)0
-rw-r--r--packages/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch (renamed from patches/gettext/0.19.8.1/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch)0
-rw-r--r--packages/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch (renamed from patches/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch)0
-rw-r--r--packages/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch (renamed from patches/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch)0
-rw-r--r--packages/gettext/0.19.7/version.desc1
-rw-r--r--packages/gettext/0.19.8.1/110-Fix-linker-error-redefinition-of-vasprintf.patch (renamed from patches/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch)0
-rw-r--r--packages/gettext/0.19.8.1/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch (renamed from patches/gettext/0.19.8.1/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch)0
-rw-r--r--packages/gettext/0.19.8.1/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch (renamed from patches/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch)0
-rw-r--r--packages/gettext/0.19.8.1/version.desc0
-rw-r--r--packages/gettext/package.desc6
-rw-r--r--packages/glibc-linaro/2.20-2014.11/100-sparc-nptl.patch (renamed from patches/glibc/linaro-2.20-2014.11/100-sparc-nptl.patch)0
-rw-r--r--packages/glibc-linaro/2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/linaro-2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc-linaro/2.20-2014.11/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/linaro-2.20-2014.11/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc-linaro/2.20-2014.11/103-dl-openat64-variadic.patch (renamed from patches/glibc/linaro-2.20-2014.11/103-dl-openat64-variadic.patch)0
-rw-r--r--packages/glibc-linaro/2.20-2014.11/104-unused-variables.patch (renamed from patches/glibc/linaro-2.20-2014.11/104-unused-variables.patch)0
-rw-r--r--packages/glibc-linaro/2.20-2014.11/105-misleading-indentation.patch (renamed from patches/glibc/linaro-2.20-2014.11/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc-linaro/2.20-2014.11/106-dl-open-array-bounds.patch (renamed from patches/glibc/linaro-2.20-2014.11/106-dl-open-array-bounds.patch)0
-rw-r--r--packages/glibc-linaro/2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/linaro-2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc-linaro/2.20-2014.11/920-fix-rpc_parse-format.patch (renamed from patches/glibc/linaro-2.20-2014.11/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc-linaro/2.20-2014.11/930-explicit-boolean.patch (renamed from patches/glibc/linaro-2.20-2014.11/930-explicit-boolean.patch)0
-rw-r--r--packages/glibc-linaro/2.20-2014.11/940-nis-bogus-conditional.patch (renamed from patches/glibc/linaro-2.20-2014.11/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc-linaro/2.20-2014.11/version.desc1
-rw-r--r--packages/glibc-linaro/package.desc6
-rw-r--r--packages/glibc-ports/2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch72
-rw-r--r--packages/glibc-ports/2.12.1/330-m68k-sys-user.patch96
-rw-r--r--packages/glibc-ports/2.12.1/440-alpha-cache-shape.patch13
-rw-r--r--packages/glibc-ports/2.12.1/460-alpha-fix-gcc-4.1-warnings.patch55
-rw-r--r--packages/glibc-ports/2.12.1/530-alpha-fix-rtld-fPIC.patch20
-rw-r--r--packages/glibc-ports/2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch363
-rw-r--r--packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch22
-rw-r--r--packages/glibc-ports/2.12.1/610-fpu-cw-mips.patch14
-rw-r--r--packages/glibc-ports/2.12.1/670-support-hard-float-eabi.patch22
-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.patch72
-rw-r--r--packages/glibc-ports/2.13/330-m68k-sys-user.patch96
-rw-r--r--packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch19
-rw-r--r--packages/glibc-ports/2.13/420-alpha-statfs.patch29
-rw-r--r--packages/glibc-ports/2.13/440-alpha-cache-shape.patch13
-rw-r--r--packages/glibc-ports/2.13/450-alpha-DEFAULT_STACK_PERMS.patch23
-rw-r--r--packages/glibc-ports/2.13/460-alpha-fix-gcc-4.1-warnings.patch55
-rw-r--r--packages/glibc-ports/2.13/470-alpha-feupdateenv.patch26
-rw-r--r--packages/glibc-ports/2.13/530-alpha-fix-rtld-fPIC.patch20
-rw-r--r--packages/glibc-ports/2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch363
-rw-r--r--packages/glibc-ports/2.13/580-nptl-lowlevellock.patch22
-rw-r--r--packages/glibc-ports/2.13/610-fpu-cw-mips.patch14
-rw-r--r--packages/glibc-ports/2.13/670-support-hard-float-eabi.patch22
-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.patch72
-rw-r--r--packages/glibc-ports/2.14.1/330-m68k-sys-user.patch96
-rw-r--r--packages/glibc-ports/2.14.1/440-alpha-cache-shape.patch13
-rw-r--r--packages/glibc-ports/2.14.1/460-alpha-fix-gcc-4.1-warnings.patch55
-rw-r--r--packages/glibc-ports/2.14.1/530-alpha-fix-rtld-fPIC.patch20
-rw-r--r--packages/glibc-ports/2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch363
-rw-r--r--packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch22
-rw-r--r--packages/glibc-ports/2.14.1/610-fpu-cw-mips.patch14
-rw-r--r--packages/glibc-ports/2.14.1/version.desc0
-rw-r--r--packages/glibc-ports/2.15/090-Fix-ARM-build-with-GCC-trunk.patch72
-rw-r--r--packages/glibc-ports/2.15/091-libmemusage-link-failure.patch19
-rw-r--r--packages/glibc-ports/2.15/330-m68k-sys-user.patch96
-rw-r--r--packages/glibc-ports/2.15/440-alpha-cache-shape.patch13
-rw-r--r--packages/glibc-ports/2.15/460-alpha-fix-gcc-4.1-warnings.patch55
-rw-r--r--packages/glibc-ports/2.15/530-alpha-fix-rtld-fPIC.patch20
-rw-r--r--packages/glibc-ports/2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch363
-rw-r--r--packages/glibc-ports/2.15/580-nptl-lowlevellock.patch22
-rw-r--r--packages/glibc-ports/2.15/610-fpu-cw-mips.patch14
-rw-r--r--packages/glibc-ports/2.15/version.desc0
-rw-r--r--packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch54
-rw-r--r--packages/glibc-ports/2.16.0/330-m68k-sys-user.patch96
-rw-r--r--packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch13
-rw-r--r--packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch55
-rw-r--r--packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch20
-rw-r--r--packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch22
-rw-r--r--packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch14
-rw-r--r--packages/glibc-ports/2.16.0/version.desc0
-rw-r--r--packages/glibc-ports/package.desc10
-rw-r--r--packages/glibc/2.12.1/100-respect-env-CPPFLAGS.patch (renamed from patches/glibc/ports-2.12.1/100-respect-env-CPPFLAGS.patch)0
-rw-r--r--packages/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.12.1/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/2.22/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc/2.12.1/104-unused-variables.patch (renamed from patches/glibc/2.14/104-unused-variables.patch)0
-rw-r--r--packages/glibc/2.12.1/105-misleading-indentation.patch (renamed from patches/glibc/2.22/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc/2.12.1/106-dl-open-array-bounds.patch (renamed from patches/glibc/2.15/106-dl-open-array-bounds.patch)0
-rw-r--r--packages/glibc/2.12.1/120-i386-x86_64-revert-clone-cfi.patch (renamed from patches/glibc/ports-2.12.1/120-i386-x86_64-revert-clone-cfi.patch)0
-rw-r--r--packages/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.12.1/140-disable-ldconfig.patch (renamed from patches/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 patches/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 patches/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 patches/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 patches/glibc/ports-2.12.1/180-resolv-dynamic.patch)0
-rw-r--r--packages/glibc/2.12.1/190-localedef-mmap.patch (renamed from patches/glibc/ports-2.12.1/190-localedef-mmap.patch)0
-rw-r--r--packages/glibc/2.12.1/200-fadvise64_64.patch (renamed from patches/glibc/ports-2.12.1/200-fadvise64_64.patch)0
-rw-r--r--packages/glibc/2.12.1/220-section-comments.patch (renamed from patches/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 patches/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 patches/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 patches/glibc/ports-2.12.1/250-fix-pr631.patch)0
-rw-r--r--packages/glibc/2.12.1/260-assume-pipe2.patch (renamed from patches/glibc/ports-2.12.1/260-assume-pipe2.patch)0
-rw-r--r--packages/glibc/2.12.1/270-china.patch (renamed from patches/glibc/ports-2.12.1/270-china.patch)0
-rw-r--r--packages/glibc/2.12.1/280-new-valencian-locale.patch (renamed from patches/glibc/ports-2.12.1/280-new-valencian-locale.patch)0
-rw-r--r--packages/glibc/2.12.1/300-macos-cross-rpcgen.patch (renamed from patches/glibc/2.18/300-macos-cross-rpcgen.patch)0
-rw-r--r--packages/glibc/2.12.1/300-nscd-one-fork.patch (renamed from patches/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 patches/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 patches/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 patches/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 patches/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 patches/glibc/ports-2.12.1/370-fnmatch.patch)0
-rw-r--r--packages/glibc/2.12.1/380-dont-build-timezone.patch (renamed from patches/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 patches/glibc/ports-2.12.1/400-alpha-xstat.patch)0
-rw-r--r--packages/glibc/2.12.1/430-alpha-creat.patch (renamed from patches/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 patches/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 patches/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 patches/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 patches/glibc/ports-2.12.1/640-alpha-atfcts.patch)0
-rw-r--r--packages/glibc/2.12.1/650-syslog.patch (renamed from patches/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 patches/glibc/ports-2.16.0/660-debug-readlink_chk-readklinkat_chk.patch)0
-rw-r--r--packages/glibc/2.12.1/900-march-i686.patch (renamed from patches/glibc/2.13/900-march-i686.patch)0
-rw-r--r--packages/glibc/2.12.1/910-typedef-caddr.patch (renamed from patches/glibc/2.19/910-typedef-caddr.patch)0
-rw-r--r--packages/glibc/2.12.1/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.24/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.12.1/920-make-382.patch (renamed from patches/glibc/2.12.1/920-make-382.patch)0
-rw-r--r--packages/glibc/2.12.1/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.24/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.12.1/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.12.1/999-new-tools.patch (renamed from patches/glibc/2.12.1/999-new-tools.patch)0
-rw-r--r--packages/glibc/2.12.1/version.desc1
-rw-r--r--packages/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.12.2/300-macos-cross-rpcgen.patch (renamed from patches/glibc/2.17/300-macos-cross-rpcgen.patch)0
-rw-r--r--packages/glibc/2.12.2/900-march-i686.patch (renamed from patches/glibc/2.12.2/900-march-i686.patch)0
-rw-r--r--packages/glibc/2.12.2/910-typedef-caddr.patch (renamed from patches/glibc/2.12.2/910-typedef-caddr.patch)0
-rw-r--r--packages/glibc/2.12.2/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.23/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.12.2/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.23/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.12.2/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.12.2/999-new-tools.patch (renamed from patches/glibc/2.12.2/999-new-tools.patch)0
-rw-r--r--packages/glibc/2.12.2/version.desc1
-rw-r--r--packages/glibc/2.13/100-respect-env-CPPFLAGS.patch (renamed from patches/glibc/ports-2.15/100-respect-env-CPPFLAGS.patch)0
-rw-r--r--packages/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.13/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/2.21/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc/2.13/104-unused-variables.patch (renamed from patches/glibc/2.14.1/104-unused-variables.patch)0
-rw-r--r--packages/glibc/2.13/105-misleading-indentation.patch (renamed from patches/glibc/2.21/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc/2.13/106-dl-open-array-bounds.patch (renamed from patches/glibc/2.14/106-dl-open-array-bounds.patch)0
-rw-r--r--packages/glibc/2.13/120-i386-x86_64-revert-clone-cfi.patch (renamed from patches/glibc/ports-2.16.0/120-i386-x86_64-revert-clone-cfi.patch)0
-rw-r--r--packages/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.13/140-disable-ldconfig.patch (renamed from patches/glibc/ports-2.16.0/140-disable-ldconfig.patch)0
-rw-r--r--packages/glibc/2.13/150-queue-header-updates.patch (renamed from patches/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 patches/glibc/ports-2.15/160-manual-no-perl.patch)0
-rw-r--r--packages/glibc/2.13/170-localedef-fix-trampoline.patch (renamed from patches/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch)0
-rw-r--r--packages/glibc/2.13/180-resolv-dynamic.patch (renamed from patches/glibc/ports-2.16.0/180-resolv-dynamic.patch)0
-rw-r--r--packages/glibc/2.13/190-localedef-mmap.patch (renamed from patches/glibc/ports-2.14/190-localedef-mmap.patch)0
-rw-r--r--packages/glibc/2.13/200-fadvise64_64.patch (renamed from patches/glibc/ports-2.16.0/200-fadvise64_64.patch)0
-rw-r--r--packages/glibc/2.13/220-section-comments.patch (renamed from patches/glibc/ports-2.15/220-section-comments.patch)0
-rw-r--r--packages/glibc/2.13/230-no-inline-gmon.patch (renamed from patches/glibc/ports-2.15/230-no-inline-gmon.patch)0
-rw-r--r--packages/glibc/2.13/240-check_native-headers.patch (renamed from patches/glibc/ports-2.14/240-check_native-headers.patch)0
-rw-r--r--packages/glibc/2.13/250-fix-pr631.patch (renamed from patches/glibc/ports-2.13/250-fix-pr631.patch)0
-rw-r--r--packages/glibc/2.13/260-assume-pipe2.patch (renamed from patches/glibc/ports-2.15/260-assume-pipe2.patch)0
-rw-r--r--packages/glibc/2.13/270-china.patch (renamed from patches/glibc/ports-2.16.0/270-china.patch)0
-rw-r--r--packages/glibc/2.13/280-new-valencian-locale.patch (renamed from patches/glibc/ports-2.16.0/280-new-valencian-locale.patch)0
-rw-r--r--packages/glibc/2.13/300-macos-cross-rpcgen.patch (renamed from patches/glibc/2.16.0/300-macos-cross-rpcgen.patch)0
-rw-r--r--packages/glibc/2.13/300-nscd-one-fork.patch (renamed from patches/glibc/ports-2.15/300-nscd-one-fork.patch)0
-rw-r--r--packages/glibc/2.13/310-hppa-nptl-carlos.patch (renamed from patches/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 patches/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 patches/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 patches/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 patches/glibc/ports-2.16.0/380-dont-build-timezone.patch)0
-rw-r--r--packages/glibc/2.13/400-alpha-xstat.patch (renamed from patches/glibc/ports-2.16.0/400-alpha-xstat.patch)0
-rw-r--r--packages/glibc/2.13/430-alpha-creat.patch (renamed from patches/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 patches/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 patches/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 patches/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 patches/glibc/ports-2.16.0/640-alpha-atfcts.patch)0
-rw-r--r--packages/glibc/2.13/650-syslog.patch (renamed from patches/glibc/ports-2.15/650-syslog.patch)0
-rw-r--r--packages/glibc/2.13/660-debug-readlink_chk-readklinkat_chk.patch (renamed from patches/glibc/ports-2.15/660-debug-readlink_chk-readklinkat_chk.patch)0
-rw-r--r--packages/glibc/2.13/900-march-i686.patch (renamed from patches/glibc/2.12.1/900-march-i686.patch)0
-rw-r--r--packages/glibc/2.13/910-typedef-caddr.patch (renamed from patches/glibc/2.13/910-typedef-caddr.patch)0
-rw-r--r--packages/glibc/2.13/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.22/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.13/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.22/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.13/950-initfini-ppc64.patch (renamed from patches/glibc/2.14/950-initfini-ppc64.patch)0
-rw-r--r--packages/glibc/2.13/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.13/999-new-tools.patch (renamed from patches/glibc/2.13/999-new-tools.patch)0
-rw-r--r--packages/glibc/2.13/version.desc1
-rw-r--r--packages/glibc/2.14.1/100-respect-env-CPPFLAGS.patch (renamed from patches/glibc/ports-2.14/100-respect-env-CPPFLAGS.patch)0
-rw-r--r--packages/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.14.1/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/2.20/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc/2.14.1/103-dl-openat64-variadic.patch (renamed from patches/glibc/2.21/103-dl-openat64-variadic.patch)0
-rw-r--r--packages/glibc/2.14.1/104-unused-variables.patch (renamed from patches/glibc/2.13/104-unused-variables.patch)0
-rw-r--r--packages/glibc/2.14.1/105-misleading-indentation.patch (renamed from patches/glibc/2.20/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc/2.14.1/106-dl-open-array-bounds.patch (renamed from patches/glibc/2.14.1/106-dl-open-array-bounds.patch)0
-rw-r--r--packages/glibc/2.14.1/120-i386-x86_64-revert-clone-cfi.patch (renamed from patches/glibc/ports-2.15/120-i386-x86_64-revert-clone-cfi.patch)0
-rw-r--r--packages/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.14.1/140-disable-ldconfig.patch (renamed from patches/glibc/ports-2.15/140-disable-ldconfig.patch)0
-rw-r--r--packages/glibc/2.14.1/150-queue-header-updates.patch (renamed from patches/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 patches/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 patches/glibc/ports-2.15/170-localedef-fix-trampoline.patch)0
-rw-r--r--packages/glibc/2.14.1/180-resolv-dynamic.patch (renamed from patches/glibc/ports-2.15/180-resolv-dynamic.patch)0
-rw-r--r--packages/glibc/2.14.1/190-localedef-mmap.patch (renamed from patches/glibc/ports-2.14.1/190-localedef-mmap.patch)0
-rw-r--r--packages/glibc/2.14.1/200-fadvise64_64.patch (renamed from patches/glibc/ports-2.15/200-fadvise64_64.patch)0
-rw-r--r--packages/glibc/2.14.1/220-section-comments.patch (renamed from patches/glibc/ports-2.14/220-section-comments.patch)0
-rw-r--r--packages/glibc/2.14.1/230-no-inline-gmon.patch (renamed from patches/glibc/ports-2.14/230-no-inline-gmon.patch)0
-rw-r--r--packages/glibc/2.14.1/260-assume-pipe2.patch (renamed from patches/glibc/ports-2.14/260-assume-pipe2.patch)0
-rw-r--r--packages/glibc/2.14.1/270-china.patch (renamed from patches/glibc/ports-2.15/270-china.patch)0
-rw-r--r--packages/glibc/2.14.1/280-new-valencian-locale.patch (renamed from patches/glibc/ports-2.15/280-new-valencian-locale.patch)0
-rw-r--r--packages/glibc/2.14.1/300-macos-cross-rpcgen.patch (renamed from patches/glibc/2.15/300-macos-cross-rpcgen.patch)0
-rw-r--r--packages/glibc/2.14.1/300-nscd-one-fork.patch (renamed from patches/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 patches/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 patches/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 patches/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 patches/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 patches/glibc/ports-2.15/380-dont-build-timezone.patch)0
-rw-r--r--packages/glibc/2.14.1/400-alpha-xstat.patch (renamed from patches/glibc/ports-2.15/400-alpha-xstat.patch)0
-rw-r--r--packages/glibc/2.14.1/430-alpha-creat.patch (renamed from patches/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 patches/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 patches/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 patches/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 patches/glibc/ports-2.15/640-alpha-atfcts.patch)0
-rw-r--r--packages/glibc/2.14.1/650-syslog.patch (renamed from patches/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 patches/glibc/ports-2.14/660-debug-readlink_chk-readklinkat_chk.patch)0
-rw-r--r--packages/glibc/2.14.1/900-cpuid-include.patch (renamed from patches/glibc/2.14/900-cpuid-include.patch)0
-rw-r--r--packages/glibc/2.14.1/910-asm-i686.patch (renamed from patches/glibc/2.15/910-asm-i686.patch)0
-rw-r--r--packages/glibc/2.14.1/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.21/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.14.1/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.21/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.14.1/950-initfini-ppc64.patch (renamed from patches/glibc/2.14.1/950-initfini-ppc64.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.1/999-new-tools.patch (renamed from patches/glibc/2.14.1/999-new-tools.patch)0
-rw-r--r--packages/glibc/2.14.1/version.desc1
-rw-r--r--packages/glibc/2.14/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.15/100-respect-env-CPPFLAGS.patch (renamed from patches/glibc/ports-2.14.1/100-respect-env-CPPFLAGS.patch)0
-rw-r--r--packages/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.15/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/2.19/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc/2.15/103-dl-openat64-variadic.patch (renamed from patches/glibc/2.20/103-dl-openat64-variadic.patch)0
-rw-r--r--packages/glibc/2.15/104-unused-variables.patch (renamed from patches/glibc/2.15/104-unused-variables.patch)0
-rw-r--r--packages/glibc/2.15/105-misleading-indentation.patch (renamed from patches/glibc/2.19/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc/2.15/106-dl-open-array-bounds.patch (renamed from patches/glibc/2.13/106-dl-open-array-bounds.patch)0
-rw-r--r--packages/glibc/2.15/120-i386-x86_64-revert-clone-cfi.patch (renamed from patches/glibc/ports-2.14/120-i386-x86_64-revert-clone-cfi.patch)0
-rw-r--r--packages/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.15/140-disable-ldconfig.patch (renamed from patches/glibc/ports-2.14/140-disable-ldconfig.patch)0
-rw-r--r--packages/glibc/2.15/150-queue-header-updates.patch (renamed from patches/glibc/ports-2.14/150-queue-header-updates.patch)0
-rw-r--r--packages/glibc/2.15/160-manual-no-perl.patch (renamed from patches/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 patches/glibc/ports-2.14/170-localedef-fix-trampoline.patch)0
-rw-r--r--packages/glibc/2.15/180-resolv-dynamic.patch (renamed from patches/glibc/ports-2.14/180-resolv-dynamic.patch)0
-rw-r--r--packages/glibc/2.15/200-fadvise64_64.patch (renamed from patches/glibc/ports-2.14/200-fadvise64_64.patch)0
-rw-r--r--packages/glibc/2.15/220-section-comments.patch (renamed from patches/glibc/ports-2.14.1/220-section-comments.patch)0
-rw-r--r--packages/glibc/2.15/230-no-inline-gmon.patch (renamed from patches/glibc/ports-2.14.1/230-no-inline-gmon.patch)0
-rw-r--r--packages/glibc/2.15/260-assume-pipe2.patch (renamed from patches/glibc/ports-2.14.1/260-assume-pipe2.patch)0
-rw-r--r--packages/glibc/2.15/270-china.patch (renamed from patches/glibc/ports-2.14/270-china.patch)0
-rw-r--r--packages/glibc/2.15/280-new-valencian-locale.patch (renamed from patches/glibc/ports-2.14/280-new-valencian-locale.patch)0
-rw-r--r--packages/glibc/2.15/300-macos-cross-rpcgen.patch (renamed from patches/glibc/2.14/300-macos-cross-rpcgen.patch)0
-rw-r--r--packages/glibc/2.15/300-nscd-one-fork.patch (renamed from patches/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 patches/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 patches/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 patches/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 patches/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 patches/glibc/ports-2.14/380-dont-build-timezone.patch)0
-rw-r--r--packages/glibc/2.15/400-alpha-xstat.patch (renamed from patches/glibc/ports-2.14/400-alpha-xstat.patch)0
-rw-r--r--packages/glibc/2.15/430-alpha-creat.patch (renamed from patches/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 patches/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 patches/glibc/ports-2.14/560-ppc-atomic.patch)0
-rw-r--r--packages/glibc/2.15/630-mips_shn_undef-hack.patch (renamed from patches/glibc/ports-2.14/630-mips_shn_undef-hack.patch)0
-rw-r--r--packages/glibc/2.15/640-alpha-atfcts.patch (renamed from patches/glibc/ports-2.14/640-alpha-atfcts.patch)0
-rw-r--r--packages/glibc/2.15/650-syslog.patch (renamed from patches/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 patches/glibc/ports-2.14.1/660-debug-readlink_chk-readklinkat_chk.patch)0
-rw-r--r--packages/glibc/2.15/900-cpuid-include.patch (renamed from patches/glibc/2.15/900-cpuid-include.patch)0
-rw-r--r--packages/glibc/2.15/910-asm-i686.patch (renamed from patches/glibc/2.14.1/910-asm-i686.patch)0
-rw-r--r--packages/glibc/2.15/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.20/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.15/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.20/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.15/990-try-link-static.patch (renamed from patches/glibc/2.15/990-try-link-static.patch)0
-rw-r--r--packages/glibc/2.15/991-builtin_expect.patch (renamed from patches/glibc/2.15/991-builtin_expect.patch)0
-rw-r--r--packages/glibc/2.15/992-gcc_s-suffix.patch (renamed from patches/glibc/2.15/992-gcc_s-suffix.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.15/999-new-tools.patch (renamed from patches/glibc/2.15/999-new-tools.patch)0
-rw-r--r--packages/glibc/2.15/version.desc1
-rw-r--r--packages/glibc/2.16.0/100-respect-env-CPPFLAGS.patch (renamed from patches/glibc/ports-2.16.0/100-respect-env-CPPFLAGS.patch)0
-rw-r--r--packages/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.16.0/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/2.18/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc/2.16.0/103-dl-openat64-variadic.patch (renamed from patches/glibc/2.19/103-dl-openat64-variadic.patch)0
-rw-r--r--packages/glibc/2.16.0/104-unused-variables.patch (renamed from patches/glibc/2.16.0/104-unused-variables.patch)0
-rw-r--r--packages/glibc/2.16.0/105-misleading-indentation.patch (renamed from patches/glibc/2.18/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc/2.16.0/106-dl-open-array-bounds.patch (renamed from patches/glibc/2.17/106-dl-open-array-bounds.patch)0
-rw-r--r--packages/glibc/2.16.0/120-i386-x86_64-revert-clone-cfi.patch (renamed from patches/glibc/ports-2.14.1/120-i386-x86_64-revert-clone-cfi.patch)0
-rw-r--r--packages/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.16.0/140-disable-ldconfig.patch (renamed from patches/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 patches/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 patches/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 patches/glibc/ports-2.14.1/180-resolv-dynamic.patch)0
-rw-r--r--packages/glibc/2.16.0/200-fadvise64_64.patch (renamed from patches/glibc/ports-2.14.1/200-fadvise64_64.patch)0
-rw-r--r--packages/glibc/2.16.0/260-assume-pipe2.patch (renamed from patches/glibc/ports-2.16.0/260-assume-pipe2.patch)0
-rw-r--r--packages/glibc/2.16.0/270-china.patch (renamed from patches/glibc/ports-2.14.1/270-china.patch)0
-rw-r--r--packages/glibc/2.16.0/280-new-valencian-locale.patch (renamed from patches/glibc/ports-2.14.1/280-new-valencian-locale.patch)0
-rw-r--r--packages/glibc/2.16.0/300-macos-cross-rpcgen.patch (renamed from patches/glibc/2.14.1/300-macos-cross-rpcgen.patch)0
-rw-r--r--packages/glibc/2.16.0/300-nscd-one-fork.patch (renamed from patches/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 patches/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 patches/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 patches/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 patches/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 patches/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 patches/glibc/ports-2.14.1/400-alpha-xstat.patch)0
-rw-r--r--packages/glibc/2.16.0/430-alpha-creat.patch (renamed from patches/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 patches/glibc/ports-2.15/490-alpha_alpha-add-fdatasync-support.patch)0
-rw-r--r--packages/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch (renamed from patches/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch)0
-rw-r--r--packages/glibc/2.16.0/560-ppc-atomic.patch (renamed from patches/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 patches/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 patches/glibc/ports-2.14.1/640-alpha-atfcts.patch)0
-rw-r--r--packages/glibc/2.16.0/650-syslog.patch (renamed from patches/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 patches/glibc/ports-2.13/660-debug-readlink_chk-readklinkat_chk.patch)0
-rw-r--r--packages/glibc/2.16.0/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.19/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.16.0/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.19/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.16.0/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.16.0/999-new-tools.patch (renamed from patches/glibc/2.16.0/999-new-tools.patch)0
-rw-r--r--packages/glibc/2.16.0/version.desc1
-rw-r--r--packages/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch (renamed from patches/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch)0
-rw-r--r--packages/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.17/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/2.17/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc/2.17/103-dl-openat64-variadic.patch (renamed from patches/glibc/2.18/103-dl-openat64-variadic.patch)0
-rw-r--r--packages/glibc/2.17/104-unused-variables.patch (renamed from patches/glibc/2.17/104-unused-variables.patch)0
-rw-r--r--packages/glibc/2.17/105-misleading-indentation.patch (renamed from patches/glibc/2.17/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc/2.17/106-dl-open-array-bounds.patch (renamed from patches/glibc/2.16.0/106-dl-open-array-bounds.patch)0
-rw-r--r--packages/glibc/2.17/120-support-make4.patch (renamed from patches/glibc/2.18/120-support-make4.patch)0
-rw-r--r--packages/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.17/300-macos-cross-rpcgen.patch (renamed from patches/glibc/2.13/300-macos-cross-rpcgen.patch)0
-rw-r--r--packages/glibc/2.17/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.18/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.17/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.18/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.17/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.17/version.desc1
-rw-r--r--packages/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch (renamed from patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch)0
-rw-r--r--packages/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.18/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/2.16.0/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc/2.18/103-dl-openat64-variadic.patch (renamed from patches/glibc/2.17/103-dl-openat64-variadic.patch)0
-rw-r--r--packages/glibc/2.18/104-unused-variables.patch (renamed from patches/glibc/2.18/104-unused-variables.patch)0
-rw-r--r--packages/glibc/2.18/105-misleading-indentation.patch (renamed from patches/glibc/2.16.0/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc/2.18/106-dl-open-array-bounds.patch (renamed from patches/glibc/2.21/106-dl-open-array-bounds.patch)0
-rw-r--r--packages/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch (renamed from patches/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch)0
-rw-r--r--packages/glibc/2.18/120-support-make4.patch (renamed from patches/glibc/2.17/120-support-make4.patch)0
-rw-r--r--packages/glibc/2.18/130-arm-unwind.patch (renamed from patches/glibc/2.19/130-arm-unwind.patch)0
-rw-r--r--packages/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.18/300-macos-cross-rpcgen.patch (renamed from patches/glibc/2.12.2/300-macos-cross-rpcgen.patch)0
-rw-r--r--packages/glibc/2.18/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.17/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.18/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.17/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.18/version.desc1
-rw-r--r--packages/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.19/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/2.15/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc/2.19/103-dl-openat64-variadic.patch (renamed from patches/glibc/2.16.0/103-dl-openat64-variadic.patch)0
-rw-r--r--packages/glibc/2.19/104-unused-variables.patch (renamed from patches/glibc/2.20/104-unused-variables.patch)0
-rw-r--r--packages/glibc/2.19/105-misleading-indentation.patch (renamed from patches/glibc/2.15/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc/2.19/106-dl-open-array-bounds.patch (renamed from patches/glibc/2.20/106-dl-open-array-bounds.patch)0
-rw-r--r--packages/glibc/2.19/130-arm-unwind.patch (renamed from patches/glibc/2.18/130-arm-unwind.patch)0
-rw-r--r--packages/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.19/910-typedef-caddr.patch (renamed from patches/glibc/2.12.1/910-typedef-caddr.patch)0
-rw-r--r--packages/glibc/2.19/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.16.0/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.19/930-explicit-boolean.patch (renamed from patches/glibc/2.24/930-explicit-boolean.patch)0
-rw-r--r--packages/glibc/2.19/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.16.0/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.19/version.desc1
-rw-r--r--packages/glibc/2.20/100-sparc-nptl.patch (renamed from patches/glibc/2.20/100-sparc-nptl.patch)0
-rw-r--r--packages/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.20/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/2.14/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc/2.20/103-dl-openat64-variadic.patch (renamed from patches/glibc/2.15/103-dl-openat64-variadic.patch)0
-rw-r--r--packages/glibc/2.20/104-unused-variables.patch (renamed from patches/glibc/2.19/104-unused-variables.patch)0
-rw-r--r--packages/glibc/2.20/105-misleading-indentation.patch (renamed from patches/glibc/2.14/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc/2.20/106-dl-open-array-bounds.patch (renamed from patches/glibc/2.19/106-dl-open-array-bounds.patch)0
-rw-r--r--packages/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.20/910-typedef-caddr.patch (renamed from patches/glibc/2.25/910-typedef-caddr.patch)0
-rw-r--r--packages/glibc/2.20/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.15/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.20/930-explicit-boolean.patch (renamed from patches/glibc/2.23/930-explicit-boolean.patch)0
-rw-r--r--packages/glibc/2.20/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.15/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.20/version.desc1
-rw-r--r--packages/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.21/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/2.14.1/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc/2.21/103-dl-openat64-variadic.patch (renamed from patches/glibc/2.14/103-dl-openat64-variadic.patch)0
-rw-r--r--packages/glibc/2.21/104-unused-variables.patch (renamed from patches/glibc/2.22/104-unused-variables.patch)0
-rw-r--r--packages/glibc/2.21/105-misleading-indentation.patch (renamed from patches/glibc/2.14.1/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc/2.21/106-dl-open-array-bounds.patch (renamed from patches/glibc/2.18/106-dl-open-array-bounds.patch)0
-rw-r--r--packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.21/910-typedef-caddr.patch (renamed from patches/glibc/2.24/910-typedef-caddr.patch)0
-rw-r--r--packages/glibc/2.21/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.14/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.21/930-explicit-boolean.patch (renamed from patches/glibc/2.22/930-explicit-boolean.patch)0
-rw-r--r--packages/glibc/2.21/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.14/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.21/950-dlclose-assert.patch (renamed from patches/glibc/2.21/950-dlclose-assert.patch)0
-rw-r--r--packages/glibc/2.21/version.desc1
-rw-r--r--packages/glibc/2.22/100-sparc32-sem_open-missing-include.patch (renamed from patches/glibc/2.22/100-sparc32-sem_open-missing-include.patch)0
-rw-r--r--packages/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.22/102-fix-signed-shift-overlow.patch (renamed from patches/glibc/2.13/102-fix-signed-shift-overlow.patch)0
-rw-r--r--packages/glibc/2.22/103-dl-openat64-variadic.patch (renamed from patches/glibc/2.22/103-dl-openat64-variadic.patch)0
-rw-r--r--packages/glibc/2.22/104-unused-variables.patch (renamed from patches/glibc/2.21/104-unused-variables.patch)0
-rw-r--r--packages/glibc/2.22/105-misleading-indentation.patch (renamed from patches/glibc/2.13/105-misleading-indentation.patch)0
-rw-r--r--packages/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch (renamed from patches/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch)0
-rw-r--r--packages/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.22/910-typedef-caddr.patch (renamed from patches/glibc/2.23/910-typedef-caddr.patch)0
-rw-r--r--packages/glibc/2.22/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.14.1/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.22/930-explicit-boolean.patch (renamed from patches/glibc/2.21/930-explicit-boolean.patch)0
-rw-r--r--packages/glibc/2.22/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.14.1/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.22/version.desc1
-rw-r--r--packages/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch (renamed from patches/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch)0
-rw-r--r--packages/glibc/2.23/120-Fix-build-with-enable-static-nss.patch (renamed from patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch)0
-rw-r--r--packages/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.23/910-typedef-caddr.patch (renamed from patches/glibc/2.22/910-typedef-caddr.patch)0
-rw-r--r--packages/glibc/2.23/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.13/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.23/930-explicit-boolean.patch (renamed from patches/glibc/2.20/930-explicit-boolean.patch)0
-rw-r--r--packages/glibc/2.23/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.13/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.23/997-regexp-common.patch58
-rw-r--r--packages/glibc/2.23/version.desc1
-rw-r--r--packages/glibc/2.24/110-sh-fix-gcc6.patch (renamed from patches/glibc/2.25/110-sh-fix-gcc6.patch)0
-rw-r--r--packages/glibc/2.24/120-Fix-build-with-enable-static-nss.patch (renamed from patches/glibc/2.24/120-Fix-build-with-enable-static-nss.patch)0
-rw-r--r--packages/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.24/910-typedef-caddr.patch (renamed from patches/glibc/2.21/910-typedef-caddr.patch)0
-rw-r--r--packages/glibc/2.24/920-fix-rpc_parse-format.patch (renamed from patches/glibc/2.12.2/920-fix-rpc_parse-format.patch)0
-rw-r--r--packages/glibc/2.24/930-explicit-boolean.patch (renamed from patches/glibc/2.19/930-explicit-boolean.patch)0
-rw-r--r--packages/glibc/2.24/940-nis-bogus-conditional.patch (renamed from patches/glibc/2.12.2/940-nis-bogus-conditional.patch)0
-rw-r--r--packages/glibc/2.24/997-regexp-common.patch58
-rw-r--r--packages/glibc/2.24/version.desc0
-rw-r--r--packages/glibc/2.25/110-sh-fix-gcc6.patch (renamed from patches/glibc/2.24/110-sh-fix-gcc6.patch)0
-rw-r--r--packages/glibc/2.25/120-Fix-build-with-enable-static-nss.patch (renamed from patches/glibc/2.23/120-Fix-build-with-enable-static-nss.patch)0
-rw-r--r--packages/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch (renamed from patches/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch)0
-rw-r--r--packages/glibc/2.25/910-typedef-caddr.patch (renamed from patches/glibc/2.20/910-typedef-caddr.patch)0
-rw-r--r--packages/glibc/2.25/960-sh4-trap-divdi3.patch (renamed from patches/glibc/2.25/960-sh4-trap-divdi3.patch)0
-rw-r--r--packages/glibc/2.25/961-sparc-extra-plt-call.patch (renamed from patches/glibc/2.25/961-sparc-extra-plt-call.patch)0
-rw-r--r--packages/glibc/2.25/997-regexp-common.patch58
-rw-r--r--packages/glibc/2.25/version.desc0
-rw-r--r--packages/glibc/2.26/910-typedef-caddr.patch15
-rw-r--r--packages/glibc/2.26/version.desc0
-rw-r--r--packages/glibc/package.desc5
-rw-r--r--packages/gmp/4.3.2/version.desc2
-rw-r--r--packages/gmp/5.0.5/120-fix-r0-clobbering-issue.patch (renamed from patches/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.3/version.desc1
-rw-r--r--packages/gmp/6.0.0a/version.desc2
-rw-r--r--packages/gmp/6.1.2/version.desc0
-rw-r--r--packages/gmp/package.desc5
-rw-r--r--packages/isl/0.11.2/version.desc2
-rw-r--r--packages/isl/0.12.2/version.desc2
-rw-r--r--packages/isl/0.14.1/version.desc1
-rw-r--r--packages/isl/0.15/version.desc0
-rw-r--r--packages/isl/0.16.1/version.desc0
-rw-r--r--packages/isl/0.17.1/version.desc0
-rw-r--r--packages/isl/0.18/version.desc0
-rw-r--r--packages/isl/package.desc5
-rw-r--r--packages/libelf/0.8.13/100-fix-64-bit-detection.patch (renamed from patches/libelf/0.8.13/100-fix-64-bit-detection.patch)0
-rw-r--r--packages/libelf/0.8.13/version.desc0
-rw-r--r--packages/libelf/package.desc4
-rw-r--r--packages/libiconv/1.14/100-srclib_stdio.in.h-remove-gets-declarations.patch (renamed from patches/libiconv/1.14/100-srclib_stdio.in.h-remove-gets-declarations.patch)0
-rw-r--r--packages/libiconv/1.14/version.desc1
-rw-r--r--packages/libiconv/1.15/version.desc0
-rw-r--r--packages/libiconv/package.desc6
-rw-r--r--packages/libtool/2.4.6/2.4.5-pass-ldflags.patch (renamed from patches/libtool/2.4.6/2.4.5-pass-ldflags.patch)0
-rw-r--r--packages/libtool/2.4.6/version.desc0
-rw-r--r--packages/libtool/package.desc4
-rw-r--r--packages/linux/2.6.32.27/100-unifdef-strclpy.patch (renamed from patches/linux/2.6.32.27/100-unifdef-strclpy.patch)0
-rw-r--r--packages/linux/2.6.32.27/version.desc2
-rw-r--r--packages/linux/2.6.33.7/version.desc2
-rw-r--r--packages/linux/2.6.34.7/version.desc2
-rw-r--r--packages/linux/2.6.35.9/version.desc2
-rw-r--r--packages/linux/2.6.36.4/version.desc2
-rw-r--r--packages/linux/2.6.37.6/version.desc2
-rw-r--r--packages/linux/2.6.38.8/version.desc2
-rw-r--r--packages/linux/2.6.39.4/version.desc2
-rw-r--r--packages/linux/3.0.101/version.desc2
-rw-r--r--packages/linux/3.1.10/version.desc2
-rw-r--r--packages/linux/3.10.107/version.desc1
-rw-r--r--packages/linux/3.11.10/version.desc2
-rw-r--r--packages/linux/3.12.74/version.desc0
-rw-r--r--packages/linux/3.13.11/version.desc1
-rw-r--r--packages/linux/3.14.79/version.desc1
-rw-r--r--packages/linux/3.15.10/version.desc1
-rw-r--r--packages/linux/3.16.46/version.desc0
-rw-r--r--packages/linux/3.17.8/version.desc1
-rw-r--r--packages/linux/3.18.66/version.desc1
-rw-r--r--packages/linux/3.19.8/version.desc1
-rw-r--r--packages/linux/3.2.91/version.desc0
-rw-r--r--packages/linux/3.3.8/version.desc2
-rw-r--r--packages/linux/3.4.113/version.desc0
-rw-r--r--packages/linux/3.5.7/version.desc2
-rw-r--r--packages/linux/3.6.11/version.desc2
-rw-r--r--packages/linux/3.7.10/version.desc2
-rw-r--r--packages/linux/3.8.13/version.desc2
-rw-r--r--packages/linux/3.9.11/version.desc2
-rw-r--r--packages/linux/4.0.9/version.desc1
-rw-r--r--packages/linux/4.1.43/version.desc0
-rw-r--r--packages/linux/4.10.17/version.desc0
-rw-r--r--packages/linux/4.10.8/version.desc1
-rw-r--r--packages/linux/4.11.12/version.desc0
-rw-r--r--packages/linux/4.12.8/version.desc0
-rw-r--r--packages/linux/4.2.8/version.desc1
-rw-r--r--packages/linux/4.3.6/version.desc1
-rw-r--r--packages/linux/4.4.83/version.desc1
-rw-r--r--packages/linux/4.5.7/version.desc1
-rw-r--r--packages/linux/4.6.7/version.desc1
-rw-r--r--packages/linux/4.7.10/version.desc1
-rw-r--r--packages/linux/4.8.17/version.desc1
-rw-r--r--packages/linux/4.9.44/version.desc0
-rw-r--r--packages/linux/package.desc5
-rw-r--r--packages/ltrace/0.5.3/100-allow-cross-compile.patch (renamed from patches/ltrace/0.5.3/100-allow-cross-compile.patch)0
-rw-r--r--packages/ltrace/0.5.3/110-alpha-support.patch (renamed from patches/ltrace/0.5.3/110-alpha-support.patch)0
-rw-r--r--packages/ltrace/0.5.3/120-debian-ltrace_0.5.3-2.patch (renamed from patches/ltrace/0.5.3/120-debian-ltrace_0.5.3-2.patch)0
-rw-r--r--packages/ltrace/0.5.3/130-add-sysdep.patch (renamed from patches/ltrace/0.5.3/130-add-sysdep.patch)0
-rw-r--r--packages/ltrace/0.5.3/140-mips-remove-CP.patch (renamed from patches/ltrace/0.5.3/140-mips-remove-CP.patch)0
-rw-r--r--packages/ltrace/0.5.3/140-mips.patch (renamed from patches/ltrace/0.5.3/140-mips.patch)0
-rw-r--r--packages/ltrace/0.5.3/150-allow-configurable-arch.patch (renamed from patches/ltrace/0.5.3/150-allow-configurable-arch.patch)0
-rw-r--r--packages/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch (renamed from patches/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch)0
-rw-r--r--packages/ltrace/0.5.3/170-lib-supcc.patch (renamed from patches/ltrace/0.5.3/170-lib-supcc.patch)0
-rw-r--r--packages/ltrace/0.5.3/180-libltrace-genindex.patch (renamed from patches/ltrace/0.5.3/180-libltrace-genindex.patch)0
-rw-r--r--packages/ltrace/0.5.3/190-ar-configurable.patch (renamed from patches/ltrace/0.5.3/190-ar-configurable.patch)0
-rw-r--r--packages/ltrace/0.5.3/200-configure-hostos.patch (renamed from patches/ltrace/0.5.3/200-configure-hostos.patch)0
-rw-r--r--packages/ltrace/0.5.3/version.desc2
-rw-r--r--packages/ltrace/0.7.3/001-avoid-libstdc++.patch (renamed from patches/ltrace/0.7.3/001-avoid-libstdc++.patch)0
-rw-r--r--packages/ltrace/0.7.3/002-printf-p.patch (renamed from patches/ltrace/0.7.3/002-printf-p.patch)0
-rw-r--r--packages/ltrace/0.7.3/003-alpha-debug.h.patch (renamed from patches/ltrace/0.7.3/003-alpha-debug.h.patch)0
-rw-r--r--packages/ltrace/0.7.3/004-compile-warning.patch (renamed from patches/ltrace/0.7.3/004-compile-warning.patch)0
-rw-r--r--packages/ltrace/0.7.3/005-sparc-ftbfs.patch (renamed from patches/ltrace/0.7.3/005-sparc-ftbfs.patch)0
-rw-r--r--packages/ltrace/0.7.3/006-unexpected-breakpoint.patch (renamed from patches/ltrace/0.7.3/006-unexpected-breakpoint.patch)0
-rw-r--r--packages/ltrace/0.7.3/007-gcc-5.patch (renamed from patches/ltrace/0.7.3/007-gcc-5.patch)0
-rw-r--r--packages/ltrace/0.7.3/008-glibc-2.24.patch (renamed from patches/ltrace/0.7.3/008-glibc-2.24.patch)0
-rw-r--r--packages/ltrace/0.7.3/version.desc0
-rw-r--r--packages/ltrace/package.desc6
-rw-r--r--packages/m4/1.4.18/version.desc0
-rw-r--r--packages/m4/package.desc4
-rw-r--r--packages/make/3.81/version.desc1
-rw-r--r--packages/make/4.0/version.desc1
-rw-r--r--packages/make/4.1/version.desc1
-rw-r--r--packages/make/4.2.1/version.desc0
-rw-r--r--packages/make/package.desc4
-rw-r--r--packages/mingw-w64/package.desc4
-rw-r--r--packages/mingw-w64/v2.0.10/100-mingw64-malloc.patch (renamed from patches/mingw-w64/v4.0.6/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/v3.0.0/100-mingw64-malloc.patch (renamed from patches/mingw-w64/v4.0.5/100-mingw64-malloc.patch)0
-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.desc2
-rw-r--r--packages/mingw-w64/v3.1.0/100-mingw64-malloc.patch (renamed from patches/mingw-w64/v4.0.4/100-mingw64-malloc.patch)0
-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.desc2
-rw-r--r--packages/mingw-w64/v3.2.0/100-mingw64-malloc.patch (renamed from patches/mingw-w64/v4.0.2/100-mingw64-malloc.patch)0
-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.desc2
-rw-r--r--packages/mingw-w64/v3.3.0/100-mingw64-malloc.patch (renamed from patches/mingw-w64/v4.0.1/100-mingw64-malloc.patch)0
-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.desc2
-rw-r--r--packages/mingw-w64/v4.0.6/100-mingw64-malloc.patch (renamed from patches/mingw-w64/v4.0.0/100-mingw64-malloc.patch)0
-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/v4.0.6/version.desc0
-rw-r--r--packages/mingw-w64/v5.0.2/100-mingw64-malloc.patch (renamed from patches/mingw-w64/v5.0.2/100-mingw64-malloc.patch)0
-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/mingw-w64/v5.0.2/version.desc0
-rw-r--r--packages/mpc/0.7/version.desc2
-rw-r--r--packages/mpc/0.8.2/version.desc2
-rw-r--r--packages/mpc/0.9/version.desc2
-rw-r--r--packages/mpc/1.0.3/version.desc0
-rw-r--r--packages/mpc/package.desc6
-rw-r--r--packages/mpfr/2.4.2/100-sin_cos_underflow.patch (renamed from patches/mpfr/2.4.2/100-sin_cos_underflow.patch)0
-rw-r--r--packages/mpfr/2.4.2/110-longlong.h.patch (renamed from patches/mpfr/2.4.2/110-longlong.h.patch)0
-rw-r--r--packages/mpfr/2.4.2/120-gmp5.patch (renamed from patches/mpfr/2.4.2/120-gmp5.patch)0
-rw-r--r--packages/mpfr/2.4.2/version.desc1
-rw-r--r--packages/mpfr/3.0.1/110-asin_exprange.patch (renamed from patches/mpfr/3.0.1/110-asin_exprange.patch)0
-rw-r--r--packages/mpfr/3.0.1/120-rec_sqrt-carry.patch (renamed from patches/mpfr/3.0.1/120-rec_sqrt-carry.patch)0
-rw-r--r--packages/mpfr/3.0.1/130-atan-expo-range.patch (renamed from patches/mpfr/3.0.1/130-atan-expo-range.patch)0
-rw-r--r--packages/mpfr/3.0.1/140-texp-zero.patch (renamed from patches/mpfr/3.0.1/140-texp-zero.patch)0
-rw-r--r--packages/mpfr/3.0.1/version.desc1
-rw-r--r--packages/mpfr/3.1.5/version.desc0
-rw-r--r--packages/mpfr/package.desc5
-rw-r--r--packages/musl/1.1.15/version.desc1
-rw-r--r--packages/musl/1.1.16/version.desc0
-rw-r--r--packages/musl/package.desc3
-rw-r--r--packages/ncurses/6.0/100-ncurses-6.0-20150810.patch (renamed from patches/ncurses/6.0/100-ncurses-6.0-20150810.patch)0
-rw-r--r--packages/ncurses/6.0/110-ncurses-6.0-20150815.patch (renamed from patches/ncurses/6.0/110-ncurses-6.0-20150815.patch)0
-rw-r--r--packages/ncurses/6.0/120-ncurses-6.0-20150822.patch (renamed from patches/ncurses/6.0/120-ncurses-6.0-20150822.patch)0
-rw-r--r--packages/ncurses/6.0/130-ncurses-6.0-20150905.patch (renamed from patches/ncurses/6.0/130-ncurses-6.0-20150905.patch)0
-rw-r--r--packages/ncurses/6.0/140-ncurses-6.0-20150912.patch (renamed from patches/ncurses/6.0/140-ncurses-6.0-20150912.patch)0
-rw-r--r--packages/ncurses/6.0/150-ncurses-6.0-20150919.patch (renamed from patches/ncurses/6.0/150-ncurses-6.0-20150919.patch)0
-rw-r--r--packages/ncurses/6.0/160-ncurses-6.0-20150926.patch (renamed from patches/ncurses/6.0/160-ncurses-6.0-20150926.patch)0
-rw-r--r--packages/ncurses/6.0/170-ncurses-6.0-20151010.patch (renamed from patches/ncurses/6.0/170-ncurses-6.0-20151010.patch)0
-rw-r--r--packages/ncurses/6.0/180-ncurses-6.0-20151017.patch (renamed from patches/ncurses/6.0/180-ncurses-6.0-20151017.patch)0
-rw-r--r--packages/ncurses/6.0/190-ncurses-6.0-20151024.patch (renamed from patches/ncurses/6.0/190-ncurses-6.0-20151024.patch)0
-rw-r--r--packages/ncurses/6.0/200-ncurses-6.0-20151101.patch (renamed from patches/ncurses/6.0/200-ncurses-6.0-20151101.patch)0
-rw-r--r--packages/ncurses/6.0/210-ncurses-6.0-20151107.patch (renamed from patches/ncurses/6.0/210-ncurses-6.0-20151107.patch)0
-rw-r--r--packages/ncurses/6.0/999-create-run_tic.patch (renamed from patches/ncurses/6.0/999-create-run_tic.patch)0
-rw-r--r--packages/ncurses/6.0/version.desc0
-rw-r--r--packages/ncurses/package.desc3
-rw-r--r--packages/newlib-linaro/2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch (renamed from patches/newlib/linaro-2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib-linaro/2.1.0-2014.09/110-fix-eabihf.patch (renamed from patches/newlib/linaro-2.1.0-2014.09/110-fix-eabihf.patch)0
-rw-r--r--packages/newlib-linaro/2.1.0-2014.09/200-fix-mt-cflags.patch (renamed from patches/newlib/linaro-2.1.0-2014.09/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib-linaro/2.1.0-2014.09/version.desc2
-rw-r--r--packages/newlib-linaro/2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch (renamed from patches/newlib/linaro-2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib-linaro/2.2.0-2015.01/110-fix-eabihf.patch (renamed from patches/newlib/linaro-2.2.0-2015.01/110-fix-eabihf.patch)0
-rw-r--r--packages/newlib-linaro/2.2.0-2015.01/200-fix-mt-cflags.patch (renamed from patches/newlib/linaro-2.2.0-2015.01/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib-linaro/2.2.0-2015.01/version.desc1
-rw-r--r--packages/newlib-linaro/package.desc6
-rw-r--r--packages/newlib/1.17.0/110-fix-eabihf.patch (renamed from patches/newlib/1.17.0/110-fix-eabihf.patch)0
-rw-r--r--packages/newlib/1.17.0/200-fix-mt-cflags.patch (renamed from patches/newlib/1.17.0/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib/1.17.0/999-fix-arm-build.patch (renamed from patches/newlib/1.17.0/999-fix-arm-build.patch)0
-rw-r--r--packages/newlib/1.17.0/version.desc1
-rw-r--r--packages/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch (renamed from patches/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib/1.18.0/110-fix-eabihf.patch (renamed from patches/newlib/1.18.0/110-fix-eabihf.patch)0
-rw-r--r--packages/newlib/1.18.0/200-fix-mt-cflags.patch (renamed from patches/newlib/1.18.0/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib/1.18.0/version.desc1
-rw-r--r--packages/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch (renamed from patches/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib/1.19.0/110-fix-eabihf.patch (renamed from patches/newlib/1.19.0/110-fix-eabihf.patch)0
-rw-r--r--packages/newlib/1.19.0/200-fix-mt-cflags.patch (renamed from patches/newlib/1.19.0/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib/1.19.0/version.desc1
-rw-r--r--packages/newlib/1.20.0/100-fix-unaligned-access-memcpy-m68k.patch (renamed from patches/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib/1.20.0/110-fix-eabihf.patch (renamed from patches/newlib/1.20.0/110-fix-eabihf.patch)0
-rw-r--r--packages/newlib/1.20.0/200-fix-mt-cflags.patch (renamed from patches/newlib/1.20.0/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib/1.20.0/version.desc1
-rw-r--r--packages/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch (renamed from patches/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib/2.0.0/110-fix-eabihf.patch (renamed from patches/newlib/2.0.0/110-fix-eabihf.patch)0
-rw-r--r--packages/newlib/2.0.0/200-fix-mt-cflags.patch (renamed from patches/newlib/2.0.0/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib/2.0.0/version.desc1
-rw-r--r--packages/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch (renamed from patches/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib/2.1.0/110-fix-eabihf.patch (renamed from patches/newlib/2.1.0/110-fix-eabihf.patch)0
-rw-r--r--packages/newlib/2.1.0/200-fix-mt-cflags.patch (renamed from patches/newlib/2.1.0/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib/2.1.0/version.desc1
-rw-r--r--packages/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch (renamed from patches/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib/2.2.0.20151023/110-fix-eabihf.patch (renamed from patches/newlib/2.2.0.20151023/110-fix-eabihf.patch)0
-rw-r--r--packages/newlib/2.2.0.20151023/200-fix-mt-cflags.patch (renamed from patches/newlib/2.2.0.20151023/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib/2.2.0.20151023/version.desc1
-rw-r--r--packages/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch (renamed from patches/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib/2.3.0.20160226/110-fix-eabihf.patch (renamed from patches/newlib/2.3.0.20160226/110-fix-eabihf.patch)0
-rw-r--r--packages/newlib/2.3.0.20160226/200-fix-mt-cflags.patch (renamed from patches/newlib/2.3.0.20160226/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib/2.3.0.20160226/version.desc1
-rw-r--r--packages/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch (renamed from patches/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib/2.4.0.20161025/110-fix-eabihf.patch (renamed from patches/newlib/2.4.0.20161025/110-fix-eabihf.patch)0
-rw-r--r--packages/newlib/2.4.0.20161025/200-fix-mt-cflags.patch (renamed from patches/newlib/2.4.0.20161025/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib/2.4.0.20161025/version.desc1
-rw-r--r--packages/newlib/2.5.0.20170720/100-fix-unaligned-access-memcpy-m68k.patch (renamed from patches/newlib/1.20.0/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib/2.5.0.20170720/200-fix-mt-cflags.patch (renamed from patches/newlib/2.5.0.20170519/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib/2.5.0.20170720/version.desc0
-rw-r--r--packages/newlib/package.desc6
-rw-r--r--packages/strace/4.10/001_aarch64_rt_sigreturn.patch (renamed from patches/strace/4.10/001_aarch64_rt_sigreturn.patch)0
-rw-r--r--packages/strace/4.10/002_arm_mmap2.patch (renamed from patches/strace/4.10/002_arm_mmap2.patch)0
-rw-r--r--packages/strace/4.10/003_aarch64_arch_regs.patch (renamed from patches/strace/4.10/003_aarch64_arch_regs.patch)0
-rw-r--r--packages/strace/4.10/004_stat64-v.test.patch (renamed from patches/strace/4.10/004_stat64-v.test.patch)0
-rw-r--r--packages/strace/4.10/005_select_test.patch (renamed from patches/strace/4.10/005_select_test.patch)0
-rw-r--r--packages/strace/4.10/006_fix_aarch64_ioctl_decoding.patch (renamed from patches/strace/4.10/006_fix_aarch64_ioctl_decoding.patch)0
-rw-r--r--packages/strace/4.10/007_fix_bexecve64_test.patch (renamed from patches/strace/4.10/007_fix_bexecve64_test.patch)0
-rw-r--r--packages/strace/4.10/008_decode_mips_indirect_syscall.patch (renamed from patches/strace/4.10/008_decode_mips_indirect_syscall.patch)0
-rw-r--r--packages/strace/4.10/009-upstream-musl_includes.patch (renamed from patches/strace/4.10/009-upstream-musl_includes.patch)0
-rw-r--r--packages/strace/4.10/010-use-host-ioctl.patch (renamed from patches/strace/4.10/010-use-host-ioctl.patch)0
-rw-r--r--packages/strace/4.10/version.desc1
-rw-r--r--packages/strace/4.11/010-use-host-ioctl.patch (renamed from patches/strace/4.11/010-use-host-ioctl.patch)0
-rw-r--r--packages/strace/4.11/version.desc1
-rw-r--r--packages/strace/4.12/010-use-host-ioctl.patch (renamed from patches/strace/4.12/010-use-host-ioctl.patch)0
-rw-r--r--packages/strace/4.12/version.desc1
-rw-r--r--packages/strace/4.13/010-use-host-ioctl.patch (renamed from patches/strace/4.13/010-use-host-ioctl.patch)0
-rw-r--r--packages/strace/4.13/version.desc1
-rw-r--r--packages/strace/4.14/010-use-host-ioctl.patch (renamed from patches/strace/4.14/010-use-host-ioctl.patch)0
-rw-r--r--packages/strace/4.14/version.desc1
-rw-r--r--packages/strace/4.15/010-use-host-ioctl.patch (renamed from patches/strace/4.15/010-use-host-ioctl.patch)0
-rw-r--r--packages/strace/4.15/version.desc0
-rw-r--r--packages/strace/4.16/version.desc0
-rw-r--r--packages/strace/4.17/version.desc0
-rw-r--r--packages/strace/4.18/version.desc0
-rw-r--r--packages/strace/4.5.20/version.desc2
-rw-r--r--packages/strace/4.6/version.desc1
-rw-r--r--packages/strace/4.7/version.desc1
-rw-r--r--packages/strace/4.8/001-strace-4.8-glibc_2.18_build_fix-1.patch (renamed from patches/strace/4.8/001-strace-4.8-glibc_2.18_build_fix-1.patch)0
-rw-r--r--packages/strace/4.8/version.desc1
-rw-r--r--packages/strace/4.9/version.desc1
-rw-r--r--packages/strace/package.desc4
-rw-r--r--packages/uClibc-ng/1.0.25/0001-gdb8.patch64
-rw-r--r--packages/uClibc-ng/1.0.25/version.desc0
-rw-r--r--packages/uClibc-ng/1.0.26/0001-gdb8.patch64
-rw-r--r--packages/uClibc-ng/1.0.26/version.desc0
-rw-r--r--packages/uClibc-ng/package.desc5
-rw-r--r--packages/uClibc/0.9.33.2/100-m68k-ice.patch (renamed from patches/uClibc/0.9.33.2/100-m68k-ice.patch)0
-rw-r--r--packages/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch (renamed from patches/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch)0
-rw-r--r--packages/uClibc/0.9.33.2/300-fix-darwin-build.patch (renamed from patches/uClibc/0.9.33.2/300-fix-darwin-build.patch)0
-rw-r--r--packages/uClibc/0.9.33.2/400-arm-unwind.patch (renamed from patches/uClibc/0.9.33.2/400-arm-unwind.patch)0
-rw-r--r--packages/uClibc/0.9.33.2/500-no-install-D.patch (renamed from patches/uClibc/0.9.33.2/500-no-install-D.patch)0
-rw-r--r--packages/uClibc/0.9.33.2/600-prefer-multilib.patch (renamed from patches/uClibc/0.9.33.2/600-prefer-multilib.patch)0
-rw-r--r--packages/uClibc/0.9.33.2/998-dlopen-static.patch (renamed from patches/uClibc/0.9.33.2/998-dlopen-static.patch)0
-rw-r--r--packages/uClibc/0.9.33.2/999-make-olddefconfig.patch (renamed from patches/uClibc/0.9.33.2/999-make-olddefconfig.patch)0
-rw-r--r--packages/uClibc/0.9.33.2/version.desc1
-rw-r--r--packages/uClibc/package.desc8
-rw-r--r--packages/zlib/1.2.11/100-make-check-fail.patch (renamed from patches/zlib/1.2.11/100-make-check-fail.patch)0
-rw-r--r--packages/zlib/1.2.11/110-no-_wopen-cygwin.patch (renamed from patches/zlib/1.2.11/110-no-_wopen-cygwin.patch)0
-rw-r--r--packages/zlib/1.2.11/120-mingw-static-only.patch (renamed from patches/zlib/1.2.11/120-mingw-static-only.patch)0
-rw-r--r--packages/zlib/1.2.11/version.desc0
-rw-r--r--packages/zlib/package.desc3
-rw-r--r--patches/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch42
-rw-r--r--patches/gcc/4.8.5/111-alpha-bad-eh_frame.patch13
-rw-r--r--patches/gcc/6.3.0/1100-ubsan-fix-check-empty-string.patch28
-rw-r--r--patches/gcc/6.3.0/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch62
-rw-r--r--patches/gcc/6.3.0/871-xtensa-Fix-PR-target-78118.patch318
-rw-r--r--patches/gcc/6.3.0/872-xtensa-Fix-PR-target-78603.patch35
-rw-r--r--patches/gcc/6.3.0/873-gcc-xtensa-fix-fprintf-format-specifiers.patch74
-rw-r--r--patches/gdb/7.10.1/100-musl_fix.patch28
-rw-r--r--patches/gdb/7.10.1/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch39
-rw-r--r--patches/gdb/7.10.1/111-xtensa-make-sure-ar_base-is-initialized.patch35
-rw-r--r--patches/gdb/7.10.1/112-WIP-end-of-prologue-detection-hack.patch31
-rw-r--r--patches/gdb/7.10/10-setns-handling.patch52
-rw-r--r--patches/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch84
-rw-r--r--patches/glibc/2.12.1/102-fix-signed-shift-overlow.patch98
-rw-r--r--patches/glibc/2.12.1/104-unused-variables.patch165
-rw-r--r--patches/glibc/2.12.1/105-misleading-indentation.patch24
-rw-r--r--patches/glibc/2.12.1/106-dl-open-array-bounds.patch27
-rw-r--r--patches/glibc/2.12.1/300-macos-cross-rpcgen.patch32
-rw-r--r--patches/glibc/2.12.1/920-fix-rpc_parse-format.patch60
-rw-r--r--patches/glibc/2.12.1/940-nis-bogus-conditional.patch62
-rw-r--r--patches/glibc/2.13/950-initfini-ppc64.patch20
-rw-r--r--patches/glibc/2.14.1/103-dl-openat64-variadic.patch195
-rw-r--r--patches/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch44
-rw-r--r--patches/glibc/2.14.1/900-cpuid-include.patch628
-rw-r--r--patches/glibc/2.14/999-new-tools.patch69
-rw-r--r--patches/glibc/ports-2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch72
-rw-r--r--patches/glibc/ports-2.12.1/330-m68k-sys-user.patch97
-rw-r--r--patches/glibc/ports-2.12.1/440-alpha-cache-shape.patch13
-rw-r--r--patches/glibc/ports-2.12.1/460-alpha-fix-gcc-4.1-warnings.patch56
-rw-r--r--patches/glibc/ports-2.12.1/530-alpha-fix-rtld-fPIC.patch21
-rw-r--r--patches/glibc/ports-2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch374
-rw-r--r--patches/glibc/ports-2.12.1/580-nptl-lowlevellock.patch23
-rw-r--r--patches/glibc/ports-2.12.1/610-fpu-cw-mips.patch15
-rw-r--r--patches/glibc/ports-2.12.1/650-syslog.patch12
-rw-r--r--patches/glibc/ports-2.12.1/660-debug-readlink_chk-readklinkat_chk.patch24
-rw-r--r--patches/glibc/ports-2.12.1/670-support-hard-float-eabi.patch22
-rw-r--r--patches/glibc/ports-2.13/090-Fix-ARM-build-with-GCC-trunk.patch72
-rw-r--r--patches/glibc/ports-2.13/100-respect-env-CPPFLAGS.patch14
-rw-r--r--patches/glibc/ports-2.13/120-i386-x86_64-revert-clone-cfi.patch55
-rw-r--r--patches/glibc/ports-2.13/140-disable-ldconfig.patch16
-rw-r--r--patches/glibc/ports-2.13/150-queue-header-updates.patch85
-rw-r--r--patches/glibc/ports-2.13/160-manual-no-perl.patch24
-rw-r--r--patches/glibc/ports-2.13/170-localedef-fix-trampoline.patch53
-rw-r--r--patches/glibc/ports-2.13/180-resolv-dynamic.patch39
-rw-r--r--patches/glibc/ports-2.13/190-localedef-mmap.patch39
-rw-r--r--patches/glibc/ports-2.13/200-fadvise64_64.patch28
-rw-r--r--patches/glibc/ports-2.13/220-section-comments.patch24
-rw-r--r--patches/glibc/ports-2.13/230-no-inline-gmon.patch36
-rw-r--r--patches/glibc/ports-2.13/240-check_native-headers.patch17
-rw-r--r--patches/glibc/ports-2.13/260-assume-pipe2.patch40
-rw-r--r--patches/glibc/ports-2.13/270-china.patch32
-rw-r--r--patches/glibc/ports-2.13/280-new-valencian-locale.patch115
-rw-r--r--patches/glibc/ports-2.13/300-nscd-one-fork.patch40
-rw-r--r--patches/glibc/ports-2.13/310-hppa-nptl-carlos.patch246
-rw-r--r--patches/glibc/ports-2.13/330-m68k-sys-user.patch97
-rw-r--r--patches/glibc/ports-2.13/340-dl_execstack-PaX-support.patch66
-rw-r--r--patches/glibc/ports-2.13/350-pre20040117-pt_pax.patch32
-rw-r--r--patches/glibc/ports-2.13/360-tests-sandbox-libdl-paths.patch193
-rw-r--r--patches/glibc/ports-2.13/380-dont-build-timezone.patch14
-rw-r--r--patches/glibc/ports-2.13/400-alpha-xstat.patch15
-rw-r--r--patches/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch19
-rw-r--r--patches/glibc/ports-2.13/420-alpha-statfs.patch29
-rw-r--r--patches/glibc/ports-2.13/430-alpha-creat.patch14
-rw-r--r--patches/glibc/ports-2.13/440-alpha-cache-shape.patch13
-rw-r--r--patches/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch23
-rw-r--r--patches/glibc/ports-2.13/460-alpha-fix-gcc-4.1-warnings.patch56
-rw-r--r--patches/glibc/ports-2.13/470-alpha-feupdateenv.patch26
-rw-r--r--patches/glibc/ports-2.13/490-alpha_alpha-add-fdatasync-support.patch126
-rw-r--r--patches/glibc/ports-2.13/530-alpha-fix-rtld-fPIC.patch21
-rw-r--r--patches/glibc/ports-2.13/560-ppc-atomic.patch415
-rw-r--r--patches/glibc/ports-2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch374
-rw-r--r--patches/glibc/ports-2.13/580-nptl-lowlevellock.patch23
-rw-r--r--patches/glibc/ports-2.13/610-fpu-cw-mips.patch15
-rw-r--r--patches/glibc/ports-2.13/630-mips_shn_undef-hack.patch16
-rw-r--r--patches/glibc/ports-2.13/640-alpha-atfcts.patch12
-rw-r--r--patches/glibc/ports-2.13/670-support-hard-float-eabi.patch22
-rw-r--r--patches/glibc/ports-2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch72
-rw-r--r--patches/glibc/ports-2.14.1/330-m68k-sys-user.patch97
-rw-r--r--patches/glibc/ports-2.14.1/440-alpha-cache-shape.patch13
-rw-r--r--patches/glibc/ports-2.14.1/460-alpha-fix-gcc-4.1-warnings.patch56
-rw-r--r--patches/glibc/ports-2.14.1/530-alpha-fix-rtld-fPIC.patch21
-rw-r--r--patches/glibc/ports-2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch374
-rw-r--r--patches/glibc/ports-2.14.1/580-nptl-lowlevellock.patch23
-rw-r--r--patches/glibc/ports-2.14.1/610-fpu-cw-mips.patch15
-rw-r--r--patches/glibc/ports-2.14/090-Fix-ARM-build-with-GCC-trunk.patch72
-rw-r--r--patches/glibc/ports-2.14/330-m68k-sys-user.patch97
-rw-r--r--patches/glibc/ports-2.14/440-alpha-cache-shape.patch13
-rw-r--r--patches/glibc/ports-2.14/460-alpha-fix-gcc-4.1-warnings.patch56
-rw-r--r--patches/glibc/ports-2.14/530-alpha-fix-rtld-fPIC.patch21
-rw-r--r--patches/glibc/ports-2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch374
-rw-r--r--patches/glibc/ports-2.14/580-nptl-lowlevellock.patch23
-rw-r--r--patches/glibc/ports-2.14/610-fpu-cw-mips.patch15
-rw-r--r--patches/glibc/ports-2.15/090-Fix-ARM-build-with-GCC-trunk.patch72
-rw-r--r--patches/glibc/ports-2.15/091-libmemusage-link-failure.patch19
-rw-r--r--patches/glibc/ports-2.15/330-m68k-sys-user.patch97
-rw-r--r--patches/glibc/ports-2.15/440-alpha-cache-shape.patch13
-rw-r--r--patches/glibc/ports-2.15/460-alpha-fix-gcc-4.1-warnings.patch56
-rw-r--r--patches/glibc/ports-2.15/530-alpha-fix-rtld-fPIC.patch21
-rw-r--r--patches/glibc/ports-2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch374
-rw-r--r--patches/glibc/ports-2.15/580-nptl-lowlevellock.patch23
-rw-r--r--patches/glibc/ports-2.15/610-fpu-cw-mips.patch15
-rw-r--r--patches/glibc/ports-2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch54
-rw-r--r--patches/glibc/ports-2.16.0/330-m68k-sys-user.patch97
-rw-r--r--patches/glibc/ports-2.16.0/440-alpha-cache-shape.patch13
-rw-r--r--patches/glibc/ports-2.16.0/460-alpha-fix-gcc-4.1-warnings.patch56
-rw-r--r--patches/glibc/ports-2.16.0/530-alpha-fix-rtld-fPIC.patch21
-rw-r--r--patches/glibc/ports-2.16.0/580-nptl-lowlevellock.patch23
-rw-r--r--patches/glibc/ports-2.16.0/610-fpu-cw-mips.patch15
-rw-r--r--patches/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch33
-rw-r--r--patches/gmp/4.3.0/110-unbounded-alloc.patch31
-rw-r--r--patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch33
-rw-r--r--patches/gmp/4.3.1/110-unbounded-alloc.patch31
-rw-r--r--patches/gmp/5.0.1/100-fix-tests-ABI-long-long.patch35
-rw-r--r--patches/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch38
-rw-r--r--patches/gmp/5.0.1/120-fix-r0-clobbering-issue.patch77
-rw-r--r--patches/gmp/5.0.2/110-get-mpn_sub_1-size-argument-right.patch38
-rw-r--r--patches/gmp/5.1.1/100-fix-bulldozer-piledriver.patch21
-rw-r--r--patches/gmp/5.1.1/110-mpz_powm_ui.patch39
-rw-r--r--patches/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch164
-rw-r--r--patches/gmp/5.1.1/130-do-not-clobber-f16-f18.patch73
-rw-r--r--patches/gmp/6.1.0/100-fix-broadwell-skylake.patch59
-rw-r--r--patches/libelf/0.8.12/100-fix-64-bit-detection.patch24
-rw-r--r--patches/ltrace/0.5.2/100-allow-cross-compile.patch77
-rw-r--r--patches/ltrace/0.5.2/110-alpha-support.patch11
-rw-r--r--patches/ltrace/0.5.2/120-debian-ltrace-0.5.2-2.patch240
-rw-r--r--patches/ltrace/0.5.2/130-fix-build-with-exotic-linux-host-OS.patch26
-rw-r--r--patches/mingw-w64/v2.0.7/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v2.0.8/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v2.0.9/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v3.0.0/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v3.1.0/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v3.2.0/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v3.3.0/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v5.0.0/100-mingw64-malloc.patch55
-rw-r--r--patches/mingw-w64/v5.0.1/100-mingw64-malloc.patch55
-rw-r--r--patches/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff14
-rw-r--r--patches/mpfr/2.4.0/100-printf-hh-ll.patch359
-rw-r--r--patches/mpfr/2.4.0/110-mpfr_snprintf.patch176
-rw-r--r--patches/mpfr/2.4.1/100-remainder-neg.patch123
-rw-r--r--patches/mpfr/2.4.1/110-assert.patch45
-rw-r--r--patches/mpfr/2.4.1/120-cast-to-void-ptr.patch25
-rw-r--r--patches/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch45
-rw-r--r--patches/mpfr/2.4.1/140-zeta_ui-shift.patch47
-rw-r--r--patches/mpfr/2.4.1/150-test-tmul.patch40
-rw-r--r--patches/mpfr/3.0.0/110-mpfr_out_str.patch220
-rw-r--r--patches/mpfr/3.0.0/120-alloca.patch377
-rw-r--r--patches/mpfr/3.0.0/130-gamma_underflow.patch88
-rw-r--r--patches/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch239
-rw-r--r--patches/mpfr/3.0.0/150-tcan_round.patch45
-rw-r--r--patches/mpfr/3.0.0/160-mpfr_sub1.patch628
-rw-r--r--patches/mpfr/3.0.0/170-mpfr_set_ld.patch155
-rw-r--r--patches/mpfr/3.0.0/180-macros.patch193
-rw-r--r--patches/mpfr/3.1.0/110-mpfr_unlikely.patch50
-rw-r--r--patches/mpfr/3.1.0/120-lib-search-path.patch96
-rw-r--r--patches/mpfr/3.1.0/130-vasprintf.patch247
-rw-r--r--patches/mpfr/3.1.0/140-gmp41compat.patch166
-rw-r--r--patches/mpfr/3.1.0/150-logging-freeze.patch69
-rw-r--r--patches/mpfr/3.1.0/160-logging-varfmt.patch45
-rw-r--r--patches/mpfr/3.1.0/170-large-prec.patch591
-rw-r--r--patches/mpfr/3.1.0/180-__gmp_const.patch52
-rw-r--r--patches/mpfr/3.1.0/190-gamma-underflow.patch93
-rw-r--r--patches/mpfr/3.1.0/200-gamma-overunderflow.patch487
-rw-r--r--patches/mpfr/3.1.1/110-get_decimal64.patch235
-rw-r--r--patches/mpfr/3.1.1/120-strtofr-ternary-value.patch170
-rw-r--r--patches/mpfr/3.1.1/130-gmp51-compat.patch98
-rw-r--r--patches/mpfr/3.1.2/110-exp_2.patch45
-rw-r--r--patches/mpfr/3.1.2/120-fits-smallneg.patch605
-rw-r--r--patches/mpfr/3.1.2/130-clang-divby0.patch129
-rw-r--r--patches/mpfr/3.1.2/140-printf-alt0.patch84
-rw-r--r--patches/mpfr/3.1.2/150-custom_init_set.patch42
-rw-r--r--patches/mpfr/3.1.2/160-li2-return.patch43
-rw-r--r--patches/mpfr/3.1.2/170-exp3.patch71
-rw-r--r--patches/mpfr/3.1.2/180-gmp6-compat.patch254
-rw-r--r--patches/mpfr/3.1.2/190-div-overflow.patch166
-rw-r--r--patches/mpfr/3.1.2/200-vasprintf.patch138
-rw-r--r--patches/mpfr/3.1.2/210-strtofr.patch49
-rw-r--r--patches/mpfr/3.1.3/110-lngamma-and-doc.patch1117
-rw-r--r--patches/mpfr/3.1.3/120-muldiv-2exp-overflow.patch161
-rw-r--r--patches/mpfr/3.1.3/130-muldiv-2exp-underflow.patch217
-rw-r--r--patches/mpfr/3.1.3/140-frexp.patch204
-rw-r--r--patches/mpfr/3.1.3/150-divhigh-basecase.patch131
-rw-r--r--patches/mpfr/3.1.3/160-jn.patch71
-rw-r--r--patches/mpfr/3.1.3/170-zeta.patch125
-rw-r--r--patches/mpfr/3.1.3/180-sqrt.patch97
-rw-r--r--patches/mpfr/3.1.3/190-si-ops.patch107
-rw-r--r--patches/mpfr/3.1.3/200-can_round.patch413
-rw-r--r--patches/mpfr/3.1.3/210-fits.patch584
-rw-r--r--patches/mpfr/3.1.3/220-root.patch621
-rw-r--r--patches/mpfr/3.1.3/230-gamma.patch77
-rw-r--r--patches/mpfr/3.1.3/240-rem1.patch337
-rw-r--r--patches/mpfr/3.1.3/250-agm-eq.patch105
-rw-r--r--patches/mpfr/3.1.3/260-sum.patch223
-rw-r--r--patches/mpfr/3.1.3/270-cmp_d.patch219
-rw-r--r--patches/strace/4.5.18/110-dont-use-REG_SYSCALL-for-sh.patch11
-rw-r--r--patches/strace/4.5.18/130-fix-disabled-largefile-syscalls.patch22
-rw-r--r--patches/strace/4.5.18/140-statfs64-check.patch53
-rw-r--r--patches/strace/4.5.18/160-fix-check-for-linux-netlink.patch19
-rw-r--r--patches/strace/4.5.18/160-undef-syscall.patch42
-rw-r--r--patches/strace/4.5.18/170-no_cachectl.patch35
-rw-r--r--patches/strace/4.5.18/180-arm-EABI-syscalls.patch23
-rw-r--r--patches/strace/4.5.18/900-autoreconf.patch99
-rw-r--r--patches/strace/4.5.19/120-fix-disabled-largefile-syscalls.patch22
-rw-r--r--patches/strace/4.5.19/130-statfs64-check.patch53
-rw-r--r--patches/strace/4.5.19/150-undef-syscall.patch42
-rw-r--r--patches/strace/4.5.19/160-fix-check-for-linux-netlink.patch19
-rw-r--r--patches/strace/4.5.19/170-update-configure.patch85
-rw-r--r--patches/uClibc-ng/1.0.20/100-xtensa-static-link.patch34
-rw-r--r--patches/uClibc-ng/1.0.20/110-has-lfs.patch31
-rw-r--r--patches/uClibc-ng/1.0.20/500-no-install-D.patch30
-rw-r--r--patches/uClibc-ng/1.0.20/600-prefer-multilib.patch46
-rw-r--r--patches/uClibc-ng/1.0.20/700-features.h-c11.patch61
-rw-r--r--patches/uClibc-ng/1.0.21/110-has-lfs.patch31
-rw-r--r--patches/uClibc-ng/1.0.21/120-module.patch50
-rw-r--r--patches/uClibc-ng/1.0.21/500-no-install-D.patch30
-rw-r--r--patches/uClibc-ng/1.0.21/600-prefer-multilib.patch46
-rw-r--r--patches/uClibc-ng/1.0.21/700-features.h-c11.patch61
-rw-r--r--patches/uClibc-ng/1.0.22/500-no-install-D.patch30
-rw-r--r--patches/uClibc-ng/1.0.22/600-prefer-multilib.patch46
-rw-r--r--patches/uClibc-ng/1.0.22/700-features.h-c11.patch61
-rw-r--r--patches/uClibc-ng/1.0.23/700-features.h-c11.patch61
-rw-r--r--patches/uClibc-ng/1.0.24/700-features.h-c11.patch61
-rw-r--r--samples/aarch64-rpi3-linux-gnu/crosstool.config11
-rw-r--r--samples/aarch64-rpi3-linux-gnu/reported.by3
-rw-r--r--samples/aarch64-rpi3-linux-gnueabi/crosstool.config12
-rw-r--r--samples/aarch64-rpi3-linux-gnueabi/reported.by3
-rw-r--r--samples/aarch64-unknown-linux-android/crosstool.config7
-rw-r--r--samples/aarch64-unknown-linux-gnu/crosstool.config10
-rw-r--r--samples/aarch64-unknown-linux-gnu/reported.by3
-rw-r--r--samples/aarch64-unknown-linux-gnueabi/crosstool.config11
-rw-r--r--samples/aarch64-unknown-linux-gnueabi/reported.by3
-rw-r--r--samples/aarch64-unknown-linux-uclibc/crosstool.config14
-rw-r--r--samples/aarch64-unknown-linux-uclibc/reported.by (renamed from samples/aarch64-unknown-linux-uclibcgnueabi/reported.by)0
-rw-r--r--samples/aarch64-unknown-linux-uclibcgnueabi/crosstool.config14
-rw-r--r--samples/alphaev56-unknown-linux-gnu/crosstool.config3
-rw-r--r--samples/alphaev67-unknown-linux-gnu/crosstool.config3
-rw-r--r--samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config6
-rw-r--r--samples/arm-cortex_a15-linux-gnueabihf/crosstool.config12
-rw-r--r--samples/arm-cortex_a8-linux-gnueabi/crosstool.config13
-rw-r--r--samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config15
-rw-r--r--samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config15
-rw-r--r--samples/arm-multilib-linux-uclibcgnueabi/crosstool.config10
-rw-r--r--samples/arm-nano-eabi/crosstool.config2
-rw-r--r--samples/arm-unknown-eabi/crosstool.config2
-rw-r--r--samples/arm-unknown-linux-gnueabi/crosstool.config13
-rw-r--r--samples/arm-unknown-linux-musleabi/crosstool.config12
-rw-r--r--samples/arm-unknown-linux-uclibcgnueabi/crosstool.config14
-rw-r--r--samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config14
-rw-r--r--samples/armeb-unknown-eabi/crosstool.config6
-rw-r--r--samples/armeb-unknown-linux-gnueabi/crosstool.config13
-rw-r--r--samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config14
-rw-r--r--samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config7
-rw-r--r--samples/armv6-rpi-linux-gnueabi/crosstool.config18
-rw-r--r--samples/armv7-rpi2-linux-gnueabihf/crosstool.config9
-rw-r--r--samples/armv8-rpi3-linux-gnueabihf/crosstool.config9
-rw-r--r--samples/avr/crosstool.config4
-rw-r--r--samples/i586-geode-linux-uclibc/crosstool.config13
-rw-r--r--samples/i686-centos6-linux-gnu/crosstool.config9
-rw-r--r--samples/i686-centos7-linux-gnu/crosstool.config9
-rw-r--r--samples/i686-nptl-linux-gnu/crosstool.config13
-rw-r--r--samples/i686-ubuntu12.04-linux-gnu/crosstool.config9
-rw-r--r--samples/i686-ubuntu14.04-linux-gnu/crosstool.config9
-rw-r--r--samples/i686-ubuntu16.04-linux-gnu/crosstool.config9
-rw-r--r--samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config4
-rw-r--r--samples/i686-w64-mingw32/crosstool.config4
-rw-r--r--samples/m68k-unknown-elf/crosstool.config10
-rw-r--r--samples/m68k-unknown-uclinux-uclibc/crosstool.config4
-rw-r--r--samples/mips-ar2315-linux-gnu/crosstool.config9
-rw-r--r--samples/mips-malta-linux-gnu/crosstool.config7
-rw-r--r--samples/mips-unknown-elf/crosstool.config6
-rw-r--r--samples/mips-unknown-linux-uclibc/crosstool.config11
-rw-r--r--samples/mips64el-multilib-linux-uclibc/crosstool.config6
-rw-r--r--samples/mipsel-multilib-linux-gnu/crosstool.config11
-rw-r--r--samples/mipsel-sde-elf/crosstool.config6
-rw-r--r--samples/mipsel-unknown-linux-gnu/crosstool.config11
-rw-r--r--samples/msp430-unknown-elf/crosstool.config6
-rw-r--r--samples/nios2-altera-linux-gnu/crosstool.config7
-rw-r--r--samples/nios2-altera-linux-gnu/reported.by3
-rw-r--r--samples/nios2-unknown-elf/crosstool.config4
-rw-r--r--samples/nios2-unknown-elf/reported.by3
-rw-r--r--samples/powerpc-405-linux-gnu/crosstool.config6
-rw-r--r--samples/powerpc-860-linux-gnu/crosstool.config8
-rw-r--r--samples/powerpc-e300c3-linux-gnu/crosstool.config4
-rw-r--r--samples/powerpc-e500v2-linux-gnuspe/crosstool.config9
-rw-r--r--samples/powerpc-unknown-linux-gnu/crosstool.config10
-rw-r--r--samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/crosstool.config4
-rw-r--r--samples/powerpc-unknown-linux-uclibc/crosstool.config13
-rw-r--r--samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config10
-rw-r--r--samples/powerpc64-multilib-linux-gnu/crosstool.config6
-rw-r--r--samples/powerpc64-unknown-linux-gnu/crosstool.config6
-rw-r--r--samples/powerpc64le-unknown-linux-gnu/crosstool.config6
-rw-r--r--samples/s390-ibm-linux-gnu/crosstool.config4
-rw-r--r--samples/s390x-ibm-linux-gnu/crosstool.config4
-rw-r--r--samples/sh-multilib-linux-gnu/crosstool.config10
-rw-r--r--samples/sh-multilib-linux-gnu/reported.by (renamed from samples/sh4-multilib-linux-gnu/reported.by)0
-rw-r--r--samples/sh-multilib-linux-uclibc/crosstool.config11
-rw-r--r--samples/sh-multilib-linux-uclibc/reported.by (renamed from samples/sh4-multilib-linux-uclibc/reported.by)0
-rw-r--r--samples/sh-unknown-elf/crosstool.config5
-rw-r--r--samples/sh-unknown-elf/reported.by3
-rw-r--r--samples/sh4-multilib-linux-gnu/crosstool.config9
-rw-r--r--samples/sh4-multilib-linux-uclibc/crosstool.config11
-rw-r--r--samples/sh4-unknown-linux-gnu/crosstool.config7
-rw-r--r--samples/sh4-unknown-linux-gnu/reported.by3
-rw-r--r--samples/sparc-leon-linux-uclibc/crosstool.config15
-rw-r--r--samples/sparc-unknown-linux-gnu/crosstool.config4
-rw-r--r--samples/sparc64-multilib-linux-gnu/crosstool.config4
-rw-r--r--samples/x86_64-centos6-linux-gnu/crosstool.config9
-rw-r--r--samples/x86_64-centos7-linux-gnu/crosstool.config9
-rw-r--r--samples/x86_64-multilib-linux-gnu/crosstool.config9
-rw-r--r--samples/x86_64-multilib-linux-musl/crosstool.config10
-rw-r--r--samples/x86_64-multilib-linux-uclibc,powerpc-unknown-elf/crosstool.config9
-rw-r--r--samples/x86_64-multilib-linux-uclibc/crosstool.config11
-rw-r--r--samples/x86_64-ubuntu12.04-linux-gnu/crosstool.config9
-rw-r--r--samples/x86_64-ubuntu14.04-linux-gnu/crosstool.config9
-rw-r--r--samples/x86_64-ubuntu16.04-linux-gnu/crosstool.config9
-rw-r--r--samples/x86_64-unknown-linux-gnu/crosstool.config9
-rw-r--r--samples/x86_64-unknown-linux-uclibc/crosstool.config11
-rw-r--r--samples/x86_64-w64-mingw32,arm-cortexa9_neon-linux-gnueabihf/crosstool.config16
-rw-r--r--samples/x86_64-w64-mingw32,x86_64-pc-linux-gnu/crosstool.config14
-rw-r--r--samples/x86_64-w64-mingw32/crosstool.config4
-rw-r--r--samples/xtensa-fsf-linux-uclibc/crosstool.config9
-rw-r--r--scripts/build/arch.sh6
-rw-r--r--scripts/build/arch/arm.sh4
-rw-r--r--scripts/build/arch/microblaze.sh15
-rw-r--r--scripts/build/arch/nios2.sh10
-rw-r--r--scripts/build/arch/sh.sh160
-rw-r--r--scripts/build/arch/sparc.sh2
-rw-r--r--scripts/build/arch/x86.sh2
-rw-r--r--scripts/build/arch/xtensa.sh61
-rw-r--r--scripts/build/binutils/binutils.sh51
-rw-r--r--scripts/build/cc.sh58
-rw-r--r--scripts/build/cc/100-gcc.sh1178
-rw-r--r--scripts/build/cc/gcc.sh1176
-rw-r--r--scripts/build/companion_libs/050-zlib.sh10
-rw-r--r--scripts/build/companion_libs/100-gmp.sh13
-rw-r--r--scripts/build/companion_libs/110-mpfr.sh10
-rw-r--r--scripts/build/companion_libs/121-isl.sh12
-rw-r--r--scripts/build/companion_libs/130-cloog.sh14
-rw-r--r--scripts/build/companion_libs/140-mpc.sh9
-rw-r--r--scripts/build/companion_libs/200-libelf.sh10
-rw-r--r--scripts/build/companion_libs/210-expat.sh8
-rw-r--r--scripts/build/companion_libs/220-ncurses.sh10
-rw-r--r--scripts/build/companion_libs/320-libiconv.sh8
-rw-r--r--scripts/build/companion_libs/330-gettext.sh8
-rw-r--r--scripts/build/companion_tools.sh2
-rw-r--r--scripts/build/companion_tools/050-make.sh9
-rw-r--r--scripts/build/companion_tools/100-m4.sh8
-rw-r--r--scripts/build/companion_tools/200-autoconf.sh9
-rw-r--r--scripts/build/companion_tools/300-automake.sh9
-rw-r--r--scripts/build/companion_tools/400-libtool.sh9
-rw-r--r--scripts/build/debug.sh2
-rw-r--r--scripts/build/debug/200-duma.sh19
-rw-r--r--scripts/build/debug/300-gdb.sh38
-rw-r--r--scripts/build/debug/400-ltrace.sh15
-rw-r--r--scripts/build/debug/500-strace.sh10
-rw-r--r--scripts/build/internals.sh11
-rw-r--r--scripts/build/kernel/linux.sh77
-rw-r--r--scripts/build/libc/avr-libc.sh38
-rw-r--r--scripts/build/libc/bionic.sh22
-rw-r--r--scripts/build/libc/glibc.sh251
-rw-r--r--scripts/build/libc/mingw-w64.sh215
-rw-r--r--scripts/build/libc/mingw.sh227
-rw-r--r--scripts/build/libc/musl.sh14
-rw-r--r--scripts/build/libc/newlib.sh36
-rw-r--r--scripts/build/libc/uClibc.sh87
-rw-r--r--scripts/build/test_suite.sh3
-rw-r--r--scripts/build/test_suite/gcc.sh2
-rw-r--r--scripts/crosstool-NG.sh.in86
-rw-r--r--scripts/functions1321
-rw-r--r--scripts/saveSample.sh.in4
-rw-r--r--scripts/showSamples.sh33
-rw-r--r--scripts/upgrade.sed25
1664 files changed, 17553 insertions, 29975 deletions
diff --git a/.gitignore b/.gitignore
index d12732a..225009c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,12 +11,15 @@ paths.*
!paths.in
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/.travis.yml b/.travis.yml
index bb8d94a..1be7a57 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,7 +40,7 @@ install:
env:
- CT_SAMPLE=arm-unknown-eabi
- CT_SAMPLE=arm-unknown-linux-musleabi
- - CT_SAMPLE=aarch64-unknown-linux-gnueabi
+ - CT_SAMPLE=aarch64-unknown-linux-gnu
- CT_SAMPLE=mips64el-multilib-linux-uclibc
- CT_SAMPLE=powerpc-e500v2-linux-gnuspe
- CT_SAMPLE=x86_64-unknown-linux-uclibc
diff --git a/Makefile.in b/Makefile.in
index 2b77d5d..33d9666 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -148,7 +148,7 @@ distclean: clean
$(call __silent_rm,Makefile kconfig/Makefile config/configure.in)
mrproper: distclean
- $(call __silent_rmdir,autom4te.cache config/gen)
+ $(call __silent_rmdir,autom4te.cache config/gen config/versions)
$(call __silent_rm,config.log config.status configure)
uninstall: real-uninstall
@@ -272,7 +272,7 @@ install-lib: $(DESTDIR)$(libdir) \
install-lib-main \
install-lib-samples
-LIB_SUB_DIR := config contrib patches scripts
+LIB_SUB_DIR := config contrib packages scripts
$(patsubst %,install-lib-%-copy,$(LIB_SUB_DIR)): install-lib-%-copy: $(DESTDIR)$(libdir)
$(call __silent,INSTDIR,$*)tar cf - --exclude='*.sh.in' --exclude='*.in.in' --exclude=.gitignore $* \
|(cd "$(DESTDIR)$(libdir)"; tar xf -)
diff --git a/TODO b/TODO
index 58694c2..eabd20b 100644
--- a/TODO
+++ b/TODO
@@ -2,7 +2,24 @@ 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
+ [ ] use gnulib in m4, gettext, libiconv, libtool
+ [ ] autoconf-archive
+ [ ] 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
[ ] 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
[ ] Use 'cc' rather than 'gcc' on the host
[ ] Detect in configure what the default value is
@@ -17,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
@@ -83,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 ab493dd..45fad9c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,10 +1,725 @@
-#!/bin/sh
-set -e
+#!/bin/bash
-printf "Running autoconf...\n"
-autoconf -Wall --force
+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:
+#
+# The template file is processed line by line, with @@VAR@@ placeholders
+# being replaced with a value of the VAR variable.
+# Special lines start with '#!' and a keyword:
+#
+# #!//
+# Comment, the rest of the line is ignored
+# #!if COND
+# Conditional: the lines until the matching #!end-if are processed
+# only if the conditional COND evaluates to true.
+# #!foreach NAME
+# Iterate over NAME entities (the iterator must be set up first
+# using the set_iter function), processing the lines until the matching
+# #!end-foreach line.
+
+declare -A info
+
+debug()
+{
+ if [ -n "${DEBUG}" ]; then
+ echo "DEBUG :: $@" >&2
+ fi
+}
+
+msg()
+{
+ if [ -z "${QUIET}" ]; then
+ echo "INFO :: $@" >&2
+ fi
+}
+
+warn()
+{
+ echo "WARN :: $@" >&2
+}
+
+error()
+{
+ echo "ERROR :: $@" >&2
+ exit 1
+}
+
+find_end()
+{
+ local token="${1}"
+ local count=1
+
+ # Skip first line, we know it has the proper '#!' command on it
+ endline=$[l + 1]
+ while [ "${endline}" -le "${end}" ]; do
+ case "${tlines[${endline}]}" in
+ "#!${token} "*)
+ count=$[count + 1]
+ ;;
+ "#!end-${token}")
+ count=$[count - 1]
+ ;;
+ esac
+ if [ "${count}" = 0 ]; then
+ return
+ fi
+ endline=$[endline + 1]
+ done
+ error "line ${l}: '${token}' token is unpaired"
+}
+
+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="$*"
+ local endline
+
+ find_end "if"
+ if eval "${cond}"; then
+ debug "True conditional '${cond}' at lines ${l}..${endline}"
+ run_lines $[l + 1] $[endline - 1]
+ else
+ debug "False conditional '${cond}' at lines ${l}..${endline}"
+ fi
+ lnext=$[endline + 1]
+ debug "Continue at line ${lnext}"
+}
+
+do_foreach()
+{
+ local var="${1}"
+ local -A saveinfo
+ local v k
+
+ shift
+ if [ "`type -t enter_${var}`" != "function" ]; then
+ error "No parameter setup routine for iterator over '${var}'"
+ fi
+ for v in ${info[iter_${var}]}; do
+ # This works in bash 4.4, but not in bash 4.3:
+ # local saveinfo=`declare -p info`
+ # ...
+ # eval "${saveinfo}"
+ # Therefore, need to save key-by-key
+ saveinfo=()
+ for k in "${!info[@]}"; do
+ saveinfo["${k}"]=${info["${k}"]}
+ done
+ if eval "enter_${var} ${v}"; then
+ eval "$@"
+ fi
+ info=()
+ for k in "${!saveinfo[@]}"; do
+ info["${k}"]=${saveinfo["${k}"]}
+ done
+ done
+}
+
+run_foreach()
+{
+ 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_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 vp pp p val
+
+ debug "Running lines ${start}..${end}"
+ l=${start}
+ while [ "${l}" -le "${end}" ]; do
+ lnext=$[l+1]
+ s="${tlines[${l}]}"
+ # Expand @@foo@@ to ${info[foo]}. First escape variables/backslashes for evals below.
+ s="${s//\\/\\\\}"
+ s="${s//\$/\\\$}"
+ s1=
+ while [ -n "${s}" ]; do
+ case "${s}" in
+ *@@*@@*)
+ 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
+ # 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#*@@*@@}"
+ ;;
+ *@@*)
+ error "line ${l}: non-paired @@ markers"
+ ;;
+ *)
+ s1="${s1}${s}"
+ break
+ ;;
+ esac
+ done
+ s=${s1}
+
+ debug "Evaluate: ${s}"
+ case "${s}" in
+ "#!if "*)
+ run_if ${s#* }
+ ;;
+ "#!foreach "*)
+ run_foreach ${s#* }
+ ;;
+ "#!//"*)
+ # Comment, do nothing
+ ;;
+ "#!"*)
+ error "line ${l}: unrecognized command"
+ ;;
+ *)
+ # Not a special command
+ eval "echo \"${s//\"/\\\"}\""
+ ;;
+ esac
+ l=${lnext}
+ done
+}
+
+run_template()
+{
+ local -a tlines
+ local src="${1}"
+
+ if [ ! -r "${src}" ]; then
+ error "Template '${src}' not found"
+ fi
+ debug "Running template ${src}"
+ mapfile -O 1 -t tlines < "${src}"
+ run_lines 1 ${#tlines[@]}
+}
+
+########################################
+
+# Leave only relevant portion of the string
+relevantize()
+{
+ local p pb pa vx
+ local v="${1}"
+ shift
+
+ # Find the first match and contract to the matching portion.
+ for p in "$@"; do
+ pb=${p%|*}
+ pa=${p#*|}
+ eval "vx=\${v#${pb}${pa}}"
+ if [ "${v%${pa}${vx}}" != "${v}" ]; then
+ v=${v%${pa}${vx}}
+ break
+ fi
+ done
+ echo "${v}"
+}
+
+# Helper for cmp_versions: compare an upstream/debian portion of
+# a version. Returns 0 if equal, otherwise echoes "-1" or "1" and
+# returns 1.
+equal_versions()
+{
+ local v1="${1}"
+ local v2="${2}"
+ local p1 p2
+
+ # Compare alternating non-numerical/numerical portions, until
+ # non-equal portion is found or either string is exhausted.
+ while [ -n "${v1}" -a -n "${v2}" ]; do
+ # Find non-numerical portions and compare lexicographically
+ p1="${v1%%[0-9]*}"
+ p2="${v2%%[0-9]*}"
+ v1="${v1#${p1}}"
+ v2="${v2#${p2}}"
+ #debug "lex [${p1}] v [${p2}]"
+ if [ "${p1}" \< "${p2}" ]; then
+ echo "-1"
+ return 1
+ elif [ "${p1}" \> "${p2}" ]; then
+ echo "1"
+ return 1
+ fi
+ #debug "rem [${v1}] v [${v2}]"
+ # Find numerical portions and compare numerically
+ p1="${v1%%[^0-9]*}"
+ p2="${v2%%[^0-9]*}"
+ v1="${v1#${p1}}"
+ v2="${v2#${p2}}"
+ #debug "num [${p1}] v [${p2}]"
+ if [ "${p1:-0}" -lt "${p2:-0}" ]; then
+ echo "-1"
+ return 1
+ elif [ "${p1:-0}" -gt "${p2:-0}" ]; then
+ echo "1"
+ return 1
+ fi
+ #debug "rem [${v1}] v [${v2}]"
+ done
+ if [ -n "${v1}" ]; then
+ echo "1"
+ return 1
+ elif [ -n "${v2}" ]; then
+ echo "-1"
+ return 1
+ fi
+ return 0
+}
+
+# Compare two version strings, similar to sort -V. But we don't
+# want to depend on GNU sort availability on the host.
+# See http://www.debian.org/doc/debian-policy/ch-controlfields.html
+# for description of what the version is expected to be.
+# Returns "-1", "0" or "1" if first version is earlier, same or
+# later than the second.
+cmp_versions()
+{
+ local v1="${1}"
+ local v2="${2}"
+ local e1=0 e2=0 u1 u2 d1=0 d2=0
+
+ # Case-insensitive comparison
+ v1="${v1^^}"
+ v2="${v2^^}"
+
+ # Find if the versions contain epoch part
+ case "${v1}" in
+ *:*)
+ e1="${v1%%:*}"
+ v1="${v1#*:}"
+ ;;
+ esac
+ case "${v2}" in
+ *:*)
+ e2="${v2%%:*}"
+ v2="${v2#*:}"
+ ;;
+ esac
+
+ # Compare epochs numerically
+ if [ "${e1}" -lt "${e2}" ]; then
+ echo "-1"
+ return
+ elif [ "${e1}" -gt "${e2}" ]; then
+ echo "1"
+ return
+ fi
+
+ # Find if the version contains a "debian" part.
+ # v1/v2 will now contain "upstream" part.
+ case "${v1}" in
+ *-*)
+ d1=${v1##*-}
+ v1=${v1%-*}
+ ;;
+ esac
+ case "${v2}" in
+ *-*)
+ d2=${v2##*-}
+ v2=${v2%-*}
+ ;;
+ esac
+
+ # Compare upstream
+ if equal_versions "${v1}" "${v2}" && equal_versions "${d1}" "${d2}"; then
+ echo "0"
+ fi
+}
+
+# Sort versions, descending
+sort_versions()
+{
+ local sorted
+ local remains="$*"
+ local next_remains
+ local v vx found
+
+ while [ -n "${remains}" ]; do
+ #debug "Sorting [${remains}]"
+ for v in ${remains}; do
+ found=yes
+ next_remains=
+ #debug "Candidate ${v}"
+ for vx in ${remains}; do
+ #debug "${v} vs ${vx} :: `cmp_versions ${v} ${vx}`"
+ case `cmp_versions ${v} ${vx}` in
+ 1)
+ next_remains+=" ${vx}"
+ ;;
+ 0)
+ ;;
+ -1)
+ found=no
+ #debug "Bad: earlier than ${vx}"
+ break
+ ;;
+ esac
+ done
+ if [ "${found}" = "yes" ]; then
+ # $v is less than all other members in next_remains
+ sorted+=" ${v}"
+ remains="${next_remains}"
+ #debug "Good candidate ${v} sorted [${sorted}] remains [${remains}]"
+ break
+ fi
+ done
+ done
+ echo "${sorted}"
+}
+
+read_file()
+{
+ local l p
-printf "Generating kconfig files...\n"
-./maintainer/gen-kconfig.sh
+ while read l; do
+ l="${p}${l}"
+ p=
+ case "${l}" in
+ "")
+ continue
+ ;;
+ *\\)
+ p="${l%\\}"
+ continue
+ ;;
+ "#"*)
+ continue
+ ;;
+ *=*)
+ echo "info[${l%%=*}]=${l#*=}"
+ ;;
+ *)
+ error "syntax error in '${1}': '${l}'"
+ ;;
+ esac
+ done < "${1}"
+}
+
+read_package_desc()
+{
+ read_file "packages/${1}/package.desc"
+}
+
+read_version_desc()
+{
+ read_file "packages/${1}/${2}/version.desc"
+}
+
+find_forks()
+{
+ local -A info
+
+ info[preferred]=${1}
+ eval `read_package_desc ${1}`
+
+ if [ -n "${info[master]}" ]; then
+ pkg_nforks[${info[master]}]=$[pkg_nforks[${info[master]}]+1]
+ pkg_forks[${info[master]}]+=" ${1} "
+ else
+ pkg_preferred[${1}]=${info[preferred]}
+ pkg_nforks[${1}]=$[pkg_nforks[${1}]+1]
+ pkg_forks[${1}]+=" ${1} "
+ pkg_milestones[${1}]=`sort_versions ${info[milestones]}`
+ pkg_relevantpattern[${1}]=${info[relevantpattern]}
+ pkg_masters+=( "${1}" )
+ fi
+ # Keep sorting so that preferred fork is first
+ if [ -n "${pkg_preferred[${1}]}" ]; then
+ pkg_forks[${1}]="${pkg_preferred[${1}]} ${pkg_forks[${1}]##* ${pkg_preferred[${1}]} } ${pkg_forks[${1}]%% ${pkg_preferred[${1}]} *}"
+ fi
+}
+
+check_obsolete_experimental()
+{
+ [ -z "${info[obsolete]}" ] && only_obsolete=
+ [ -z "${info[experimental]}" ] && only_experimental=
+}
+
+enter_fork()
+{
+ local fork="${1}"
+ local versions
+ local only_obsolete only_experimental
+
+ # Set defaults
+ info[obsolete]=
+ info[experimental]=
+ info[repository]=
+ info[repository_branch]=
+ info[repository_cset]=
+ info[repository_subdir]=
+ info[bootstrap]=
+ info[fork]=${fork}
+ info[pkg_name]=${fork}
+ info[pkg_label]=${fork}
+ info[mirrors]=
+ info[archive_filename]='@{pkg_name}-@{version}'
+ info[archive_dirname]='@{pkg_name}-@{version}'
+ info[versionlocked]=
+ info[origin]=
+
+ eval `read_package_desc ${fork}`
+
+ if [ -r "packages/${info[origin]}.help" ]; then
+ info[originhelp]=`sed 's/^/ /' "packages/${info[origin]}.help"`
+ else
+ info[originhelp]=" ${info[master]} from ${info[origin]}."
+ fi
+
+ if [ -n "${info[repository]}" ]; then
+ info[vcs]=${info[repository]%% *}
+ info[repository_url]=${info[repository]#* }
+ fi
+
+ versions=`cd packages/${fork} && \
+ for f in */version.desc; do [ -r "${f}" ] && echo "${f%/version.desc}"; done`
+ versions=`sort_versions ${versions}`
+
+ set_iter version ${versions}
+ info[all_versions]=${versions}
+
+ # If a fork does not define any versions at all ("rolling release"), do not
+ # consider it obsolete/experimental unless it is so marked in the fork's
+ # description.
+ if [ -n "${versions}" ]; then
+ only_obsolete=yes
+ only_experimental=yes
+ do_foreach version check_obsolete_experimental
+ info[only_obsolete]=${only_obsolete}
+ info[only_experimental]=${only_experimental}
+ else
+ info[only_obsolete]=${info[obsolete]}
+ info[only_experimental]=${info[experimental]}
+ fi
+}
+
+enter_version()
+{
+ local version="${1}"
+
+ eval `read_version_desc ${info[fork]} ${version}`
+ info[ver]=${version}
+ info[ver_sel]=`relevantize ${version} ${info[relevantpattern]}`
+}
+
+enter_milestone()
+{
+ local ms="${1}"
+ local cmp
+
+ info[ms]=${ms}
+ if [ -n "${info[ver]}" ]; then
+ info[version_cmp_milestone]=`cmp_versions ${info[ver]} ${info[ms]}`
+ fi
+}
+
+gen_packages()
+{
+ local -A pkg_forks pkg_milestones pkg_nforks pkg_relevantpattern
+ local -a pkg_masters pkg_all pkg_preferred
+
+ pkg_all=( `cd packages && \
+ ls */package.desc 2>/dev/null | \
+ while read f; do [ -r "${f}" ] && echo "${f%/package.desc}"; done | \
+ xargs echo` )
+
+ debug "Packages: ${pkg_all[@]}"
+
+ # We need to group forks of the same package into the same
+ # config file. Discover such relationships and only iterate
+ # over "master" packages at the top.
+ for p in "${pkg_all[@]}"; do
+ find_forks "${p}"
+ done
+ msg "Master packages: ${pkg_masters[@]}"
+
+ # Now for each master, create its kconfig file with version
+ # 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} \
+ [nforks]=${pkg_nforks[${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
+}
+
+msg "*** Generating package version descriptions"
+config_versions_dir=config/versions
+rm -rf "${config_versions_dir}"
+mkdir -p "${config_versions_dir}"
+gen_packages
+
+get_components()
+{
+ local dir="${1}"
+ local f b
+
+ for f in ${dir}/*.in; do
+ b=${f#${dir}/}
+ echo ${b%.in}
+ done
+}
+
+enter_choice()
+{
+ local choice="${1}"
+ local l
+
+ info[choice]="${choice}"
+
+ # Not local, we need these arrays be set in enter_dependency/enter_help
+ deplines=( )
+ helplines=( )
+ while read l; do
+ case "${l}" in
+ "## help "*)
+ helplines+=( "${l#* help }" )
+ ;;
+ "## depends "*|"## select "*)
+ deplines+=( "${l#* }" )
+ ;;
+ esac
+ done < "config/${info[dir]}/${choice}.in"
+ set_iter dependency "${!deplines[@]}"
+ set_iter help "${!helplines[@]}"
+}
+
+enter_dependency()
+{
+ info[depline]="${deplines[${1}]}"
+}
+
+enter_help()
+{
+ info[helpline]="${helplines[${1}]}"
+}
+
+gen_selection()
+{
+ local type="${1}"
+ local dir="${2}"
+ local label="${3}"
+
+ msg "Generating ${dir}.in"
+ exec >"${config_gen_dir}/${dir}.in"
+ info=( \
+ [dir]=${dir} \
+ [label]="${label}" \
+ )
+ set_iter choice `get_components config/${dir}`
+ run_template "maintainer/kconfig-${type}.template"
+}
+
+msg "*** Generating menu/choice selections"
+config_gen_dir=config/gen
+rm -rf "${config_gen_dir}"
+mkdir -p "${config_gen_dir}"
+
+gen_selection choice arch "Target Architecture"
+gen_selection choice kernel "Target OS"
+gen_selection choice cc "Compiler"
+gen_selection choice binutils "Binutils"
+gen_selection choice libc "C library"
+gen_selection menu debug "Debug facilities"
+gen_selection menu comp_tools "Companion tools"
+
+msg "*** Running autoconf"
+autoconf -Wall --force
-printf "Done. You may now run:\n ./configure\n"
+msg "*** Done!"
diff --git a/config/arch/alpha.in b/config/arch/alpha.in
index 1c7ec96..f0d7fe0 100644
--- a/config/arch/alpha.in
+++ b/config/arch/alpha.in
@@ -5,5 +5,60 @@
## select ARCH_USE_MMU
## select ARCH_SUPPORTS_WITH_CPU
## select ARCH_SUPPORTS_WITH_TUNE
-##
+
## help The Alpha architecture.
+
+choice
+ bool
+ prompt "Variant"
+
+config ARCH_ALPHA_EV4
+ bool
+ prompt "EV4"
+
+config ARCH_ALPHA_EV45
+ bool
+ prompt "EV45"
+
+config ARCH_ALPHA_EV5
+ bool
+ prompt "EV5"
+
+config ARCH_ALPHA_EV56
+ bool
+ prompt "EV56"
+
+config ARCH_ALPHA_EV6
+ bool
+ prompt "EV6"
+
+config ARCH_ALPHA_EV67
+ bool
+ prompt "EV67"
+
+endchoice
+
+config ARCH_ALPHA_VARIANT
+ string
+ default "ev4" if ARCH_ALPHA_EV4
+ default "ev45" if ARCH_ALPHA_EV45
+ default "ev5" if ARCH_ALPHA_EV5
+ default "ev56" if ARCH_ALPHA_EV56
+ default "ev6" if ARCH_ALPHA_EV6
+ default "ev67" if ARCH_ALPHA_EV67
+
+config ARCH_CPU
+ default "ev4" if ARCH_ALPHA_EV4
+ default "ev45" if ARCH_ALPHA_EV45
+ default "ev5" if ARCH_ALPHA_EV5
+ default "ev56" if ARCH_ALPHA_EV56
+ default "ev6" if ARCH_ALPHA_EV6
+ default "ev67" if ARCH_ALPHA_EV67
+
+config ARCH_TUNE
+ default "ev4" if ARCH_ALPHA_EV4
+ default "ev45" if ARCH_ALPHA_EV45
+ default "ev5" if ARCH_ALPHA_EV5
+ default "ev56" if ARCH_ALPHA_EV56
+ default "ev6" if ARCH_ALPHA_EV6
+ default "ev67" if ARCH_ALPHA_EV67
diff --git a/config/arch/alpha.in.2 b/config/arch/alpha.in.2
deleted file mode 100644
index aa52624..0000000
--- a/config/arch/alpha.in.2
+++ /dev/null
@@ -1,56 +0,0 @@
-# Alpha specific configuration file
-
-choice
- bool
- prompt "Variant"
-
-config ARCH_ALPHA_EV4
- bool
- prompt "EV4"
-
-config ARCH_ALPHA_EV45
- bool
- prompt "EV45"
-
-config ARCH_ALPHA_EV5
- bool
- prompt "EV5"
-
-config ARCH_ALPHA_EV56
- bool
- prompt "EV56"
-
-config ARCH_ALPHA_EV6
- bool
- prompt "EV6"
-
-config ARCH_ALPHA_EV67
- bool
- prompt "EV67"
-
-endchoice
-
-config ARCH_ALPHA_VARIANT
- string
- default "ev4" if ARCH_ALPHA_EV4
- default "ev45" if ARCH_ALPHA_EV45
- default "ev5" if ARCH_ALPHA_EV5
- default "ev56" if ARCH_ALPHA_EV56
- default "ev6" if ARCH_ALPHA_EV6
- default "ev67" if ARCH_ALPHA_EV67
-
-config ARCH_CPU
- default "ev4" if ARCH_ALPHA_EV4
- default "ev45" if ARCH_ALPHA_EV45
- default "ev5" if ARCH_ALPHA_EV5
- default "ev56" if ARCH_ALPHA_EV56
- default "ev6" if ARCH_ALPHA_EV6
- default "ev67" if ARCH_ALPHA_EV67
-
-config ARCH_TUNE
- default "ev4" if ARCH_ALPHA_EV4
- default "ev45" if ARCH_ALPHA_EV45
- default "ev5" if ARCH_ALPHA_EV5
- default "ev56" if ARCH_ALPHA_EV56
- default "ev6" if ARCH_ALPHA_EV6
- default "ev67" if ARCH_ALPHA_EV67
diff --git a/config/arch/arm.in b/config/arch/arm.in
index 5dbc717..72c329f 100644
--- a/config/arch/arm.in
+++ b/config/arch/arm.in
@@ -5,7 +5,7 @@
## select ARCH_DEFAULT_32
## select ARCH_SUPPORTS_BOTH_MMU
## select ARCH_DEFAULT_HAS_MMU
-## select ARCH_SUPPORTS_BOTH_ENDIAN
+## select ARCH_SUPPORTS_EITHER_ENDIAN
## select ARCH_DEFAULT_LE
## select ARCH_SUPPORTS_WITH_ARCH
## select ARCH_SUPPORTS_WITH_CPU
@@ -14,6 +14,101 @@
## select ARCH_SUPPORTS_WITH_FLOAT if ARCH_32
## select ARCH_SUPPORTS_WITH_FPU if ARCH_32
## select ARCH_SUPPORTS_SOFTFP if ARCH_32
-##
+
## help The ARM architecture, as defined by:
## help http://www.arm.com/
+
+if ARCH_32
+config ARCH_ARM_MODE
+ string
+ default "arm" if ARCH_ARM_MODE_ARM
+ default "thumb" if ARCH_ARM_MODE_THUMB
+
+choice
+ bool
+ prompt "Default instruction set mode"
+ default ARCH_ARM_MODE_ARM
+
+config ARCH_ARM_MODE_ARM
+ bool
+ prompt "arm"
+ help
+ Defaults to emitting instructions in the ARM mode.
+
+config ARCH_ARM_MODE_THUMB
+ bool
+ prompt "thumb"
+ help
+ Defaults to emitting instructions in the THUMB mode.
+
+endchoice
+
+config ARCH_ARM_INTERWORKING
+ bool
+ prompt "Use Thumb-interworking (READ HELP)"
+ help
+ Excerpt from the gcc manual:
+
+ > Generate code which supports calling between the ARM and Thumb
+ > instruction sets. Without this option the two instruction sets
+ > cannot be reliably used inside one program. The default is
+ > [not to use interwork], since slightly larger code is generated
+ > when [interwork] is specified.
+
+ NOTE: Interworking in crosstool-NG is not sell-tested. Use at your
+ own risks, and report success and/or failure.
+
+# Until we only support EABI:
+config ARCH_ARM_ABI_OK
+ def_bool y
+ depends on ! ARCH_ARM_EABI
+ select ARCH_SUPPORTS_WITH_ABI
+
+# Little trick to force EABI *and* always show the prompt
+config ARCH_ARM_EABI_FORCE
+ bool
+ default y if ! OBSOLETE
+ select ARCH_ARM_EABI
+
+config ARCH_ARM_EABI
+ bool
+ prompt "Use EABI"
+ default y
+ help
+ Set up the toolchain so that it generates EABI-compliant binaries.
+
+ If you say 'n' here, then the toolchain will generate OABI binaries.
+ OABI has long been deprecated, and is now considered legacy.
+
+config ARCH_ARM_TUPLE_USE_EABIHF
+ bool
+ prompt "append 'hf' to the tuple (EXPERIMENTAL)"
+ depends on ARCH_FLOAT_HW
+ depends on ARCH_ARM_EABI # Until we only support that...
+ default y
+ help
+ Is you say 'y' here, then the tuple for the toolchain will end
+ up with *eabihf, instead of the usual *eabi.
+
+ *eabihf is used to denote that the toolchain *is* using the
+ hard-float ABI, while *eabi is just an indication of using the
+ soft-float ABI.
+
+ Ie. all one can say is: *eabihf ⊢ hard-float ABI
+
+ Saying 'n' here does *not* impact the ability of the toolchain to
+ generate hard-float instructions with the hard-float ABI. It is a
+ purely cosmetic thing, used by distros to differentiate their
+ hard-float-ABI-using ports from their soft-float-ABI-using ports.
+ (eg. Debian Wheezy and above).
+
+ This is an option, as not all versions of gcc/binutils do support
+ such tuple, and fail to build with *eabihf. Stock gcc version up
+ to, and including 4.7.2 have an issue or another with *eabihf.
+
+ This option is here for the future.
+
+ Say 'n', unless you are trying to fix gcc to properly recognise
+ the *eabihf tuples.
+
+endif
diff --git a/config/arch/arm.in.2 b/config/arch/arm.in.2
deleted file mode 100644
index 166c78f..0000000
--- a/config/arch/arm.in.2
+++ /dev/null
@@ -1,96 +0,0 @@
-# ARM specific configuration file
-
-if ARCH_32
-config ARCH_ARM_MODE
- string
- default "arm" if ARCH_ARM_MODE_ARM
- default "thumb" if ARCH_ARM_MODE_THUMB
-
-choice
- bool
- prompt "Default instruction set mode"
- default ARCH_ARM_MODE_ARM
-
-config ARCH_ARM_MODE_ARM
- bool
- prompt "arm"
- help
- Defaults to emitting instructions in the ARM mode.
-
-config ARCH_ARM_MODE_THUMB
- bool
- prompt "thumb"
- help
- Defaults to emitting instructions in the THUMB mode.
-
-endchoice
-
-config ARCH_ARM_INTERWORKING
- bool
- prompt "Use Thumb-interworking (READ HELP)"
- help
- Excerpt from the gcc manual:
-
- > Generate code which supports calling between the ARM and Thumb
- > instruction sets. Without this option the two instruction sets
- > cannot be reliably used inside one program. The default is
- > [not to use interwork], since slightly larger code is generated
- > when [interwork] is specified.
-
- NOTE: Interworking in crosstool-NG is not sell-tested. Use at your
- own risks, and report success and/or failure.
-
-# Until we only support EABI:
-config ARCH_ARM_ABI_OK
- def_bool y
- depends on ! ARCH_ARM_EABI
- select ARCH_SUPPORTS_WITH_ABI
-
-# Little trick to force EABI *and* always show the prompt
-config ARCH_ARM_EABI_FORCE
- bool
- default y if ! OBSOLETE
- select ARCH_ARM_EABI
-
-config ARCH_ARM_EABI
- bool
- prompt "Use EABI"
- default y
- help
- Set up the toolchain so that it generates EABI-compliant binaries.
-
- If you say 'n' here, then the toolchain will generate OABI binaries.
- OABI has long been deprecated, and is now considered legacy.
-
-config ARCH_ARM_TUPLE_USE_EABIHF
- bool
- prompt "append 'hf' to the tuple (EXPERIMENTAL)"
- depends on ARCH_FLOAT_HW
- depends on ARCH_ARM_EABI # Until we only support that...
- default y
- help
- Is you say 'y' here, then the tuple for the toolchain will end
- up with *eabihf, instead of the usual *eabi.
-
- *eabihf is used to denote that the toolchain *is* using the
- hard-float ABI, while *eabi is just an indication of using the
- soft-float ABI.
-
- Ie. all one can say is: *eabihf ⊢ hard-float ABI
-
- Saying 'n' here does *not* impact the ability of the toolchain to
- generate hard-float instructions with the hard-float ABI. It is a
- purely cosmetic thing, used by distros to differentiate their
- hard-float-ABI-using ports from their soft-float-ABI-using ports.
- (eg. Debian Wheezy and above).
-
- This is an option, as not all versions of gcc/binutils do support
- such tuple, and fail to build with *eabihf. Stock gcc version up
- to, and including 4.7.2 have an issue or another with *eabihf.
-
- This option is here for the future.
-
- Say 'n', unless you are trying to fix gcc to properly recognise
- the *eabihf tuples.
-
-endif
diff --git a/config/arch/microblaze.in b/config/arch/microblaze.in
index d236007..8c73b00 100644
--- a/config/arch/microblaze.in
+++ b/config/arch/microblaze.in
@@ -2,9 +2,9 @@
## depends on EXPERIMENTAL
##
-## select ARCH_SUPPORT_ARCH
+## select ARCH_SUPPORTS_WITH_CPU
## select ARCH_FLOAT_SW
-## select ARCH_SUPPORTS_BOTH_ENDIAN
+## select ARCH_SUPPORTS_EITHER_ENDIAN
## select ARCH_DEFAULT_BE
## select ARCH_SUPPORTS_BOTH_MMU
## select ARCH_DEFAULT_HAS_MMU
diff --git a/config/arch/mips.in b/config/arch/mips.in
index 1168f5e..8cc68dc 100644
--- a/config/arch/mips.in
+++ b/config/arch/mips.in
@@ -4,11 +4,48 @@
## select ARCH_SUPPORTS_64
## select ARCH_DEFAULT_32
## select ARCH_USE_MMU
-## select ARCH_SUPPORTS_BOTH_ENDIAN
+## select ARCH_SUPPORTS_EITHER_ENDIAN
## select ARCH_DEFAULT_BE
## select ARCH_SUPPORTS_WITH_ARCH
## select ARCH_SUPPORTS_WITH_TUNE
## select ARCH_SUPPORTS_WITH_FLOAT
-##
+
## help The MIPS architecture, as defined by:
## help http://www.mips.com/
+
+choice
+ bool
+ prompt "ABI"
+
+config ARCH_mips_o32
+ bool
+ prompt "o32"
+ depends on (ARCH_32 || MULTILIB)
+ help
+ This is the -mabi=32 gcc option.
+
+config ARCH_mips_n32
+ bool
+ prompt "n32"
+ depends on ARCH_64
+ help
+ This is the -mabi=n32 gcc option.
+
+config ARCH_mips_n64
+ bool
+ prompt "n64"
+ depends on ARCH_64
+ help
+ This is the -mabi=64 gcc option.
+
+# Not supported on Linux:
+# o64 : seems related to *BSD
+# eabi : seems related to bare-metal
+
+endchoice
+
+config ARCH_mips_ABI
+ string
+ default "32" if ARCH_mips_o32
+ default "n32" if ARCH_mips_n32
+ default "64" if ARCH_mips_n64
diff --git a/config/arch/mips.in.2 b/config/arch/mips.in.2
deleted file mode 100644
index 35c60e0..0000000
--- a/config/arch/mips.in.2
+++ /dev/null
@@ -1,38 +0,0 @@
-# MIPS specific config options
-
-choice
- bool
- prompt "ABI"
-
-config ARCH_mips_o32
- bool
- prompt "o32"
- depends on (ARCH_32 || MULTILIB)
- help
- This is the -mabi=32 gcc option.
-
-config ARCH_mips_n32
- bool
- prompt "n32"
- depends on ARCH_64
- help
- This is the -mabi=n32 gcc option.
-
-config ARCH_mips_n64
- bool
- prompt "n64"
- depends on ARCH_64
- help
- This is the -mabi=64 gcc option.
-
-# Not supported on Linux:
-# o64 : seems related to *BSD
-# eabi : seems related to bare-metal
-
-endchoice
-
-config ARCH_mips_ABI
- string
- default "32" if ARCH_mips_o32
- default "n32" if ARCH_mips_n32
- default "64" if ARCH_mips_n64
diff --git a/config/arch/nios2.in b/config/arch/nios2.in
index 2674bfd..e024102 100644
--- a/config/arch/nios2.in
+++ b/config/arch/nios2.in
@@ -2,8 +2,9 @@
## select ARCH_SUPPORTS_32
## select ARCH_DEFAULT_32
+## select ARCH_SUPPORTS_BOTH_MMU
## select ARCH_DEFAULT_LE
-## select ARCH_SUPPORTS_WITH_CPU
+## select ARCH_SUPPORTS_WITH_ARCH
##
## help The NIOS2 architecture, as defined by:
## help http://www.altera.com
diff --git a/config/arch/powerpc.in b/config/arch/powerpc.in
index 6dfc742..ae10e2d 100644
--- a/config/arch/powerpc.in
+++ b/config/arch/powerpc.in
@@ -1,9 +1,9 @@
-# powerpc specific configuration file
+# Powerpc specific configuration file
## select ARCH_SUPPORTS_32
## select ARCH_SUPPORTS_64
## select ARCH_DEFAULT_32
-## select ARCH_SUPPORTS_BOTH_ENDIAN
+## select ARCH_SUPPORTS_EITHER_ENDIAN
## select ARCH_DEFAULT_BE
## select ARCH_USE_MMU
## select ARCH_SUPPORTS_WITH_ABI
@@ -13,3 +13,44 @@
##
## help The PowerPC architecture, as defined by:
## help http://www.ibm.com/developerworks/eserver/articles/archguide.html
+
+config ARCH_powerpc_ABI
+ string
+ default "" if ARCH_powerpc_ABI_DEFAULT
+ default "eabi" if ARCH_powerpc_ABI_EABI
+ default "spe" if ARCH_powerpc_ABI_SPE
+
+choice
+ bool
+ prompt "ABI"
+ default ARCH_powerpc_ABI_DEFAULT
+
+config ARCH_powerpc_ABI_DEFAULT
+ bool
+ prompt "default"
+ help
+ The default ABI (System V.4).
+
+config ARCH_powerpc_ABI_EABI
+ bool
+ prompt "EABI"
+ depends on BARE_METAL
+ help
+ The Embedded ABI (stack alignment of 8 bytes, etc).
+
+config ARCH_powerpc_ABI_SPE
+ bool
+ prompt "SPE"
+ help
+ Add support for the Signal Processing Engine. This will set up
+ the toolchain so that it supports the SPE ABI extensions. This
+ mainly targets Freescale e500 processors.
+
+ Setting this option will append "spe" to the end of your target
+ tuple name (e.g., powerpc-e500v2-linux-gnuspe) so that the gcc
+ configure/build system will know to include SPE ABI support. It
+ will also automatically add "-mabi=spe -mspe" to your TARGET_CFLAGS,
+ and "--enable-e500_double" to your CC_EXTRA_CONFIG_ARRAY, so you
+ do not need to explicitly add them.
+
+endchoice
diff --git a/config/arch/powerpc.in.2 b/config/arch/powerpc.in.2
deleted file mode 100644
index 2cbc370..0000000
--- a/config/arch/powerpc.in.2
+++ /dev/null
@@ -1,42 +0,0 @@
-# powerpc specific configuration file
-
-config ARCH_powerpc_ABI
- string
- default "" if ARCH_powerpc_ABI_DEFAULT
- default "eabi" if ARCH_powerpc_ABI_EABI
- default "spe" if ARCH_powerpc_ABI_SPE
-
-choice
- bool
- prompt "ABI"
- default ARCH_powerpc_ABI_DEFAULT
-
-config ARCH_powerpc_ABI_DEFAULT
- bool
- prompt "default"
- help
- The default ABI (System V.4).
-
-config ARCH_powerpc_ABI_EABI
- bool
- prompt "EABI"
- depends on BARE_METAL
- help
- The Embedded ABI (stack alignment of 8 bytes, etc).
-
-config ARCH_powerpc_ABI_SPE
- bool
- prompt "SPE"
- help
- Add support for the Signal Processing Engine. This will set up
- the toolchain so that it supports the SPE ABI extensions. This
- mainly targets Freescale e500 processors.
-
- Setting this option will append "spe" to the end of your target
- tuple name (e.g., powerpc-e500v2-linux-gnuspe) so that the gcc
- configure/build system will know to include SPE ABI support. It
- will also automatically add "-mabi=spe -mspe" to your TARGET_CFLAGS,
- and "--enable-e500_double" to your CC_EXTRA_CONFIG_ARRAY, so you
- do not need to explicitly add them.
-
-endchoice
diff --git a/config/arch/sh.in b/config/arch/sh.in
index 60de313..efced07 100644
--- a/config/arch/sh.in
+++ b/config/arch/sh.in
@@ -3,9 +3,72 @@
## select ARCH_SUPPORTS_32
## select ARCH_DEFAULT_32
## select ARCH_USE_MMU
-## select ARCH_SUPPORTS_BOTH_ENDIAN
+## select ARCH_SUPPORTS_EITHER_ENDIAN
## select ARCH_DEFAULT_LE
## select ARCH_REQUIRES_MULTILIB
+## select ARCH_SUPPORTS_WITH_ENDIAN
##
## help The Super-H architecture, as defined by:
## help http://www.renesas.com/fmwk.jsp?cnt=superh_family_landing.jsp&fp=/products/mpumcu/superh_family/
+
+choice
+ bool
+ prompt "Variant"
+
+# GCC supports both endiannesses even if a specific CPU is selected (so long
+# as that CPU can be both BE/LE), but the binutils (or specifically, ld)
+# configures for both endiannesses only if sh-*-linux target is selected.
+config ARCH_SH_SH
+ bool
+ prompt "unspecified"
+ select ARCH_SUPPORTS_BOTH_ENDIAN
+ select ARCH_SUPPORTS_WITH_CPU
+ help
+ If left unspecified, GCC will determine the set of multilibs to compile automatically
+ based on selected endianness, FPU mode and OS.
+
+config ARCH_SH_SH1
+ bool
+ prompt "sh1"
+
+config ARCH_SH_SH2
+ bool
+ prompt "sh2"
+
+config ARCH_SH_SH2E
+ bool
+ prompt "sh2e"
+
+config ARCH_SH_SH2A
+ bool
+ prompt "sh2a"
+
+config ARCH_SH_SH3
+ bool
+ prompt "sh3"
+
+config ARCH_SH_SH3E
+ bool
+ prompt "sh3e"
+
+config ARCH_SH_SH4
+ bool
+ prompt "sh4"
+
+config ARCH_SH_SH4A
+ bool
+ prompt "sh4a"
+
+endchoice
+
+config ARCH_SH_VARIANT
+ string
+ default "sh" if ARCH_SH_SH
+ default "sh1" if ARCH_SH_SH1
+ default "sh2" if ARCH_SH_SH2
+ default "sh2e" if ARCH_SH_SH2E
+ default "sh2a" if ARCH_SH_SH2A
+ default "sh3" if ARCH_SH_SH3
+ default "sh3e" if ARCH_SH_SH3E
+ default "sh4" if ARCH_SH_SH4
+ default "sh4a" if ARCH_SH_SH4A
diff --git a/config/arch/sh.in.2 b/config/arch/sh.in.2
deleted file mode 100644
index 82856ee..0000000
--- a/config/arch/sh.in.2
+++ /dev/null
@@ -1,25 +0,0 @@
-# Super-H specific configuration file
-
-choice
- bool
- prompt "Variant"
-
-config ARCH_SH_SH3
- bool
- prompt "sh3"
-
-config ARCH_SH_SH4
- bool
- prompt "sh4"
-
-config ARCH_SH_SH4A
- bool
- prompt "sh4a"
-
-endchoice
-
-config ARCH_SH_VARIANT
- string
- default "sh3" if ARCH_SH_SH3
- default "sh4" if ARCH_SH_SH4
- default "sh4a" if ARCH_SH_SH4A
diff --git a/config/arch/xtensa.in b/config/arch/xtensa.in
index 3ffa4e8..a376523 100644
--- a/config/arch/xtensa.in
+++ b/config/arch/xtensa.in
@@ -1,11 +1,11 @@
# xtensa specific configuration file
## select ARCH_SUPPORTS_32
-## select ARCH_SUPPORTS_BOTH_ENDIAN
+## select ARCH_SUPPORTS_EITHER_ENDIAN
## select ARCH_DEFAULT_LE
## select ARCH_SUPPORTS_BOTH_MMU
## select ARCH_DEFAULT_HAS_MMU
-##
+
## help The xtensa architecture
## help
## help Xtensa is a configurable and extensible processor architecture.
@@ -20,3 +20,16 @@
## help
## help The default option (ARCH_xtensa_fsf) uses a built-in configuration,
## help which may or may not work for a particular Xtensa processor.
+
+choice
+ prompt "Target Architecture Variant"
+ default ARCH_xtensa_fsf
+
+config XTENSA_CUSTOM
+ bool "Custom Xtensa processor configuration"
+ select TARGET_USE_OVERLAY
+
+config ARCH_xtensa_fsf
+ bool "fsf - Default configuration"
+
+endchoice
diff --git a/config/arch/xtensa.in.2 b/config/arch/xtensa.in.2
deleted file mode 100644
index 25ece70..0000000
--- a/config/arch/xtensa.in.2
+++ /dev/null
@@ -1,33 +0,0 @@
-choice
- prompt "Target Architecture Variant"
- default ARCH_xtensa_fsf
-
-config XTENSA_CUSTOM
- bool "Custom Xtensa processor configuration"
-
-config ARCH_xtensa_fsf
- bool "fsf - Default configuration"
-
-endchoice
-
-config ARCH_XTENSA_CUSTOM_NAME
- string "Custom Xtensa processor configuration name"
- depends on XTENSA_CUSTOM
- default ""
- help
- Enter the name of the custom processor configuration.
- Overlay file for that configuration must be called
- 'xtensa_<CUSTOM_NAME>.tar'.
-
- Leave blank to use the default 'xtensa-overlay.tar'.
- For more information about this option, please also consult
- section 'Using crosstool-NG to build Xtensa toolchains' in the
- docs/C - Misc. tutorials.txt
-
-config ARCH_XTENSA_CUSTOM_OVERLAY_LOCATION
- string "Full path to custom Xtensa processor configurations"
- depends on XTENSA_CUSTOM
- default ""
- help
- Enter the path to the directory for the custom processor
- configuration file.
diff --git a/config/binutils.in b/config/binutils.in
index 0c6d5c0..a483881 100644
--- a/config/binutils.in
+++ b/config/binutils.in
@@ -33,10 +33,6 @@ config ARCH_BINFMT_FDPIC
endchoice
-config BINUTILS
- string
-
source "config/gen/binutils.in"
-source "config/gen/binutils.in.2"
endmenu
diff --git a/config/binutils/binutils.in b/config/binutils/binutils.in
index c83cbb1..3cb58f9 100644
--- a/config/binutils/binutils.in
+++ b/config/binutils/binutils.in
@@ -2,174 +2,29 @@
comment "GNU binutils"
-config BINUTILS_CUSTOM
- bool
- prompt "Custom binutils"
- depends on EXPERIMENTAL
- select BINUTILS_2_26_or_later
- help
- The choosen binutils version shall be not downloaded. Instead use
- a custom location to get the source.
-
-if BINUTILS_CUSTOM
-
-config BINUTILS_CUSTOM_LOCATION
- string
- prompt "Full path to custom binutils source"
- help
- Enter the path to the directory or tarball of your source for binutils.
-
- If the path is a tarball, it should extract to: <name>-<version>/
- where the name is this component, binutils, and the version is set
- below in the custom version string.
-
-config BINUTILS_CUSTOM_VERSION
- string
- prompt "Binutils Custom Version number"
- help
- Enter the version number for your custom binutils.
-
-config BINUTILS_VERSION
- string
- default BINUTILS_CUSTOM_VERSION
-
-endif # BINUTILS_CUSTOM
-
-if ! BINUTILS_CUSTOM
-
-config BINUTILS_SHOW_LINARO
- bool
- prompt "Show Linaro versions"
- help
- Linaro is maintaining some advanced/more stable/experimental versions
- of binutils, especially for the ARM architecture.
-
- Those versions have not been blessed by the binutils comunity (nor have they
- been cursed either!), but they look to be pretty much stable, and even
- more stable than the upstream versions. YMMV...
-
- If you do not know what this Linaro stuff is, then simply say 'n' here,
- and rest in peace. OTOH, if you know what you are doing, you will be
- able to use and enjoy :-) the Linaro versions by saying 'y' here.
-
- Linaro: http://www.linaro.org/
-
-choice
- bool
- prompt "binutils version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config BINUTILS_V_2_28
- bool
- prompt "2.28"
- select BINUTILS_2_27_or_later
-
-config BINUTILS_V_2_27
- bool
- prompt "2.27"
- select BINUTILS_2_27_or_later
-
-config BINUTILS_V_2_26
- bool
- prompt "2.26"
- select BINUTILS_2_26_or_later
-
-config BINUTILS_V_2_25_1
- bool
- prompt "2.25.1 (OBSOLETE)"
- select BINUTILS_2_25_1_or_later
- depends on OBSOLETE
-
-config BINUTILS_LINARO_V_2_25
- bool
- prompt "linaro-2.25.0-2015.01-2 (OBSOLETE)"
- select BINUTILS_2_25_or_later
- depends on BINUTILS_SHOW_LINARO
- depends on OBSOLETE
-
-config BINUTILS_LINARO_V_2_24
- bool
- prompt "linaro-2.24.0-2014.11-2 (OBSOLETE)"
- select BINUTILS_2_24_or_later
- depends on BINUTILS_SHOW_LINARO
- depends on OBSOLETE
-
-config BINUTILS_V_2_24
- bool
- prompt "2.24 (OBSOLETE)"
- select BINUTILS_2_24_or_later
- depends on OBSOLETE
-
-config BINUTILS_LINARO_V_2_23_2
- bool
- prompt "linaro-2.23.2-2013.10-4 (OBSOLETE)"
- select BINUTILS_2_23_2_or_later
- depends on BINUTILS_SHOW_LINARO
- depends on OBSOLETE
-
-config BINUTILS_V_2_23_2
- bool
- prompt "2.23.2 (OBSOLETE)"
- select BINUTILS_2_23_2_or_later
- depends on OBSOLETE
-
-endchoice
-
-config BINUTILS_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "2.28" if BINUTILS_V_2_28
- default "2.27" if BINUTILS_V_2_27
- default "2.26" if BINUTILS_V_2_26
- default "2.25.1" if BINUTILS_V_2_25_1
- default "linaro-2.25.0-2015.01-2" if BINUTILS_LINARO_V_2_25
- default "linaro-2.24.0-2014.11-2" if BINUTILS_LINARO_V_2_24
- default "2.24" if BINUTILS_V_2_24
- default "linaro-2.23.2-2013.10-4" if BINUTILS_LINARO_V_2_23_2
- default "2.23.2" if BINUTILS_V_2_23_2
-
-endif # ! BINUTILS_CUSTOM
-
-config BINUTILS_2_27_or_later
- bool
- select BINUTILS_2_26_or_later
+source "config/versions/binutils.in"
-config BINUTILS_2_26_or_later
- bool
- select BINUTILS_2_25_1_or_later
-
-config BINUTILS_2_25_1_or_later
- bool
- select BINUTILS_2_25_or_later
-
-config BINUTILS_2_25_or_later
- bool
- select BINUTILS_2_24_or_later
-
-config BINUTILS_2_24_or_later
+config BINUTILS_HAS_HASH_STYLE
+ default y if BINUTILS_2_23_or_later
bool
- select BINUTILS_2_23_2_or_later
-config BINUTILS_2_23_2_or_later
+config BINUTILS_HAS_GOLD
+ default y if BINUTILS_2_23_or_later
bool
- select BINUTILS_HAS_GOLD
- select BINUTILS_HAS_HASH_STYLE
- select BINUTILS_HAS_PKGVERSION_BUGURL
- select BINUTILS_HAS_PLUGINS
-config BINUTILS_HAS_HASH_STYLE
+config BINUTILS_HAS_PLUGINS
+ default y if BINUTILS_2_23_or_later
bool
-config BINUTILS_HAS_GOLD
+config BINUTILS_HAS_PKGVERSION_BUGURL
+ default y if BINUTILS_2_23_or_later
bool
# gold only suports the listed architectures
config BINUTILS_GOLD_SUPPORTS_ARCH
bool
- default y if ARCH_arm
- default y if ARCH_x86
+ default y if ARCH_ARM
+ default y if ARCH_X86
config BINUTILS_GOLD_SUPPORT
bool
@@ -178,12 +33,6 @@ config BINUTILS_GOLD_SUPPORT
depends on BINUTILS_GOLD_SUPPORTS_ARCH
depends on ! STATIC_TOOLCHAIN
-config BINUTILS_HAS_PLUGINS
- bool
-
-config BINUTILS_HAS_PKGVERSION_BUGURL
- bool
-
# Force using the BFD linker if needed. There are two options:
# - For some C libraries (eg. glibc at least), BFD ld must be
# built and be selected by default.
@@ -331,3 +180,27 @@ config BINUTILS_FOR_TARGET_BFD
default y
endif # BINUTILS_FOR_TARGET
+
+if ARCH_BINFMT_FLAT
+
+comment "elf2flt"
+
+config ELF2FLT_REQUIRES
+ def_bool y
+ select ZLIB
+ select BINUTILS_FORCE_LD_BFD_ONLY
+
+source "config/versions/elf2flt.in"
+
+config ELF2FLT_EXTRA_CONFIG_ARRAY
+ string
+ prompt "elf2flt extra config"
+ default ""
+ help
+ Extra flags passed onto ./configure when configuring
+
+ You can enter multiple arguments here, and arguments can contain spaces
+ if they are properly quoted (or escaped, but prefer quotes). Eg.:
+ --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
+
+endif # ARCH_BINFMT_FLAT
diff --git a/config/binutils/binutils.in.2 b/config/binutils/binutils.in.2
deleted file mode 100644
index f913355..0000000
--- a/config/binutils/binutils.in.2
+++ /dev/null
@@ -1,82 +0,0 @@
-# elf2flt options
-
-if ARCH_BINFMT_FLAT
-
-config ELF2FLT_REQUIRES
- def_bool y
- select ZLIB
- select BINUTILS_FORCE_LD_BFD_ONLY
-
-comment "elf2flt"
-
-choice
- bool
- prompt "elf2flt version"
-
-config ELF2FLT_GIT
- bool
- prompt "git"
- depends on CONFIGURE_has_git
- help
- Grab the latest version of elf2flt from the CVS repository
-
-config ELF2FLT_CUSTOM
- bool
- prompt "Custom elf2flt"
- depends on EXPERIMENTAL || !CONFIGURE_has_git
- help
- The choosen elf2flt version shall be not downloaded. Instead use
- a custom location to get the source.
-
-endchoice
-
-if ELF2FLT_GIT
-
-config ELF2FLT_GIT_CSET
- string
- prompt "git cset"
- default "6d80ab6c93409e796f85da404bde84b841231531"
- help
- Enter the git changeset to use.
-
- The default currently points to the HEAD of the git tree.
-
-endif # ELF2FLT_GIT
-
-config ELF2FLT_VERSION
- string
- default ELF2FLT_GIT_CSET if ELF2FLT_GIT
- default ELF2FLT_CUSTOM_VERSION if ELF2FLT_CUSTOM
-
-if ELF2FLT_CUSTOM
-
-config ELF2FLT_CUSTOM_LOCATION
- string
- prompt "Full path to custom elf2flt source"
- help
- Enter the path to the directory or tarball of your source for elf2flt.
-
- If the path is a tarball, it should extract to: <name>-<version>/
- where the name is this component, elf2flt, and the version is set
- below in the custom version string.
-
-config ELF2FLT_CUSTOM_VERSION
- string
- prompt "elf2flt custom version number"
- help
- Enter the version number for your custom elf2flt.
-
-endif # ELF2FLT_CUSTOM
-
-config ELF2FLT_EXTRA_CONFIG_ARRAY
- string
- prompt "elf2flt extra config"
- default ""
- help
- Extra flags passed onto ./configure when configuring
-
- You can enter multiple arguments here, and arguments can contain spaces
- if they are properly quoted (or escaped, but prefer quotes). Eg.:
- --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
-
-endif # ARCH_BINFMT_FLAT
diff --git a/config/cc.in b/config/cc.in
index 81f168c..187a48d 100644
--- a/config/cc.in
+++ b/config/cc.in
@@ -2,13 +2,6 @@
menu "C compiler"
-config CC
- string
- default "gcc"
-
-config CC_VERSION
- string
-
config CC_CORE_PASSES_NEEDED
bool
select CC_CORE_PASS_1_NEEDED
@@ -20,8 +13,6 @@ config CC_CORE_PASS_1_NEEDED
config CC_CORE_PASS_2_NEEDED
bool
-source "config/gen/cc.in"
-
config CC_SUPPORT_CXX
bool
@@ -43,6 +34,8 @@ config CC_SUPPORT_OBJCXX
config CC_SUPPORT_GOLANG
bool
+source "config/gen/cc.in"
+
comment "Additional supported languages:"
config CC_LANG_CXX
diff --git a/config/cc/gcc.in b/config/cc/gcc.in
index d86a300..a11e8cd 100644
--- a/config/cc/gcc.in
+++ b/config/cc/gcc.in
@@ -1,216 +1,432 @@
-# Compiler options
-#
+# GCC options
+
## default y
-## select CC_SUPPORT_CXX if !LIBC_none
+## select CC_SUPPORT_CXX if !LIBC_NONE
## select CC_SUPPORT_FORTRAN
-## select CC_SUPPORT_JAVA if !CC_GCC_6_or_later
+## select CC_SUPPORT_JAVA if !GCC_7_or_later
## select CC_SUPPORT_ADA
## select CC_SUPPORT_OBJC
## select CC_SUPPORT_OBJCXX
## select CC_SUPPORT_GOLANG
-##
+# GCC7 requires ISL 0.15+
+## select ISL_REQUIRE_0_15_or_later if ISL_NEEDED && GCC_7_or_later
+# GCC6 requires ISL 0.14+ (it says 0.14-0.16, but accepts newer ISL as well)
+## select ISL_REQUIRE_0_14_or_later if ISL_NEEDED && GCC_6_or_later
+# GCC5 requires ISL 0.12+ (again, it says 0.12-0.16, but also accepts newer ISL)
+## select ISL_REQUIRE_0_12_or_later if ISL_NEEDED && GCC_5_or_later
+# GCC4.9 requires ISL 0.10..0.15
+# GCC4.8 requires ISL 0.10..0.14
+## select ISL_REQUIRE_0_10_or_later if ISL_NEEDED && GCC_4_8_or_later
+## select ISL_REQUIRE_0_15_or_older if ISL_NEEDED && GCC_4_9_or_later && !GCC_5_or_later
+## select ISL_REQUIRE_0_14_or_older if ISL_NEEDED && GCC_4_8_or_later && !GCC_4_9_or_later
+
## help gcc is the full-blown GNU compiler. This is what most people will choose.
## help
## help gcc supports many languages, a powerful code parser, optimised binary
## help output, and lots of other features.
-config CC_GCC_CUSTOM
- bool
- prompt "Custom gcc"
- depends on EXPERIMENTAL
- select CC_GCC_latest
- help
- The choosen gcc version shall be not downloaded. Instead use
- a custom location to get the source.
-
-if CC_GCC_CUSTOM
-
-config CC_GCC_CUSTOM_LOCATION
- string
- prompt "Full path to custom gcc source"
- help
- Enter the path to the directory or tarball of your source for gcc.
+source "config/versions/gcc.in"
- If the path is a tarball, it should extract to: <name>-<version>/
- where the name is this component, gcc, and the version is set
- below in the custom version string.
+# Only enable gcc's support for plugins if binutils has it as well
+# They are useful only when doing LTO, but it does no harm enabling
+# them even without LTO.
+config CC_GCC_ENABLE_PLUGINS
+ def_bool y
+ depends on BINUTILS_PLUGINS
+ depends on ! STATIC_TOOLCHAIN
-config CC_GCC_CUSTOM_VERSION
- string
- prompt "Custom GCC Version"
- help
- Enter the version number for your custom gcc.
+# Affects the build of musl
+config GCC_BUG_61144
+ bool
+ default y if GCC_4_9_or_later && !GCC_4_9_2_or_later
-config CC_GCC_VERSION
- string
- default CC_GCC_CUSTOM_VERSION
+# If binutils installs gold, enable support for gold in gcc
+config CC_GCC_GOLD
+ def_bool y
+ depends on BINUTILS_GOLD_INSTALLED
-endif #CC_GCC_CUSTOM
+config CC_GCC_HAS_LIBMPX
+ def_bool y
+ depends on GCC_5_or_later
-if ! CC_GCC_CUSTOM
+config CC_LANG_JAVA_USE_ECJ
+ def_bool y
+ depends on CC_LANG_JAVA
-config CC_GCC_SHOW_LINARO
- bool
- prompt "Show Linaro versions"
+config CC_GCC_ENABLE_CXX_FLAGS
+ string "Flags to pass to --enable-cxx-flags"
+ default ""
+ help
+ Enter here the value of the gcc's ./configure option --enable-cxx-flags.
+ Leave empty if you don't know better.
+
+ Note: just pass in the option _value_, that is only the part that goes
+ after the '=' sign.
+
+config CC_GCC_CORE_EXTRA_CONFIG_ARRAY
+ string "Core gcc extra config"
+ default ""
+ depends on CC_CORE_PASS_1_NEEDED || CC_CORE_PASS_2_NEEDED
+ help
+ Extra flags to pass onto ./configure when configuring the core gcc.
+
+ The core gcc is a stripped down, C-only compiler needed to build
+ the C library. Kinda bootstrap gcc, if you wish.
+
+ You can enter multiple arguments here, and arguments can contain spaces
+ if they are properly quoted (or escaped, but prefer quotes). Eg.:
+ --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
+
+config CC_GCC_EXTRA_CONFIG_ARRAY
+ string "gcc extra config"
+ default ""
help
- Linaro is maintaining some advanced/more stable/experimental versions
- of gcc, especially for the ARM architecture.
+ Extra flags to pass onto ./configure when configuring gcc.
+
+ You can enter multiple arguments here, and arguments can contain spaces
+ if they are properly quoted (or escaped, but prefer quotes). Eg.:
+ --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
+
+config CC_GCC_MULTILIB_LIST
+ string "List of multilib variants"
+ depends on MULTILIB
+ help
+ Architecture-specific option of expanding or restricting the list of
+ the multilib variants to be built. Refer to GCC installation manual
+ for the format of this option for a particular architecture.
+ Leave empty to use the default list for this architecture.
- Those versions have not been blessed by the gcc comunity (nor have they
- been cursed either!), but they look to be pretty much stable, and even
- more stable than the upstream versions. YMMV...
+config STATIC_TOOLCHAIN
+ bool
+ select CC_GCC_STATIC_LIBSTDCXX
- If you do not know what this Linaro stuff is, then simply say 'n' here,
- and rest in peace. OTOH, if you know what you are doing, you will be
- able to use and enjoy :-) the Linaro versions by saying 'y' here.
+config CC_GCC_STATIC_LIBSTDCXX
+ bool "Link libstdc++ statically into the gcc binary"
+ default y
+ depends on CONFIGURE_has_static_link || CANADIAN || CROSS_NATIVE
+ select WANTS_STATIC_LINK if CROSS || NATIVE
+ select WANTS_STATIC_LINK_CXX if CROSS || NATIVE
+ help
+ Newer gcc versions require some c++ libraries. So statically
+ linking libstdc++ increases the likeliness that the gcc binary will
+ run on machines other than the one which it was built on, without
+ having to worry about distributing the matching version of libstdc++
+ along with it.
+
+config CC_GCC_SYSTEM_ZLIB
+ bool "Use system zlib"
+ help
+ Do not use bundled zlib, and use the zlib already available for
+ the host (eg. the system library).
+
+ If zlib is built as a companion library, selecting this option
+ will use it.
+
+ If you want to build a static toolchain, you will need to also
+ install the static version of zlib for your host.
+
+ If unsure, say 'n'.
+
+config CC_GCC_CONFIG_TLS
+ tristate
+ prompt "Configure TLS (Thread Local Storage)"
+ default m
+ help
+ Specify that the target supports TLS (Thread Local Storage). Usually
+ configure can correctly determine if TLS is supported. In cases where
+ it guesses incorrectly, TLS can be explicitly enabled or disabled.
+ This can happen if the assembler supports TLS but the C library does
+ not, or if the assumptions made by the configure test are incorrect.
+
+ Option | TLS use | Associated ./configure switch
+ ---------+--------------------+--------------------------------
+ Y | forcibly used | --enable-tls
+ M | auto | (none, ./configure decides)
+ N | forcibly not used | --disable-tls
+
+ If unsure, say 'M'.
+
+#-----------------------------------------------------------------------------
+# Optimisation features
+
+comment "Optimisation features"
+
+# Defined in config/cc/gcc.in
+# For graphite: gcc needs cloog and isl
+# In >= gcc-5.x, cloog is no longer needed, but isl is.
+config CC_GCC_USE_GRAPHITE
+ bool "Enable GRAPHITE loop optimisations"
+ default y
+ select CLOOG_NEEDED if !GCC_5_or_later
+ select ISL_NEEDED
+ help
+ Enable the GRAPHITE loop optimsations.
+
+ On some systems (eg. Cygwin), CLooG and ISL (required to enable
+ GRAPHITE) may not build properly (yet), so you'll have to say 'N'
+ here (or help debug the issues)
+
+ TODO: Is this still true on Cygwin?
+
+# The way LTO works is a bit twisted.
+# See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
+# Basically:
+# - if binutils has plugins: LTO is handled by ld/gold by loading
+# the plugin when linking
+# - if binutils does not have plugins: LTO is handled by collect2
+# In any case, LTO support does not depend on plugins, but takes
+# advantage of it
+config CC_GCC_USE_LTO
+ bool "Enable LTO"
+ default y
+ depends on ! STATIC_TOOLCHAIN
+ help
+ Enable the Link Time Optimisations.
- Linaro: http://www.linaro.org/
+#-----------------------------------------------------------------------------
+comment "Settings for libraries running on target"
-choice
+config CC_GCC_ENABLE_TARGET_OPTSPACE
bool
- prompt "gcc version"
-
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
+ prompt "Optimize gcc libs for size"
+ default y
+ help
+ Pass --enable-target-optspace to crossgcc's configure.
+
+ This will compile crossgcc's libs with -Os.
-config CC_GCC_V_7_1_0
+config CC_GCC_LIBMUDFLAP
bool
- prompt "7.1.0"
- select CC_GCC_7
-
-config CC_GCC_V_linaro_6_3
+ prompt "Compile libmudflap"
+ help
+ libmudflap is a pointer-use checking tool, which can detect
+ various mis-usages of pointers in C and (to some extents) C++.
+
+ You should say 'N' here, as libmduflap generates instrumented
+ code (thus it is a bit bigger and a bit slower) and requires
+ re-compilation and re-link, while it exists better run-time
+ alternatives (eg. DUMA, dmalloc...) that need neither re-
+ compilation nor re-link.
+
+config CC_GCC_LIBGOMP
bool
- prompt "linaro-6.3-2017.05"
- depends on CC_GCC_SHOW_LINARO
- select CC_GCC_6
+ prompt "Compile libgomp"
+ depends on !THREADS_NONE
+ help
+ libgomp is "the GNU implementation of the OpenMP Application Programming
+ Interface (API) for multi-platform shared-memory parallel programming in
+ C/C++ and Fortran". See:
+ http://gcc.gnu.org/onlinedocs/libgomp/
-config CC_GCC_V_6_3_0
- bool
- prompt "6.3.0"
- select CC_GCC_6
+ GNU OpenMP support requires threading.
-config CC_GCC_V_linaro_5_4
- bool
- prompt "linaro-5.4-2017.05"
- depends on CC_GCC_SHOW_LINARO
- select CC_GCC_5
+ The default is 'N'. Say 'Y' if you need it, and report success/failure.
-config CC_GCC_V_5_4_0
+config CC_GCC_LIBSSP
bool
- prompt "5.4.0"
- select CC_GCC_5
+ prompt "Compile libssp"
+ help
+ libssp is the run-time Stack-Smashing Protection library.
+
+ The default is 'N'. Say 'Y' if you need it, and report success/failure.
-config CC_GCC_V_linaro_4_9
+config CC_GCC_LIBQUADMATH
bool
- prompt "linaro-4.9-2017.01"
- depends on CC_GCC_SHOW_LINARO
- select CC_GCC_4_9
+ prompt "Compile libquadmath"
+ help
+ libquadmath is a library which provides quad-precision mathematical
+ functions on targets supporting the __float128 datatype. See:
+ http://gcc.gnu.org/onlinedocs/libquadmath/
+
+ The default is 'N'. Say 'Y' if you need it, and report success/failure.
-config CC_GCC_V_4_9_4
+config CC_GCC_LIBSANITIZER
bool
- prompt "4.9.4"
- select CC_GCC_4_9
+ prompt "Compile libsanitizer"
+ depends on THREADS_NATIVE
+ depends on !LIBC_UCLIBC && !LIBC_MUSL # Currently lacks required headers (like netrom.h)
+ help
+ libsanitizer is a library which provides run-time sanitising of either
+ or both of:
+ - memory access patterns (out-of-bonds, use-after-free)
+ - racy data accesses (in multi-threaded programs)
-config CC_GCC_V_linaro_4_8
- bool
- prompt "linaro-4.8-2015.06 (OBSOLETE)"
- depends on CC_GCC_SHOW_LINARO
- depends on OBSOLETE
- select CC_GCC_4_8
+ The default is 'N'. Say 'Y' if you need it, and report success/failure.
-config CC_GCC_V_4_8_5
+config CC_GCC_LIBMPX
bool
- prompt "4.8.5 (OBSOLETE)"
- select CC_GCC_4_8
- depends on OBSOLETE
-
-endchoice
+ default y
+ prompt "Compile libmpx"
+ depends on CC_GCC_HAS_LIBMPX
+ depends on ARCH_X86
+ # MUSL does not define libc types that GCC requires. Mingw lacks certain headers.
+ depends on !LIBC_MUSL && !LIBC_MINGW_W64
+ help
+ Enable GCC support for Intel Memory Protection Extensions (MPX).
-endif # ! CC_GCC_CUSTOM
+#-----------------------------------------------------------------------------
-config CC_GCC_4_8
- bool
- select CC_GCC_4_8_or_later
+comment "Misc. obscure options."
-config CC_GCC_4_8_or_later
+config CC_CXA_ATEXIT
bool
+ prompt "Use __cxa_atexit"
+ default y
+ depends on ! BARE_METAL || LIBC_PROVIDES_CXA_ATEXIT
+ help
+ If you get the missing symbol "__cxa_atexit" when building C++ programs,
+ you might want to try disabling this option.
-config CC_GCC_4_9
+config CC_GCC_DISABLE_PCH
bool
- select CC_GCC_4_9_or_later
-
-config CC_GCC_4_9_or_later
+ prompt "Do not build PCH"
+ help
+ Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain.
+ at the expense of speed when compiling C++ code.
+
+ For some configurations (most notably canadian?), PCH are broken, and
+ need to be disabled. Please see:
+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
+
+config CC_GCC_SJLJ_EXCEPTIONS
+ tristate
+ prompt "Use sjlj for exceptions"
+ depends on ! BARE_METAL
+ default m
+ help
+ 'sjlj' is short for setjmp/longjmp.
+
+ On some architectures, stack unwinding during exception handling
+ works perfectly well without using sjlj, while on some others,
+ use of sjlj is required for proper stack unwinding.
+
+ Option | sjlj use | Associated ./configure switch
+ ---------+--------------------+--------------------------------
+ Y | forcibly used | --enable-sjlj-exceptions
+ M | auto | (none, ./configure decides)
+ N | forcibly not used | --disable-sjlj-exceptions
+
+ It should be safe to say 'M' or 'N'.
+
+ It can happen that ./configure is wrong in some cases. Known
+ case is for ARM big endian, where you should say 'N'.
+
+config CC_GCC_LDBL_128
+ tristate
+ prompt "Enable 128-bit long doubles"
+ default m
+ help
+ Saying 'Y' will force gcc to use 128-bit wide long doubles
+ Saying 'N' will force gcc to use 64-bit wide long doubles
+ Saying 'M' will let gcc choose (default is 128-bit for
+ glibc >= 2.4, 64-bit otherwise)
+
+ If in doubt, keep the default, ie. 'M'.
+
+config CC_GCC_BUILD_ID
bool
- select CC_GCC_4_8_or_later
-
-config CC_GCC_5
+ prompt "Enable build-id"
+ help
+ Tells GCC to pass --build-id option to the linker for all final
+ links (links performed without the -r or --relocatable option),
+ if the linker supports it. If you say 'y' here, but your linker
+ does not support --build-id option, a warning is issued and this
+ option is ignored.
+
+ The default is off.
+
+choice CC_GCC_LNK_HASH_STYLE_CHOICE
bool
- select CC_GCC_5_or_later
+ prompt "linker hash style"
+ depends on BINUTILS_HAS_HASH_STYLE
-config CC_GCC_5_or_later
+config CC_GCC_LNK_HASH_STYLE_DEFAULT
bool
- select CC_GCC_4_9_or_later
- select CC_GCC_HAS_LIBMPX
+ prompt "Default"
+ help
+ Do not specify any value, and use the default value (sysv).
-config CC_GCC_6
+config CC_GCC_LNK_HASH_STYLE_SYSV
bool
- select CC_GCC_6_or_later
+ prompt "sysv"
+ help
+ Force use of the SYSV hash style.
-config CC_GCC_6_or_later
+config CC_GCC_LNK_HASH_STYLE_GNU
bool
- select CC_GCC_5_or_later
+ prompt "gnu"
+ help
+ Force use of the GNU hash style.
-config CC_GCC_7
+config CC_GCC_LNK_HASH_STYLE_BOTH
bool
- select CC_GCC_7_or_later
+ prompt "both"
+ help
+ Force use of both hash styles.
-config CC_GCC_7_or_later
- bool
- select CC_GCC_6_or_later
+endchoice # CC_GCC_LNK_HASH_STYLE_CHOICE
-config CC_GCC_latest
- bool
- select CC_GCC_7_or_later
+config CC_GCC_LNK_HASH_STYLE
+ string
+ default "" if CC_GCC_LNK_HASH_STYLE_DEFAULT
+ default "sysv" if CC_GCC_LNK_HASH_STYLE_SYSV
+ default "gnu" if CC_GCC_LNK_HASH_STYLE_GNU
+ default "both" if CC_GCC_LNK_HASH_STYLE_BOTH
+
+choice CC_GCC_DEC_FLOATS_CHOICE
+ bool "Decimal floats"
+ default CC_GCC_DEC_FLOATS_AUTO
+ help
+ Choose what type of decimal floats to support.
+
+ Note that using decimal floats requires a C library that provides
+ support for fenv (namely, the fenv.h header). This is the case
+ for (e)glibc, and uClibc on x86/32. For other C libraries, or
+ uClibc on other archs, this might not be the case, so you should
+ disable support for decimal floats.
+
+ The default is to let ./configure decide.
+
+config CC_GCC_DEC_FLOAT_AUTO
+ bool "auto"
+ help
+ Let ./configure decide. If you say 'y' here, gcc will default to:
+ - 'bid' for x86 (32- and 64-bit)
+ - 'dpd' for powerpc
+ - 'no' for the other architectures
-# Only enable gcc's support for plugins if binutils has it as well
-# They are useful only when doing LTO, but it does no harm enabling
-# them even without LTO.
-config CC_GCC_ENABLE_PLUGINS
- bool
- depends on BINUTILS_PLUGINS
- depends on ! STATIC_TOOLCHAIN
- default y
+config CC_GCC_DEC_FLOAT_BID
+ bool "bid"
+ help
+ Use the 'binary integer decimal' format for decimal floats.
-# If binutils installs gold, enable support for gold in gcc
-config CC_GCC_GOLD
- bool
- depends on BINUTILS_GOLD_INSTALLED
- default y
+config CC_GCC_DEC_FLOAT_DPD
+ bool "dpd"
+ help
+ Use the 'densely packed decimal' for decimal floats.
-config CC_GCC_HAS_LIBMPX
- bool
+config CC_GCC_DEC_FLOATS_NO
+ bool "no"
+ help
+ Do not support decimal floats. The default.
-if ! CC_GCC_CUSTOM
+endchoice # CC_GCC_DEC_FLOATS_CHOICE
-config CC_GCC_VERSION
+config CC_GCC_DEC_FLOATS
string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "7.1.0" if CC_GCC_V_7_1_0
- default "linaro-6.3-2017.05" if CC_GCC_V_linaro_6_3
- default "6.3.0" if CC_GCC_V_6_3_0
- default "linaro-5.4-2017.05" if CC_GCC_V_linaro_5_4
- default "5.4.0" if CC_GCC_V_5_4_0
- default "linaro-4.9-2017.01" if CC_GCC_V_linaro_4_9
- default "4.9.4" if CC_GCC_V_4_9_4
- default "linaro-4.8-2015.06" if CC_GCC_V_linaro_4_8
- default "4.8.5" if CC_GCC_V_4_8_5
-
-endif # ! CC_GCC_CUSTOM
+ default "" if CC_GCC_DEC_FLOATS_AUTO
+ default "bid" if CC_GCC_DEC_FLOATS_BID
+ default "dpd" if CC_GCC_DEC_FLOATS_DPD
+ default "no" if CC_GCC_DEC_FLOATS_NO
-config CC_LANG_JAVA_USE_ECJ
+#-----------------------------------------------------------------------------
+
+config CC_GCC_HAS_ARCH_OPTIONS
bool
- default y
- depends on CC_LANG_JAVA
-source "config/cc/gcc.in.2"
+comment "archictecture-specific options"
+ depends on CC_GCC_HAS_ARCH_OPTIONS
+
+if ARCH_MIPS
+source "config/cc/gcc.in.mips"
+endif # ARCH_MIPS
diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2
deleted file mode 100644
index 79a6225..0000000
--- a/config/cc/gcc.in.2
+++ /dev/null
@@ -1,387 +0,0 @@
-# gcc configuration options
-
-config CC_GCC_ENABLE_CXX_FLAGS
- string
- prompt "Flags to pass to --enable-cxx-flags"
- default ""
- help
- Enter here the value of the gcc's ./configure option --enable-cxx-flags.
- Leave empty if you don't know better.
-
- Note: just pass in the option _value_, that is only the part that goes
- after the '=' sign.
-
-config CC_GCC_CORE_EXTRA_CONFIG_ARRAY
- string
- prompt "Core gcc extra config"
- default ""
- depends on CC_CORE_PASS_1_NEEDED || CC_CORE_PASS_2_NEEDED
- help
- Extra flags to pass onto ./configure when configuring the core gcc.
-
- The core gcc is a stripped down, C-only compiler needed to build
- the C library. Kinda bootstrap gcc, if you wish.
-
- You can enter multiple arguments here, and arguments can contain spaces
- if they are properly quoted (or escaped, but prefer quotes). Eg.:
- --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
-
-config CC_GCC_EXTRA_CONFIG_ARRAY
- string
- prompt "gcc extra config"
- default ""
- help
- Extra flags to pass onto ./configure when configuring gcc.
-
- You can enter multiple arguments here, and arguments can contain spaces
- if they are properly quoted (or escaped, but prefer quotes). Eg.:
- --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
-
-config CC_GCC_MULTILIB_LIST
- string
- prompt "List of multilib variants"
- depends on MULTILIB
- help
- Architecture-specific option of expanding or restricting the list of
- the multilib variants to be built. Refer to GCC installation manual
- for the format of this option for a particular architecture.
- Leave empty to use the default list for this architecture.
-
-config STATIC_TOOLCHAIN
- bool
- select CC_GCC_STATIC_LIBSTDCXX
-
-config CC_GCC_STATIC_LIBSTDCXX
- bool
- prompt "Link libstdc++ statically into the gcc binary"
- default y
- depends on CONFIGURE_has_static_link || CANADIAN || CROSS_NATIVE
- select WANTS_STATIC_LINK if CROSS || NATIVE
- select WANTS_STATIC_LINK_CXX if CROSS || NATIVE
- help
- Newer gcc versions require some c++ libraries. So statically
- linking libstdc++ increases the likeliness that the gcc binary will
- run on machines other than the one which it was built on, without
- having to worry about distributing the matching version of libstdc++
- along with it.
-
-config CC_GCC_SYSTEM_ZLIB
- bool
- prompt "Use system zlib"
- help
- Do not use bundled zlib, and use the zlib already available for
- the host (eg. the system library).
-
- If zlib is built as a companion library, selecting this option
- will use it.
-
- If you want to build a static toolchain, you will need to also
- install the static version of zlib for your host.
-
- If unsure, say 'n'.
-
-config CC_GCC_CONFIG_TLS
- tristate
- prompt "Configure TLS (Thread Local Storage)"
- depends on !LIBC_bionic
- default m
- help
- Specify that the target supports TLS (Thread Local Storage). Usually
- configure can correctly determine if TLS is supported. In cases where
- it guesses incorrectly, TLS can be explicitly enabled or disabled.
- This can happen if the assembler supports TLS but the C library does
- not, or if the assumptions made by the configure test are incorrect.
-
- Option | TLS use | Associated ./configure switch
- ---------+--------------------+--------------------------------
- Y | forcibly used | --enable-tls
- M | auto | (none, ./configure decides)
- N | forcibly not used | --disable-tls
-
- If unsure, say 'M'.
-
-#-----------------------------------------------------------------------------
-# Optimisation features
-
-comment "Optimisation features"
-
-# Defined in config/cc/gcc.in
-# For graphite: gcc needs cloog and isl
-# In >= gcc-5.x, cloog is no longer needed, but isl is.
-# Prompt in config/cc/gcc.in.2
-config CC_GCC_USE_GRAPHITE
- bool "Enable GRAPHITE loop optimisations"
- default y
- select CLOOG_NEEDED if !CC_GCC_5_or_later
- select ISL_NEEDED
- help
- Enable the GRAPHITE loop optimsations.
-
- On some systems (eg. Cygwin), CLooG and ISL (required to enable
- GRAPHITE) may not build properly (yet), so you'll have to say 'N'
- here (or help debug the issues)
-
- TODO: Is this still true on Cygwin?
-
-# The way LTO works is a bit twisted.
-# See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
-# Basically:
-# - if binutils has plugins: LTO is handled by ld/gold by loading
-# the plugin when linking
-# - if binutils does not have plugins: LTO is handled by collect2
-# In any case, LTO support does not depend on plugins, but takes
-# advantage of it
-config CC_GCC_USE_LTO
- bool "Enable LTO"
- default y
- depends on ! STATIC_TOOLCHAIN
- help
- Enable the Link Time Optimisations.
-
-#-----------------------------------------------------------------------------
-comment "Settings for libraries running on target"
-
-config CC_GCC_ENABLE_TARGET_OPTSPACE
- bool
- prompt "Optimize gcc libs for size"
- default y
- help
- Pass --enable-target-optspace to crossgcc's configure.
-
- This will compile crossgcc's libs with -Os.
-
-config CC_GCC_LIBMUDFLAP
- bool
- prompt "Compile libmudflap"
- help
- libmudflap is a pointer-use checking tool, which can detect
- various mis-usages of pointers in C and (to some extents) C++.
-
- You should say 'N' here, as libmduflap generates instrumented
- code (thus it is a bit bigger and a bit slower) and requires
- re-compilation and re-link, while it exists better run-time
- alternatives (eg. DUMA, dmalloc...) that need neither re-
- compilation nor re-link.
-
-config CC_GCC_LIBGOMP
- bool
- prompt "Compile libgomp"
- depends on !THREADS_NONE
- help
- libgomp is "the GNU implementation of the OpenMP Application Programming
- Interface (API) for multi-platform shared-memory parallel programming in
- C/C++ and Fortran". See:
- http://gcc.gnu.org/onlinedocs/libgomp/
-
- GNU OpenMP support requires threading.
-
- The default is 'N'. Say 'Y' if you need it, and report success/failure.
-
-config CC_GCC_LIBSSP
- bool
- prompt "Compile libssp"
- help
- libssp is the run-time Stack-Smashing Protection library.
-
- The default is 'N'. Say 'Y' if you need it, and report success/failure.
-
-config CC_GCC_LIBQUADMATH
- bool
- prompt "Compile libquadmath"
- help
- libquadmath is a library which provides quad-precision mathematical
- functions on targets supporting the __float128 datatype. See:
- http://gcc.gnu.org/onlinedocs/libquadmath/
-
- The default is 'N'. Say 'Y' if you need it, and report success/failure.
-
-config CC_GCC_LIBSANITIZER
- bool
- prompt "Compile libsanitizer"
- depends on THREADS_NATIVE
- depends on ! LIBC_uClibc && ! LIBC_musl # Currently lacks required headers (like netrom.h)
- help
- libsanitizer is a library which provides run-time sanitising of either
- or both of:
- - memory access patterns (out-of-bonds, use-after-free)
- - racy data accesses (in multi-threaded programs)
-
- The default is 'N'. Say 'Y' if you need it, and report success/failure.
-
-config CC_GCC_LIBMPX
- bool
- default y
- prompt "Compile libmpx"
- depends on CC_GCC_HAS_LIBMPX
- depends on ARCH_x86
- # MUSL does not define libc types that GCC requires. Mingw lacks certain headers.
- depends on !LIBC_musl && ! LIBC_mingw
- help
- Enable GCC support for Intel Memory Protection Extensions (MPX).
-
-#-----------------------------------------------------------------------------
-
-comment "Misc. obscure options."
-
-config CC_CXA_ATEXIT
- bool
- prompt "Use __cxa_atexit"
- default y
- depends on ! BARE_METAL || LIBC_PROVIDES_CXA_ATEXIT
- help
- If you get the missing symbol "__cxa_atexit" when building C++ programs,
- you might want to try disabling this option.
-
-config CC_GCC_DISABLE_PCH
- bool
- prompt "Do not build PCH"
- help
- Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain.
- at the expense of speed when compiling C++ code.
-
- For some configurations (most notably canadian?), PCH are broken, and
- need to be disabled. Please see:
- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
-
-config CC_GCC_SJLJ_EXCEPTIONS
- tristate
- prompt "Use sjlj for exceptions"
- depends on ! BARE_METAL
- default m
- help
- 'sjlj' is short for setjmp/longjmp.
-
- On some architectures, stack unwinding during exception handling
- works perfectly well without using sjlj, while on some others,
- use of sjlj is required for proper stack unwinding.
-
- Option | sjlj use | Associated ./configure switch
- ---------+--------------------+--------------------------------
- Y | forcibly used | --enable-sjlj-exceptions
- M | auto | (none, ./configure decides)
- N | forcibly not used | --disable-sjlj-exceptions
-
- It should be safe to say 'M' or 'N'.
-
- It can happen that ./configure is wrong in some cases. Known
- case is for ARM big endian, where you should say 'N'.
-
-config CC_GCC_LDBL_128
- tristate
- prompt "Enable 128-bit long doubles"
- default m
- help
- Saying 'Y' will force gcc to use 128-bit wide long doubles
- Saying 'N' will force gcc to use 64-bit wide long doubles
- Saying 'M' will let gcc choose (default is 128-bit for
- glibc >= 2.4, 64-bit otherwise)
-
- If in doubt, keep the default, ie. 'M'.
-
-config CC_GCC_BUILD_ID
- bool
- prompt "Enable build-id"
- help
- Tells GCC to pass --build-id option to the linker for all final
- links (links performed without the -r or --relocatable option),
- if the linker supports it. If you say 'y' here, but your linker
- does not support --build-id option, a warning is issued and this
- option is ignored.
-
- The default is off.
-
-choice CC_GCC_LNK_HASH_STYLE_CHOICE
- bool
- prompt "linker hash style"
- depends on BINUTILS_HAS_HASH_STYLE
-
-config CC_GCC_LNK_HASH_STYLE_DEFAULT
- bool
- prompt "Default"
- help
- Do not specify any value, and use the default value (sysv).
-
-config CC_GCC_LNK_HASH_STYLE_SYSV
- bool
- prompt "sysv"
- help
- Force use of the SYSV hash style.
-
-config CC_GCC_LNK_HASH_STYLE_GNU
- bool
- prompt "gnu"
- help
- Force use of the GNU hash style.
-
-config CC_GCC_LNK_HASH_STYLE_BOTH
- bool
- prompt "both"
- help
- Force use of both hash styles.
-
-endchoice # CC_GCC_LNK_HASH_STYLE_CHOICE
-
-config CC_GCC_LNK_HASH_STYLE
- string
- default "" if CC_GCC_LNK_HASH_STYLE_DEFAULT
- default "sysv" if CC_GCC_LNK_HASH_STYLE_SYSV
- default "gnu" if CC_GCC_LNK_HASH_STYLE_GNU
- default "both" if CC_GCC_LNK_HASH_STYLE_BOTH
-
-choice CC_GCC_DEC_FLOATS_CHOICE
- bool "Decimal floats"
- default CC_GCC_DEC_FLOATS_AUTO
- help
- Choose what type of decimal floats to support.
-
- Note that using decimal floats requires a C library that provides
- support for fenv (namely, the fenv.h header). This is the case
- for (e)glibc, and uClibc on x86/32. For other C libraries, or
- uClibc on other archs, this might not be the case, so you should
- disable support for decimal floats.
-
- The default is to let ./configure decide.
-
-config CC_GCC_DEC_FLOAT_AUTO
- bool "auto"
- help
- Let ./configure decide. If you say 'y' here, gcc will default to:
- - 'bid' for x86 (32- and 64-bit)
- - 'dpd' for powerpc
- - 'no' for the other architectures
-
-config CC_GCC_DEC_FLOAT_BID
- bool "bid"
- help
- Use the 'binary integer decimal' format for decimal floats.
-
-config CC_GCC_DEC_FLOAT_DPD
- bool "dpd"
- help
- Use the 'densely packed decimal' for decimal floats.
-
-config CC_GCC_DEC_FLOATS_NO
- bool "no"
- help
- Do not support decimal floats. The default.
-
-endchoice # CC_GCC_DEC_FLOATS_CHOICE
-
-config CC_GCC_DEC_FLOATS
- string
- default "" if CC_GCC_DEC_FLOATS_AUTO
- default "bid" if CC_GCC_DEC_FLOATS_BID
- default "dpd" if CC_GCC_DEC_FLOATS_DPD
- default "no" if CC_GCC_DEC_FLOATS_NO
-
-#-----------------------------------------------------------------------------
-
-config CC_GCC_HAS_ARCH_OPTIONS
- bool
-
-comment "archictecture-specific options"
- depends on CC_GCC_HAS_ARCH_OPTIONS
-
-if ARCH_mips
-source "config/cc/gcc.in.mips"
-endif # ARCH_mips
diff --git a/config/comp_libs.in b/config/comp_libs.in
new file mode 100644
index 0000000..009aac8
--- /dev/null
+++ b/config/comp_libs.in
@@ -0,0 +1,203 @@
+# Companion libraries config options
+# Those libraries are required for different versions of gcc,
+# and can be used by binutils and gdb (maybe others as well).
+
+menu "Companion libraries"
+
+config COMPLIBS_NEEDED
+ bool
+
+config LIBICONV_NEEDED
+ bool
+ select LIBICONV
+ select COMPLIBS_NEEDED
+
+config GETTEXT_NEEDED
+ bool
+ select GETTEXT
+ select LIBICONV_NEEDED
+ select COMPLIBS_NEEDED
+
+config GMP_NEEDED
+ def_bool y
+ select GMP
+ select COMPLIBS_NEEDED
+
+config MPFR_NEEDED
+ def_bool y
+ select MPFR
+ select COMPLIBS_NEEDED
+
+config ISL_NEEDED
+ bool
+ select ISL
+ select COMPLIBS_NEEDED
+
+config CLOOG_NEEDED
+ bool
+ select CLOOG
+ select COMPLIBS_NEEDED
+
+config MPC_NEEDED
+ def_bool y
+ select MPC
+ select COMPLIBS_NEEDED
+
+config LIBELF_NEEDED
+ bool
+ select LIBELF
+ select COMPLIBS_NEEDED
+
+config EXPAT_NEEDED
+ bool
+ select EXPAT
+ select COMPLIBS_NEEDED
+
+config NCURSES_NEEDED
+ bool
+ select NCURSES
+ select COMPLIBS_NEEDED
+
+config COMPLIBS
+ bool
+
+config LIBICONV
+ bool "Build local libiconv"
+ default y if CANADIAN || CROSS_NATIVE
+ select COMPLIBS
+
+config GETTEXT
+ bool "Build local gettext"
+ default y if CANADIAN || CROSS_NATIVE
+ select LIBICONV_NEEDED
+ select NCURSES_NEEDED
+ select COMPLIBS
+
+config GMP
+ bool
+ select COMPLIBS
+
+config MPFR
+ bool
+ select GMP
+ select COMPLIBS
+
+config ISL
+ bool
+ select GMP
+ select COMPLIBS
+
+config CLOOG
+ bool
+ select GMP
+ select COMPLIBS
+
+config MPC
+ bool
+ select GMP
+ select MPFR
+ select COMPLIBS
+
+config LIBELF
+ bool
+ select COMPLIBS
+
+config LIBELF_TARGET
+ bool
+
+config EXPAT
+ bool
+ select COMPLIBS
+
+config EXPAT_TARGET
+ bool
+
+config NCURSES
+ bool
+ select COMPLIBS
+
+config NCURSES_TARGET
+ bool
+
+config ZLIB
+ bool "Build local zlib"
+
+# FIXME this needs to have a list of options
+# [ ] libfoo for build
+# [ ] libfoo for host (if canadian)
+# [ ] libfoo for target
+# libfoo options -->
+#
+# Then have other packages *set default* for build/host
+# (but not select, so that user can utilize build's or host's system library)
+# and *select* the target (so that we build it if we must, and let user optionally
+# build it if he wants). Upon any of these options LIBFOO_{BUILD,HOST,TARGET}
+# being set, set LIBFOO_ENABLED and use that as a qualifier for submenu.
+# For now, just have comments delineating the libs.
+if ZLIB
+comment "zlib options"
+source "config/comp_libs/zlib.in"
+endif
+if LIBICONV
+comment "libiconv options"
+source "config/comp_libs/libiconv.in"
+endif
+if GETTEXT
+comment "gettext options"
+source "config/comp_libs/gettext.in"
+endif
+if GMP
+comment "GMP options"
+source "config/comp_libs/gmp.in"
+endif
+if MPFR
+comment "MPFR options"
+source "config/comp_libs/mpfr.in"
+endif
+if ISL
+comment "ISL options"
+source "config/comp_libs/isl.in"
+endif
+if CLOOG
+comment "CLooG options"
+source "config/comp_libs/cloog.in"
+endif
+if MPC
+comment "MPC options"
+source "config/comp_libs/mpc.in"
+endif
+if LIBELF || LIBELF_TARGET
+comment "libelf options"
+source "config/comp_libs/libelf.in"
+endif
+if EXPAT || EXPAT_TARGET
+comment "expat options"
+source "config/comp_libs/expat.in"
+endif
+if NCURSES || NCURSES_TARGET
+comment "ncurses options"
+source "config/comp_libs/ncurses.in"
+endif
+
+if COMPLIBS
+
+comment "Companion libraries common options"
+
+config COMPLIBS_CHECK
+ bool
+ prompt "Check the companion libraries builds (!!! READ HELP!!!)"
+ help
+ It is highly recommended to check the newly built companion libraries.
+ Unfortunately, this is a very intensive task, and takes a loooong time.
+
+ Checking the newly built companion libraries is thus disabled by default,
+ but it is suggested that you check them at least once on your machine,
+ and if they work, disable the check on subsequent builds.
+
+ If you suspect that one (or more) of your companion libraries is the
+ cause for incorrectly generated code, you should answer 'Y' here.
+ Note however that this will take a really long time.
+
+endif # COMPLIBS
+
+endmenu
diff --git a/config/comp_libs/cloog.in b/config/comp_libs/cloog.in
new file mode 100644
index 0000000..b894de9
--- /dev/null
+++ b/config/comp_libs/cloog.in
@@ -0,0 +1,11 @@
+# CLooG options
+## depends on OBSOLETE
+
+# CLooG 0.18.4 requires ISL 0.12 or newer
+# CLooG 0.18.1/0.18.0 requires ISL 0.12 or older
+
+source "config/versions/cloog.in"
+
+config CLOOG_HAS_WITH_GMP_ISL_OSL
+ bool
+ default y if CLOOG_0_18_or_later
diff --git a/config/comp_libs/expat.in b/config/comp_libs/expat.in
new file mode 100644
index 0000000..a2753a4
--- /dev/null
+++ b/config/comp_libs/expat.in
@@ -0,0 +1,3 @@
+# expat config file
+
+source "config/versions/expat.in"
diff --git a/config/comp_libs/gettext.in b/config/comp_libs/gettext.in
new file mode 100644
index 0000000..4928ede
--- /dev/null
+++ b/config/comp_libs/gettext.in
@@ -0,0 +1,3 @@
+# gettext options
+
+source "config/versions/gettext.in"
diff --git a/config/comp_libs/gmp.in b/config/comp_libs/gmp.in
new file mode 100644
index 0000000..28359cd
--- /dev/null
+++ b/config/comp_libs/gmp.in
@@ -0,0 +1,7 @@
+# GMP options
+
+source "config/versions/gmp.in"
+
+config GMP_HAS_MPBSD
+ bool
+ default y if !GMP_5_1_or_later
diff --git a/config/comp_libs/isl.in b/config/comp_libs/isl.in
new file mode 100644
index 0000000..9c74078
--- /dev/null
+++ b/config/comp_libs/isl.in
@@ -0,0 +1,26 @@
+# ISL options
+# FIXME these currently have no effect
+## select CLOOG_REQUIRE_0_18_1_or_older if !ISL_0_12_or_later
+## select CLOOG_REQUIRE_0_18_4_or_later if !ISL_0_14_or_older
+
+source "config/versions/isl.in"
+
+# FIXME should be auto-generated once companion libs are using gen-kconfig (and hence, ## syntax)
+config ISL_CLOOG_auto_select_1
+ def_bool y
+ depends on CLOOG_NEEDED && !ISL_0_12_or_later
+ select CLOOG_REQUIRE_0_18_1_or_older
+
+# FIXME should be auto-generated once companion libs are using gen-kconfig (and hence, ## syntax)
+config ISL_CLOOG_auto_select_2
+ def_bool y
+ depends on CLOOG_NEEDED && !ISL_0_13_or_older
+ select CLOOG_REQUIRE_0_18_4_or_later
+
+config ISL_NEEDS_WITH_GMP
+ bool
+ default y if !ISL_0_12_or_later
+
+config ISL_HAS_WITH_PIPLIB
+ bool
+ default y if !ISL_0_14_or_later
diff --git a/config/comp_libs/libelf.in b/config/comp_libs/libelf.in
new file mode 100644
index 0000000..5b268c1
--- /dev/null
+++ b/config/comp_libs/libelf.in
@@ -0,0 +1,3 @@
+# libelf config file
+
+source "config/versions/libelf.in"
diff --git a/config/comp_libs/libiconv.in b/config/comp_libs/libiconv.in
new file mode 100644
index 0000000..99d3365
--- /dev/null
+++ b/config/comp_libs/libiconv.in
@@ -0,0 +1,3 @@
+# libiconv options
+
+source "config/versions/libiconv.in"
diff --git a/config/comp_libs/mpc.in b/config/comp_libs/mpc.in
new file mode 100644
index 0000000..790e755
--- /dev/null
+++ b/config/comp_libs/mpc.in
@@ -0,0 +1,3 @@
+# MPC options
+
+source "config/versions/mpc.in"
diff --git a/config/comp_libs/mpfr.in b/config/comp_libs/mpfr.in
new file mode 100644
index 0000000..5ed7ac8
--- /dev/null
+++ b/config/comp_libs/mpfr.in
@@ -0,0 +1,3 @@
+# GMP options
+
+source "config/versions/mpfr.in"
diff --git a/config/comp_libs/ncurses.in b/config/comp_libs/ncurses.in
new file mode 100644
index 0000000..7087fbe
--- /dev/null
+++ b/config/comp_libs/ncurses.in
@@ -0,0 +1,59 @@
+# expat config file
+
+source "config/versions/ncurses.in"
+
+config NCURSES_NEW_ABI
+ bool "ncurses 6.0 ABI support"
+ depends on EXPERIMENTAL
+ help
+ This option allows you to use the new ncurses-6 ABI.
+ It's wise to leave this disabled and stick with the ncurses-5 ABI!
+
+config NCURSES_HOST_CONFIG_ARGS
+ string "Extra configure arguments for host ncurses"
+ help
+ Extra arguments that are passed verbatim to the configure when
+ building host ncurses.
+
+config NCURSES_HOST_DISABLE_DB
+ bool "Disable terminfo DB on the host"
+ default y
+ help
+ The terminfo database is not currently not installed on the host
+ as a part of the toolchain built by crosstool-ng. This means the
+ library will not be able to use the terminals, unless that database
+ comes preinstalled.
+
+ Selecting this option allows one to embed some popular terminal
+ definitions into the library itself.
+
+ If not select, the path to the terminfo database on the host will
+ likely need to be passed as an argument to configure.
+
+config NCURSES_HOST_FALLBACKS
+ string "List of fallback terminals for the host"
+ default "linux,xterm,xterm-color,xterm-256color,vt100"
+ help
+ List of terminal descriptions that will be compiled into the curses
+ library for the host.
+
+config NCURSES_TARGET_CONFIG_ARGS
+ string "Extra configure arguments for target ncurses"
+ help
+ Extra arguments that are passed verbatim to the configure when
+ building target ncurses.
+
+config NCURSES_TARGET_DISABLE_DB
+ bool "Disable terminfo DB on the target"
+ default n
+ help
+ The terminfo database is installed with the terminfo database for the
+ target. If you want to configure ncurses with preselected terminals,
+ select Y here.
+
+config NCURSES_TARGET_FALLBACKS
+ string "List of fallback terminals for the target"
+ help
+ List of terminal descriptions that will be compiled into the curses
+ library for the target.
+
diff --git a/config/comp_libs/zlib.in b/config/comp_libs/zlib.in
new file mode 100644
index 0000000..70668e2
--- /dev/null
+++ b/config/comp_libs/zlib.in
@@ -0,0 +1,3 @@
+# Zlib options
+
+source "config/versions/zlib.in"
diff --git a/config/comp_tools.in b/config/comp_tools.in
new file mode 100644
index 0000000..020a070
--- /dev/null
+++ b/config/comp_tools.in
@@ -0,0 +1,15 @@
+# Companion tools config options
+
+menu "Companion tools"
+
+config COMP_TOOLS_FOR_HOST
+ bool
+ prompt "Install companion tools for host"
+ help
+ Enable this option if you want to include the selected companion
+ tools into the final toolchain (rather than just using them
+ to build it).
+
+source "config/gen/comp_tools.in"
+
+endmenu
diff --git a/config/comp_tools/autoconf.in b/config/comp_tools/autoconf.in
new file mode 100644
index 0000000..b49017d
--- /dev/null
+++ b/config/comp_tools/autoconf.in
@@ -0,0 +1,7 @@
+# Autoconf
+
+## default y if !CONFIGURE_has_autoconf_2_63_or_newer
+## default y if !CONFIGURE_has_autoreconf_2_63_or_newer
+## help Autoconf
+
+source "config/versions/autoconf.in"
diff --git a/config/comp_tools/automake.in b/config/comp_tools/automake.in
new file mode 100644
index 0000000..455200e
--- /dev/null
+++ b/config/comp_tools/automake.in
@@ -0,0 +1,6 @@
+# Automake
+
+## default y if !CONFIGURE_has_automake_1_15_or_newer
+## help Automake
+
+source "config/versions/automake.in"
diff --git a/config/comp_tools/libtool.in b/config/comp_tools/libtool.in
new file mode 100644
index 0000000..071b53e
--- /dev/null
+++ b/config/comp_tools/libtool.in
@@ -0,0 +1,6 @@
+# Libtool
+
+## default y if !CONFIGURE_has_libtool_2_4_or_newer
+## default y if !CONFIGURE_has_libtoolize_2_4_or_newer
+
+source "config/versions/libtool.in"
diff --git a/config/comp_tools/m4.in b/config/comp_tools/m4.in
new file mode 100644
index 0000000..1a81a9f
--- /dev/null
+++ b/config/comp_tools/m4.in
@@ -0,0 +1,5 @@
+# GNU m4
+
+## default y if !CONFIGURE_has_gnu_m4_1_4_12_or_newer
+
+source "config/versions/m4.in"
diff --git a/config/comp_tools/make.in b/config/comp_tools/make.in
new file mode 100644
index 0000000..07331d5
--- /dev/null
+++ b/config/comp_tools/make.in
@@ -0,0 +1,10 @@
+# GNU make
+
+## default y if !CONFIGURE_has_make_3_81_or_newer
+
+source "config/versions/make.in"
+
+config MAKE_GMAKE_SYMLINK
+ bool
+ prompt "Add gmake symlink to companion gnu/make"
+ depends on COMP_TOOLS_MAKE
diff --git a/config/companion_libs.in b/config/companion_libs.in
deleted file mode 100644
index fae49ec..0000000
--- a/config/companion_libs.in
+++ /dev/null
@@ -1,186 +0,0 @@
-# Companion libraries config options
-# Those libraries are required for different versions of gcc,
-# and can be used by binutils and gdb (maybe others as well).
-
-menu "Companion libraries"
-
-config COMPLIBS_NEEDED
- bool
-
-config LIBICONV_NEEDED
- bool
- select LIBICONV
- select COMPLIBS_NEEDED
-
-config GETTEXT_NEEDED
- bool
- select GETTEXT
- select LIBICONV_NEEDED
- select COMPLIBS_NEEDED
-
-config GMP_NEEDED
- def_bool y
- select GMP
- select COMPLIBS_NEEDED
-
-config MPFR_NEEDED
- def_bool y
- select MPFR
- select COMPLIBS_NEEDED
-
-config ISL_NEEDED
- bool
- select ISL
- select COMPLIBS_NEEDED
-
-config CLOOG_NEEDED
- bool
- select CLOOG
- select COMPLIBS_NEEDED
-
-config MPC_NEEDED
- def_bool y
- select MPC
- select COMPLIBS_NEEDED
-
-config LIBELF_NEEDED
- bool
- select LIBELF
- select COMPLIBS_NEEDED
-
-config EXPAT_NEEDED
- bool
- select EXPAT
- select COMPLIBS_NEEDED
-
-config NCURSES_NEEDED
- bool
- select NCURSES
- select COMPLIBS_NEEDED
-
-config COMPLIBS
- bool
-
-config LIBICONV
- bool "Build local libiconv"
- default y if CANADIAN || CROSS_NATIVE
- select COMPLIBS
-
-config GETTEXT
- bool "Build local gettext"
- default y if CANADIAN || CROSS_NATIVE
- select LIBICONV_NEEDED
- select NCURSES_NEEDED
- select COMPLIBS
-
-config GMP
- bool
- select COMPLIBS
-
-config MPFR
- bool
- select GMP
- select COMPLIBS
-
-config ISL
- bool
- select GMP
- select COMPLIBS
-
-config CLOOG
- bool
- select GMP
- select COMPLIBS
-
-config MPC
- bool
- select GMP
- select MPFR
- select COMPLIBS
-
-config LIBELF
- bool
- select COMPLIBS
-
-config LIBELF_TARGET
- bool
-
-config EXPAT
- bool
- select COMPLIBS
-
-config EXPAT_TARGET
- bool
-
-config NCURSES
- bool
- select COMPLIBS
-
-config NCURSES_TARGET
- bool
-
-config ZLIB
- bool "Build local zlib"
-
-if ZLIB
-source "config/companion_libs/zlib.in"
-endif
-if LIBICONV
-source "config/companion_libs/libiconv.in"
-endif
-if GETTEXT
-source "config/companion_libs/gettext.in"
-endif
-if GMP
-source "config/companion_libs/gmp.in"
-endif
-if MPFR
-source "config/companion_libs/mpfr.in"
-endif
-if ISL
-source "config/companion_libs/isl.in"
-endif
-if CLOOG
-source "config/companion_libs/cloog.in"
-endif
-if MPC
-source "config/companion_libs/mpc.in"
-endif
-if LIBELF || LIBELF_TARGET
-comment "libelf version needed to build for target"
- depends on !LIBELF
-source "config/companion_libs/libelf.in"
-endif
-if EXPAT || EXPAT_TARGET
-comment "expat version needed to build for target"
- depends on !EXPAT
-source "config/companion_libs/expat.in"
-endif
-if NCURSES || NCURSES_TARGET
-comment "ncurses version needed to build for target"
- depends on !NCURSES
-source "config/companion_libs/ncurses.in"
-endif
-
-if COMPLIBS
-
-comment "Companion libraries common options"
-
-config COMPLIBS_CHECK
- bool
- prompt "Check the companion libraries builds (!!! READ HELP!!!)"
- help
- It is highly recommended to check the newly built companion libraries.
- Unfortunately, this is a very intensive task, and takes a loooong time.
-
- Checking the newly built companion libraries is thus disabled by default,
- but it is suggested that you check them at least once on your machine,
- and if they work, disable the check on subsequent builds.
-
- If you suspect that one (or more) of your companion libraries is the
- cause for incorrectly generated code, you should answer 'Y' here.
- Note however that this will take a really long time.
-
-endif # COMPLIBS
-
-endmenu
diff --git a/config/companion_libs/cloog.in b/config/companion_libs/cloog.in
deleted file mode 100644
index 95b283c..0000000
--- a/config/companion_libs/cloog.in
+++ /dev/null
@@ -1,51 +0,0 @@
-# CLooG options
-## depends on OBSOLETE
-
-# CLooG 0.18.4 requires ISL 0.12 or newer
-# CLooG 0.18.1/0.18.0 frequires ISL 0.12 or older
-choice
- bool
- prompt "CLooG version"
-
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config CLOOG_V_0_18_4
- bool
- prompt "0.18.4"
- depends on ISL_V_0_12_or_later
- select CLOOG_0_18_4_or_later
-
-config CLOOG_V_0_18_1
- bool
- prompt "0.18.1 (OBSOLETE)"
- depends on !ISL_V_0_14_or_later
- depends on OBSOLETE
- select CLOOG_0_18_or_later
-
-config CLOOG_V_0_18_0
- bool
- prompt "0.18.0 (OBSOLETE)"
- depends on !ISL_V_0_14_or_later
- depends on OBSOLETE
- select CLOOG_0_18_or_later
-
-endchoice
-
-config CLOOG_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "0.18.4" if CLOOG_V_0_18_4
- default "0.18.1" if CLOOG_V_0_18_1
- default "0.18.0" if CLOOG_V_0_18_0
-
-config CLOOG_0_18_4_or_later
- bool
- select CLOOG_0_18_or_later
-
-config CLOOG_0_18_or_later
- bool
-
-config CLOOG_NEEDS_AUTORECONF
- bool
diff --git a/config/companion_libs/expat.in b/config/companion_libs/expat.in
deleted file mode 100644
index 40ad66c..0000000
--- a/config/companion_libs/expat.in
+++ /dev/null
@@ -1,25 +0,0 @@
-# expat config file
-
-choice
- bool
- prompt "expat version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config EXPAT_V_2_2_0
- bool
- prompt "2.2.0"
-
-config EXPAT_V_2_1_1
- bool
- prompt "2.1.1 (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-config EXPAT_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "2.2.0" if EXPAT_V_2_2_0
- default "2.1.1" if EXPAT_V_2_1_1
diff --git a/config/companion_libs/gettext.in b/config/companion_libs/gettext.in
deleted file mode 100644
index d76955a..0000000
--- a/config/companion_libs/gettext.in
+++ /dev/null
@@ -1,25 +0,0 @@
-# gettext options
-
-choice
- bool
- prompt "gettext version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config GETTEXT_V_0_19_8_1
- bool
- prompt "0.19.8.1"
-
-config GETTEXT_V_0_19_7
- bool
- prompt "0.19.7 (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-config GETTEXT_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "0.19.8.1" if GETTEXT_V_0_19_8_1
- default "0.19.7" if GETTEXT_V_0_19_7
diff --git a/config/companion_libs/gmp.in b/config/companion_libs/gmp.in
deleted file mode 100644
index 167c772..0000000
--- a/config/companion_libs/gmp.in
+++ /dev/null
@@ -1,83 +0,0 @@
-# GMP options
-
-choice
- bool
- prompt "GMP version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config GMP_V_6_1_2
- bool
- prompt "6.1.2"
- select GMP_5_0_2_or_later
-
-config GMP_V_6_1_0
- bool
- prompt "6.1.0 (OBSOLETE)"
- select GMP_5_0_2_or_later
- depends on OBSOLETE
-
-config GMP_V_6_0_0
- bool
- prompt "6.0.0a (OBSOLETE)"
- select GMP_5_0_2_or_later
- depends on OBSOLETE
-
-config GMP_V_5_1_3
- bool
- prompt "5.1.3 (OBSOLETE)"
- select GMP_5_0_2_or_later
- depends on OBSOLETE
-
-config GMP_V_5_1_1
- bool
- prompt "5.1.1 (OBSOLETE)"
- select GMP_5_0_2_or_later
- depends on OBSOLETE
-
-config GMP_V_5_0_2
- bool
- prompt "5.0.2 (OBSOLETE)"
- select GMP_5_0_2_or_later
- depends on OBSOLETE
-
-config GMP_V_5_0_1
- bool
- prompt "5.0.1 (OBSOLETE)"
- depends on OBSOLETE
-
-config GMP_V_4_3_2
- bool
- prompt "4.3.2 (OBSOLETE)"
- depends on OBSOLETE
-
-config GMP_V_4_3_1
- bool
- prompt "4.3.1 (OBSOLETE)"
- depends on OBSOLETE
-
-config GMP_V_4_3_0
- bool
- prompt "4.3.0 (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-# To disable --enable-mpbsd
-config GMP_5_0_2_or_later
- bool
-
-config GMP_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "6.1.2" if GMP_V_6_1_2
- default "6.1.0" if GMP_V_6_1_0
- default "6.0.0a" if GMP_V_6_0_0
- default "5.1.3" if GMP_V_5_1_3
- default "5.1.1" if GMP_V_5_1_1
- default "5.0.2" if GMP_V_5_0_2
- default "5.0.1" if GMP_V_5_0_1
- default "4.3.2" if GMP_V_4_3_2
- default "4.3.1" if GMP_V_4_3_1
- default "4.3.0" if GMP_V_4_3_0
diff --git a/config/companion_libs/isl.in b/config/companion_libs/isl.in
deleted file mode 100644
index bb2766f..0000000
--- a/config/companion_libs/isl.in
+++ /dev/null
@@ -1,92 +0,0 @@
-# ISL options
-
-# GCC 4.8 supports ISL 0.10 to 0.14
-# GCC 4.9 supports ISL 0.10 to 0.15
-# GCC 5 supports ISL 0.12 to 0.16
-# GCC 6 supports ISL 0.14 to 0.16
-# Starting with GCC 5, GCC's configure no longer checks the ISL version explicitly,
-# despite what the configure's message says ("checking for isl 0.15 or 0.16").
-# Instead, it verifies that certain interfaces are available, so it accepts 0.17.1
-# or 0.18 under that check. Include them as experimental just in case anyone needs
-# the bugfixes in these releases.
-choice
- bool
- prompt "ISL version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config ISL_V_0_18
- bool
- prompt "0.18"
- depends on EXPERIMENTAL # Not officially recommended by GCC
- depends on CC_GCC_5_or_later
- select ISL_V_0_16_or_later
-
-config ISL_V_0_17_1
- bool
- prompt "0.17.1"
- depends on EXPERIMENTAL # Not officially recommended by GCC
- depends on CC_GCC_5_or_later
- select ISL_V_0_16_or_later
-
-config ISL_V_0_16_1
- bool
- prompt "0.16.1"
- depends on CC_GCC_5_or_later
- select ISL_V_0_16_or_later
-
-# Linaro version of 4.9 does not support ISL 0.15, but most recent
-# mainline 4.9 release (4.9.4) does.
-config ISL_V_0_15
- bool
- prompt "0.15"
- depends on CC_GCC_4_9_or_later
- select ISL_V_0_15_or_later
-
-config ISL_V_0_14
- bool
- prompt "0.14 (OBSOLETE)"
- select ISL_V_0_14_or_later
- depends on OBSOLETE
-
-config ISL_V_0_12_2
- bool
- prompt "0.12.2 (OBSOLETE)"
- depends on !CC_GCC_6_or_later
- select ISL_V_0_12_or_later
- depends on OBSOLETE
-
-config ISL_V_0_11_1
- bool
- prompt "0.11.1 (OBSOLETE)"
- depends on !CC_GCC_4_9_or_later
- depends on OBSOLETE
-
-endchoice
-
-config ISL_V_0_16_or_later
- bool
- select ISL_V_0_15_or_later
-
-config ISL_V_0_15_or_later
- bool
- select ISL_V_0_14_or_later
-
-config ISL_V_0_14_or_later
- bool
- select ISL_V_0_12_or_later
-
-config ISL_V_0_12_or_later
- bool
-
-config ISL_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "0.18" if ISL_V_0_18
- default "0.17.1" if ISL_V_0_17_1
- default "0.16.1" if ISL_V_0_16_1
- default "0.15" if ISL_V_0_15
- default "0.14" if ISL_V_0_14
- default "0.12.2" if ISL_V_0_12_2
- default "0.11.1" if ISL_V_0_11_1
diff --git a/config/companion_libs/libelf.in b/config/companion_libs/libelf.in
deleted file mode 100644
index b01ab36..0000000
--- a/config/companion_libs/libelf.in
+++ /dev/null
@@ -1,25 +0,0 @@
-# libelf config file
-
-choice
- bool
- prompt "libelf version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config LIBELF_V_0_8_13
- bool
- prompt "0.8.13"
-
-config LIBELF_V_0_8_12
- bool
- prompt "0.8.12 (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-config LIBELF_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "0.8.13" if LIBELF_V_0_8_13
- default "0.8.12" if LIBELF_V_0_8_12
diff --git a/config/companion_libs/libiconv.in b/config/companion_libs/libiconv.in
deleted file mode 100644
index d871681..0000000
--- a/config/companion_libs/libiconv.in
+++ /dev/null
@@ -1,24 +0,0 @@
-# libiconv options
-
-choice
- bool
- prompt "libiconv version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config LIBICONV_V_1_15
- bool
- prompt "1.15"
-
-config LIBICONV_V_1_14
- bool
- prompt "1.14"
-
-endchoice
-
-config LIBICONV_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "1.15" if LIBICONV_V_1_15
- default "1.14" if LIBICONV_V_1_14
diff --git a/config/companion_libs/mpc.in b/config/companion_libs/mpc.in
deleted file mode 100644
index cd8132d..0000000
--- a/config/companion_libs/mpc.in
+++ /dev/null
@@ -1,61 +0,0 @@
-# MPC options
-
-choice
- bool
- prompt "MPC version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config MPC_V_1_0_3
- bool
- prompt "1.0.3"
-
-config MPC_V_1_0_2
- bool
- prompt "1.0.2 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPC_V_1_0_1
- bool
- prompt "1.0.1 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPC_V_1_0
- bool
- prompt "1.0 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPC_V_0_9
- bool
- prompt "0.9 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPC_V_0_8_2
- bool
- prompt "0.8.2 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPC_V_0_8_1
- bool
- prompt "0.8.1 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPC_V_0_7
- bool
- prompt "0.7 (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-config MPC_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "1.0.3" if MPC_V_1_0_3
- default "1.0.2" if MPC_V_1_0_2
- default "1.0.1" if MPC_V_1_0_1
- default "1.0" if MPC_V_1_0
- default "0.9" if MPC_V_0_9
- default "0.8.2" if MPC_V_0_8_2
- default "0.8.1" if MPC_V_0_8_1
- default "0.7" if MPC_V_0_7
diff --git a/config/companion_libs/mpfr.in b/config/companion_libs/mpfr.in
deleted file mode 100644
index ce33b3d..0000000
--- a/config/companion_libs/mpfr.in
+++ /dev/null
@@ -1,67 +0,0 @@
-# GMP options
-
-choice
- bool
- prompt "MPFR version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config MPFR_V_3_1_5
- bool
- prompt "3.1.5"
-
-config MPFR_V_3_1_3
- bool
- prompt "3.1.3 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPFR_V_3_1_2
- bool
- prompt "3.1.2 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPFR_V_3_1_0
- bool
- prompt "3.1.0 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPFR_V_3_0_1
- bool
- prompt "3.0.1 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPFR_V_3_0_0
- bool
- prompt "3.0.0 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPFR_V_2_4_2
- bool
- prompt "2.4.2 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPFR_V_2_4_1
- bool
- prompt "2.4.1 (OBSOLETE)"
- depends on OBSOLETE
-
-config MPFR_V_2_4_0
- bool
- prompt "2.4.0 (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-config MPFR_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "3.1.5" if MPFR_V_3_1_5
- default "3.1.3" if MPFR_V_3_1_3
- default "3.1.2" if MPFR_V_3_1_2
- default "3.1.0" if MPFR_V_3_1_0
- default "3.0.1" if MPFR_V_3_0_1
- default "3.0.0" if MPFR_V_3_0_0
- default "2.4.2" if MPFR_V_2_4_2
- default "2.4.1" if MPFR_V_2_4_1
- default "2.4.0" if MPFR_V_2_4_0
diff --git a/config/companion_libs/ncurses.in b/config/companion_libs/ncurses.in
deleted file mode 100644
index 68ecbb7..0000000
--- a/config/companion_libs/ncurses.in
+++ /dev/null
@@ -1,75 +0,0 @@
-# expat config file
-
-choice
- bool
- prompt "ncurses version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config NCURSES_V_6_0
- bool
- prompt "6.0"
-
-endchoice
-
-config NCURSES_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "6.0" if NCURSES_V_6_0
-
-config NCURSES_NEW_ABI
- bool "ncurses 6.0 ABI support"
- depends on EXPERIMENTAL
- help
- This option allows you to use the new ncurses-6 ABI.
- It's wise to leave this disabled and stick with the ncurses-5 ABI!
-
-config NCURSES_HOST_CONFIG_ARGS
- string "Extra configure arguments for host ncurses"
- help
- Extra arguments that are passed verbatim to the configure when
- building host ncurses.
-
-config NCURSES_HOST_DISABLE_DB
- bool "Disable terminfo DB on the host"
- default y
- help
- The terminfo database is not currently not installed on the host
- as a part of the toolchain built by crosstool-ng. This means the
- library will not be able to use the terminals, unless that database
- comes preinstalled.
-
- Selecting this option allows one to embed some popular terminal
- definitions into the library itself.
-
- If not select, the path to the terminfo database on the host will
- likely need to be passed as an argument to configure.
-
-config NCURSES_HOST_FALLBACKS
- string "List of fallback terminals for the host"
- default "linux,xterm,xterm-color,xterm-256color,vt100"
- help
- List of terminal descriptions that will be compiled into the curses
- library for the host.
-
-config NCURSES_TARGET_CONFIG_ARGS
- string "Extra configure arguments for target ncurses"
- help
- Extra arguments that are passed verbatim to the configure when
- building target ncurses.
-
-config NCURSES_TARGET_DISABLE_DB
- bool "Disable terminfo DB on the target"
- default n
- help
- The terminfo database is installed with the terminfo database for the
- target. If you want to configure ncurses with preselected terminals,
- select Y here.
-
-config NCURSES_TARGET_FALLBACKS
- string "List of fallback terminals for the target"
- help
- List of terminal descriptions that will be compiled into the curses
- library for the target.
-
diff --git a/config/companion_libs/zlib.in b/config/companion_libs/zlib.in
deleted file mode 100644
index df93682..0000000
--- a/config/companion_libs/zlib.in
+++ /dev/null
@@ -1,19 +0,0 @@
-# Zlib options
-
-choice
- bool
- prompt "zlib version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config ZLIB_V_1_2_11
- bool
- prompt "1.2.11"
-
-endchoice
-
-config ZLIB_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "1.2.11" if ZLIB_V_1_2_11
diff --git a/config/companion_tools.in b/config/companion_tools.in
deleted file mode 100644
index e5ef3fc..0000000
--- a/config/companion_tools.in
+++ /dev/null
@@ -1,15 +0,0 @@
-# Companion tools config options
-
-menu "Companion tools"
-
-config COMP_TOOLS_FOR_HOST
- bool
- prompt "Install companion tools for host"
- help
- Enable this option if you want to include the selected companion
- tools into the final toolchain (rather than just using them
- to build it).
-
-source "config/gen/companion_tools.in"
-
-endmenu
diff --git a/config/companion_tools/autoconf.in b/config/companion_tools/autoconf.in
deleted file mode 100644
index b85e1f9..0000000
--- a/config/companion_tools/autoconf.in
+++ /dev/null
@@ -1,29 +0,0 @@
-# Autoconf
-
-## default y if !CONFIGURE_has_autoconf_2_63_or_newer
-## default y if !CONFIGURE_has_autoreconf_2_63_or_newer
-## help Autoconf
-
-choice
- bool
- prompt "Autoconf version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config AUTOCONF_V_2_69
- bool
- prompt "2.69"
-
-config AUTOCONF_V_2_65
- bool
- prompt "2.65 (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-config AUTOCONF_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "2.69" if AUTOCONF_V_2_69
- default "2.65" if AUTOCONF_V_2_65
diff --git a/config/companion_tools/automake.in b/config/companion_tools/automake.in
deleted file mode 100644
index 31d036b..0000000
--- a/config/companion_tools/automake.in
+++ /dev/null
@@ -1,40 +0,0 @@
-# Automake
-
-## default y if !CONFIGURE_has_automake_1_15_or_newer
-## help Automake
-
-choice
- bool
- prompt "Automake version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config AUTOMAKE_V_1_15
- bool
- prompt "1.15"
-
-config AUTOMAKE_V_1_14
- bool
- prompt "1.14 (OBSOLETE)"
- depends on OBSOLETE
-
-config AUTOMAKE_V_1_11_6
- bool
- prompt "1.11.6 (OBSOLETE)"
- depends on OBSOLETE
-
-config AUTOMAKE_V_1_11_1
- bool
- prompt "1.11.1 (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-config AUTOMAKE_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "1.15" if AUTOMAKE_V_1_15
- default "1.14" if AUTOMAKE_V_1_14
- default "1.11.6" if AUTOMAKE_V_1_11_6
- default "1.11.1" if AUTOMAKE_V_1_11_1
diff --git a/config/companion_tools/libtool.in b/config/companion_tools/libtool.in
deleted file mode 100644
index 5c14fa0..0000000
--- a/config/companion_tools/libtool.in
+++ /dev/null
@@ -1,23 +0,0 @@
-# Libtool
-
-## default y if !CONFIGURE_has_libtool_2_4_or_newer
-## default y if !CONFIGURE_has_libtoolize_2_4_or_newer
-## help Libtool
-
-choice
- bool
- prompt "Libtool version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config LIBTOOL_V_2_4_6
- bool
- prompt "2.4.6"
-
-endchoice
-
-config LIBTOOL_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "2.4.6" if LIBTOOL_V_2_4_6
diff --git a/config/companion_tools/m4.in b/config/companion_tools/m4.in
deleted file mode 100644
index eb6a3d3..0000000
--- a/config/companion_tools/m4.in
+++ /dev/null
@@ -1,34 +0,0 @@
-# GNU m4
-
-## default y if !CONFIGURE_has_gnu_m4_1_4_12_or_newer
-## help GNU m4
-
-choice
- bool
- prompt "m4 version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config M4_V_1_4_18
- bool
- prompt "1.4.18"
-
-config M4_V_1_4_17
- bool
- prompt "1.4.17 (OBSOLETE)"
- depends on OBSOLETE
-
-config M4_V_1_4_13
- bool
- prompt "1.4.13 (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-config M4_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "1.4.18" if M4_V_1_4_18
- default "1.4.17" if M4_V_1_4_17
- default "1.4.13" if M4_V_1_4_13
diff --git a/config/companion_tools/make.in b/config/companion_tools/make.in
deleted file mode 100644
index b6834a7..0000000
--- a/config/companion_tools/make.in
+++ /dev/null
@@ -1,45 +0,0 @@
-# GNU make
-
-## default y if !CONFIGURE_has_make_3_81_or_newer
-## help GNU make
-
-choice
- bool
- prompt "make version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config MAKE_V_4_2_1
- bool
- prompt "4.2.1"
-
-config MAKE_V_4_1
- bool
- prompt "4.1 (OBSOLETE)"
- depends on OBSOLETE
-
-config MAKE_V_4_0
- bool
- prompt "4.0 (OBSOLETE)"
- depends on OBSOLETE
-
-config MAKE_V_3_81
- bool
- prompt "3.81 (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-config MAKE_GMAKE_SYMLINK
- bool
- prompt "Add gmake symlink to companion gnu/make"
- depends on COMP_TOOLS_make
-
-config MAKE_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "4.2.1" if MAKE_V_4_2_1
- default "4.1" if MAKE_V_4_1
- default "4.0" if MAKE_V_4_0
- default "3.81" if MAKE_V_3_81
diff --git a/config/config.in b/config/config.in
index 21b0c7e..f941301 100644
--- a/config/config.in
+++ b/config/config.in
@@ -1,3 +1,4 @@
+mainmenu "crosstool-NG $CT_VERSION Configuration"
source "config/configure.in"
source "config/global.in"
source "config/target.in"
@@ -7,6 +8,6 @@ source "config/binutils.in"
source "config/libc.in"
source "config/cc.in"
source "config/debug.in"
-source "config/companion_libs.in"
-source "config/companion_tools.in"
+source "config/comp_libs.in"
+source "config/comp_tools.in"
source "config/test_suite.in"
diff --git a/config/debug/duma.in b/config/debug/duma.in
index f9e727b..c837c65 100644
--- a/config/debug/duma.in
+++ b/config/debug/duma.in
@@ -1,12 +1,14 @@
# D.U.M.A. - Detect Unintended Memory Access - Memory checker
## depends on ! BARE_METAL
-## depends on ! LIBC_bionic
+## depends on ! LIBC_BIONIC
## help D.U.M.A. - Detect Unintended Memory Access
## help A memory bound checker, with additional features.
## help Formerly known as Electric Fence.
+source "config/versions/duma.in"
+
config DUMA_SO
bool
prompt "Build a shared library"
@@ -18,21 +20,3 @@ config DUMA_CUSTOM_WRAPPER
prompt "Install custom D.U.M.A wrapper"
default y
depends on DUMA_SO
-
-choice
- bool
- prompt "D.U.M.A. version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config DUMA_V_2_5_15
- bool
- prompt "2_5_15"
-
-endchoice
-
-config DUMA_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "2_5_15" if DUMA_V_2_5_15
diff --git a/config/debug/gdb.in b/config/debug/gdb.in
index b1d101b..3fe486f 100644
--- a/config/debug/gdb.in
+++ b/config/debug/gdb.in
@@ -2,326 +2,20 @@
## help gdb is the GNU debugger
+source "config/versions/gdb.in"
+
source "config/debug/gdb.in.cross"
source "config/debug/gdb.in.native"
source "config/debug/gdb.in.gdbserver"
-comment "gdb version"
-
-config GDB_CUSTOM
- bool
- prompt "Custom gdb"
- depends on EXPERIMENTAL
- select GDB_8_0_or_later
- help
- The choosen gdb version shall be not downloaded. Instead use
- a custom location to get the source.
-
-if GDB_CUSTOM
-
-config GDB_CUSTOM_LOCATION
- string
- prompt "Full path to custom gdb source"
- help
- Enter the path to the directory or tarball of your source for gcc.
-
- If the path is a tarball, it should extract to: <name>-<version>/
- where the name is this component, gcc, and the version is set
- below in the custom version string.
-
-config GDB_CUSTOM_VERSION
- string
- prompt "Custom GDB version"
- help
- Enter the version number for your custom gdb.
-
-config GDB_VERSION
- string
- default GDB_CUSTOM_VERSION
-
-endif # GDB_CUSTOM
-
-if ! GDB_CUSTOM
-
-config DEBUG_GDB_SHOW_LINARO
- bool
- prompt "Show Linaro versions"
- depends on OBSOLETE
- help
- Linaro is maintaining some advanced/more stable/experimental versions
- of gdb, especially for the ARM architecture.
-
- Those versions have not been blessed by the gdb community (nor have they
- been cursed either!), but they look to be pretty much stable, and even
- more stable than the upstream versions. YMMV...
-
- If you do not know what this Linaro stuff is, then simply say 'n' here,
- and rest in peace. OTOH, if you know what you are doing, you will be
- able to use and enjoy :-) the Linaro versions by saying 'y' here.
-
- Linaro: http://www.linaro.org/
-
-choice
- bool
- prompt "gdb version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config GDB_V_8_0
- bool
- prompt "8.0"
- select GDB_8_0_or_later
-
-config GDB_V_7_12_1
- bool
- prompt "7.12.1"
- select GDB_7_12_or_later
-
-config GDB_V_7_11_1
- bool
- prompt "7.11.1"
- select GDB_7_2_or_later
-
-config GDB_V_7_10_1
- bool
- prompt "7.10.1 (OBSOLETE)"
- select GDB_7_2_or_later
- depends on OBSOLETE
-
-config GDB_V_7_10
- bool
- prompt "7.10 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_9_1
- bool
- prompt "7.9.1 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_9
- bool
- prompt "7.9 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_linaro_7_8
- bool
- prompt "linaro-7.8-2014.09 (OBSOLETE)"
- depends on DEBUG_GDB_SHOW_LINARO
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_8_2
- bool
- prompt "7.8.2 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-
-config GDB_V_7_8_1
- bool
- prompt "7.8.1 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_8
- bool
- prompt "7.8 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_linaro_7_7_1
- bool
- prompt "linaro-7.7.1-2014.06 (OBSOLETE)"
- depends on DEBUG_GDB_SHOW_LINARO
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_7_1
- bool
- prompt "7.7.1 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_linaro_7_7
- bool
- prompt "linaro-7.7-2014.05 (OBSOLETE)"
- depends on DEBUG_GDB_SHOW_LINARO
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_7
- bool
- prompt "7.7 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_linaro_7_6
- bool
- prompt "linaro-7.6.1-2013.10 (OBSOLETE)"
- depends on DEBUG_GDB_SHOW_LINARO
- select GDB_7_2_or_later
-
-config GDB_V_7_6_1
- bool
- prompt "7.6.1 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_linaro_7_5
- bool
- prompt "linaro-7.5-2012.12 (OBSOLETE)"
- depends on DEBUG_GDB_SHOW_LINARO
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_5_1
- bool
- prompt "7.5.1 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_linaro_7_4
- bool
- prompt "linaro-7.4-2012.06 (OBSOLETE)"
- depends on DEBUG_GDB_SHOW_LINARO
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_4_1
- bool
- prompt "7.4.1 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_4
- bool
- prompt "7.4 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_linaro_7_3
- bool
- prompt "linaro-7.3-2011.12 (OBSOLETE)"
- depends on DEBUG_GDB_SHOW_LINARO
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_3_1
- bool
- prompt "7.3.1 (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_3a
- bool
- prompt "7.3a (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_2a
- bool
- prompt "7.2a (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_2_or_later
-
-config GDB_V_7_1a
- bool
- prompt "7.1a (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_0_or_later
-
-config GDB_V_7_0_1a
- bool
- prompt "7.0.1a (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_0_or_later
-
-config GDB_V_7_0a
- bool
- prompt "7.0a (OBSOLETE)"
- depends on OBSOLETE
- select GDB_7_0_or_later
-
-config GDB_V_6_8a
- bool
- prompt "6.8a (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-endif # ! GDB_CUSTOM
-
-config GDB_8_0_or_later
- bool
- select GDB_7_12_or_later
-
-config GDB_7_12_or_later
- bool
- select GDB_7_2_or_later
-
-config GDB_7_2_or_later
- bool
- select GDB_7_0_or_later
-
-config GDB_7_0_or_later
- bool
- select GDB_HAS_PKGVERSION_BUGURL
- select GDB_HAS_PYTHON
- select GDB_INSTALL_GDBINIT
-
config GDB_HAS_PKGVERSION_BUGURL
bool
+ default y if GDB_7_0_or_later
config GDB_HAS_PYTHON
bool
+ default y if GDB_7_0_or_later
config GDB_INSTALL_GDBINIT
bool
-
-# GDB 8.0 now requires C++ for build. GDB 7.12 offered a configure
-# switch to fall back to C.
-config GDB_TARGET_DISABLE_CXX_BUILD
- def_bool y
- depends on GDB_7_12_or_later && !GDB_8_0_or_later
-
-if ! GDB_CUSTOM
-
-config GDB_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "8.0" if GDB_V_8_0
- default "7.12.1" if GDB_V_7_12_1
- default "7.11.1" if GDB_V_7_11_1
- default "7.10.1" if GDB_V_7_10_1
- default "7.10" if GDB_V_7_10
- default "7.9.1" if GDB_V_7_9_1
- default "7.9" if GDB_V_7_9
- default "7.8.2" if GDB_V_7_8_2
- default "linaro-7.8-2014.09" if GDB_V_linaro_7_8
- default "7.8.1" if GDB_V_7_8_1
- default "7.8" if GDB_V_7_8
- default "linaro-7.7.1-2014.06-1" if GDB_V_linaro_7_7_1
- default "7.7.1" if GDB_V_7_7_1
- default "linaro-7.7-2014.05" if GDB_V_linaro_7_7
- default "7.7" if GDB_V_7_7
- default "linaro-7.6.1-2013.10" if GDB_V_linaro_7_6
- default "7.6.1" if GDB_V_7_6_1
- default "linaro-7.5-2012.12" if GDB_V_linaro_7_5
- default "7.5.1" if GDB_V_7_5_1
- default "linaro-7.4-2012.06" if GDB_V_linaro_7_4
- default "7.4.1" if GDB_V_7_4_1
- default "7.4" if GDB_V_7_4
- default "linaro-7.3-2011.12" if GDB_V_linaro_7_3
- default "7.3.1" if GDB_V_7_3_1
- default "7.3a" if GDB_V_7_3a
- default "7.2a" if GDB_V_7_2a
- default "7.1a" if GDB_V_7_1a
- default "7.0.1a" if GDB_V_7_0_1a
- default "7.0a" if GDB_V_7_0a
- default "6.8a" if GDB_V_6_8a
-
-endif # ! GDB_CUSTOM
+ default y if GDB_7_0_or_later
diff --git a/config/debug/gdb.in.gdbserver b/config/debug/gdb.in.gdbserver
index db0884e..8e999b4 100644
--- a/config/debug/gdb.in.gdbserver
+++ b/config/debug/gdb.in.gdbserver
@@ -5,7 +5,7 @@ config GDB_GDBSERVER
prompt "gdbserver"
default y
depends on ! BARE_METAL
- select LIBC_UCLIBC_WCHAR if LIBC_uClibc && GDB_8_0_or_later
+ select LIBC_UCLIBC_WCHAR if LIBC_UCLIBC && GDB_8_0_or_later
help
Build and install a gdbserver for the target, to run on the target.
diff --git a/config/debug/gdb.in.native b/config/debug/gdb.in.native
index 80b50fc..48c8575 100644
--- a/config/debug/gdb.in.native
+++ b/config/debug/gdb.in.native
@@ -4,9 +4,9 @@ config GDB_NATIVE
bool
prompt "Native gdb"
depends on ! BARE_METAL
- depends on ! LIBC_bionic
+ depends on ! LIBC_BIONIC
depends on CC_LANG_CXX || !GDB_8_0_or_later
- select LIBC_UCLIBC_WCHAR if LIBC_uClibc && GDB_8_0_or_later
+ select LIBC_UCLIBC_WCHAR if LIBC_UCLIBC && GDB_8_0_or_later
select EXPAT_TARGET
select NCURSES_TARGET
help
diff --git a/config/debug/ltrace.in b/config/debug/ltrace.in
index fab6b81..01ad147 100644
--- a/config/debug/ltrace.in
+++ b/config/debug/ltrace.in
@@ -1,40 +1,18 @@
# ltrace
## select LIBELF_TARGET
-## depends on ! LIBC_bionic
+## depends on ! LIBC_BIONIC
##
## help ltrace is a program that simply runs the specified command until it exits.
## help It intercepts and records the dynamic library calls which are called by
## help the executed process and the signals which are received by that process.
## help It can also intercept and print the system calls executed by the program.
-choice
- bool
- prompt "ltrace version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config LTRACE_V_0_7_3
- bool
- prompt "0.7.3"
-
-config LTRACE_V_0_5_3
- bool
- prompt "0.5.3 (OBSOLETE)"
- depends on OBSOLETE
- select LTRACE_0_5_3_CONFIGURE
-
-endchoice
-
-config LTRACE_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "0.7.3" if LTRACE_V_0_7_3
- default "0.5.3" if LTRACE_V_0_5_3
+source "config/versions/ltrace.in"
# Ltrace 0.5.3 had a unique hand-crafted configure script that has to be
# run differently from any preceding or following releases. This serves
# as a reminder to remove that code once 0.5.3 support is dropped.
config LTRACE_0_5_3_CONFIGURE
bool
+ default y if LTRACE_V_0_5_3
diff --git a/config/debug/strace.in b/config/debug/strace.in
index e77702b..160a518 100644
--- a/config/debug/strace.in
+++ b/config/debug/strace.in
@@ -1,98 +1,5 @@
# strace
-## depends on ! LIBC_bionic
+## depends on ! LIBC_BIONIC
-choice
- bool
- prompt "strace version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config STRACE_V_4_16
- bool
- prompt "4.16"
-
-config STRACE_V_4_15
- bool
- prompt "4.15"
-
-config STRACE_V_4_14
- bool
- prompt "4.14 (OBSOLETE)"
- depends on OBSOLETE
-
-config STRACE_V_4_13
- bool
- prompt "4.13 (OBSOLETE)"
- depends on OBSOLETE
-
-config STRACE_V_4_12
- bool
- prompt "4.12 (OBSOLETE)"
- depends on OBSOLETE
-
-config STRACE_V_4_11
- bool
- prompt "4.11 (OBSOLETE)"
- depends on OBSOLETE
-
-config STRACE_V_4_10
- bool
- prompt "4.10 (OBSOLETE)"
- depends on OBSOLETE
-
-config STRACE_V_4_9
- bool
- prompt "4.9 (OBSOLETE)"
- depends on OBSOLETE
-
-config STRACE_V_4_8
- bool
- prompt "4.8 (OBSOLETE)"
- depends on OBSOLETE
-
-config STRACE_V_4_7
- bool
- prompt "4.7 (OBSOLETE)"
- depends on OBSOLETE
-
-config STRACE_V_4_6
- bool
- prompt "4.6 (OBSOLETE)"
- depends on OBSOLETE
-
-config STRACE_V_4_5_20
- bool
- prompt "4.5.20 (OBSOLETE)"
- depends on OBSOLETE
-
-config STRACE_V_4_5_19
- bool
- prompt "4.5.19 (OBSOLETE)"
- depends on OBSOLETE
-
-config STRACE_V_4_5_18
- bool
- prompt "4.5.18 (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-config STRACE_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "4.16" if STRACE_V_4_16
- default "4.15" if STRACE_V_4_15
- default "4.14" if STRACE_V_4_14
- default "4.13" if STRACE_V_4_13
- default "4.12" if STRACE_V_4_12
- default "4.11" if STRACE_V_4_11
- default "4.10" if STRACE_V_4_10
- default "4.9" if STRACE_V_4_9
- default "4.8" if STRACE_V_4_8
- default "4.7" if STRACE_V_4_7
- default "4.6" if STRACE_V_4_6
- default "4.5.20" if STRACE_V_4_5_20
- default "4.5.19" if STRACE_V_4_5_19
- default "4.5.18" if STRACE_V_4_5_18
+source "config/versions/strace.in"
diff --git a/config/global.in b/config/global.in
index 2860f1a..0dff199 100644
--- a/config/global.in
+++ b/config/global.in
@@ -1,5 +1,9 @@
# Overall toolchain configuration: paths, jobs, etc...
+config CT_VERSION
+ string
+ option env="CT_VERSION"
+
# Allow unconditional usage of tristates
config MODULES
bool
diff --git a/config/global/extract.in b/config/global/extract.in
index b754775..58f7b95 100644
--- a/config/global/extract.in
+++ b/config/global/extract.in
@@ -52,48 +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.
-
-config PATCH_BUNDLED_FALLBACK_LOCAL
- bool
- prompt "Bundled only, local if no bundled"
- select PATCH_USE_LOCAL
- select PATCH_SINGLE
- help
- Apply the patches bundled with crosstool-NG;
- if there's no bundled patches, apply your local patches.
-
-config PATCH_LOCAL_FALLBACK_BUNDLED
- bool
- prompt "Local only, bundled if no local"
- select PATCH_USE_LOCAL
- select PATCH_SINGLE
- help
- Only apply your local patches;
- if there's no local patches, apply 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.
@@ -110,19 +98,16 @@ config PATCH_ORDER
string
default "bundled" if PATCH_BUNDLED
default "local" if PATCH_LOCAL
- default "bundled,local" if PATCH_BUNDLED_LOCAL || PATCH_BUNDLED_FALLBACK_LOCAL
- default "local,bundled" if PATCH_LOCAL_BUNDLED || PATCH_LOCAL_FALLBACK_BUNDLED
+ default "bundled,local" if PATCH_BUNDLED_LOCAL
+ default "local,bundled" if PATCH_LOCAL_BUNDLED
default "none" if PATCH_NONE
-config PATCH_SINGLE
- bool
-
config PATCH_USE_LOCAL
bool
config LOCAL_PATCH_DIR
string
- prompt "| Local patch directory"
+ prompt "Local patch directory"
default ""
depends on PATCH_USE_LOCAL
help
diff --git a/config/kernel.in b/config/kernel.in
index c04f2cb..579cc23 100644
--- a/config/kernel.in
+++ b/config/kernel.in
@@ -4,9 +4,11 @@ menu "Operating System"
# Config option used throughout the config and code to determine wether
# we have a kernel or not (there might be different bare metal stuff)...
+# FIXME use CT_KERNEL_bare_metal instead
config BARE_METAL
bool
+# FIXME use CT_KERNEL_windows instead
config WINDOWS
bool
@@ -16,12 +18,6 @@ config WINDOWS
config KERNEL_SUPPORTS_SHARED_LIBS
bool
-config KERNEL
- string
-
-config KERNEL_VERSION
- string
-
source "config/gen/kernel.in"
comment "Common kernel options"
@@ -37,6 +33,4 @@ config SHARED_LIBS
You might not want shared libraries if you're building for a target that
don't support it (maybe some nommu targets, for example, or bare metal).
-source "config/gen/kernel.in.2"
-
endmenu
diff --git a/config/kernel/linux.in b/config/kernel/linux.in
index dc0f5e5..b8d433a 100644
--- a/config/kernel/linux.in
+++ b/config/kernel/linux.in
@@ -1,294 +1,54 @@
# Linux kernel options
-## depends on ! ARCH_avr
+## depends on ! ARCH_AVR
## select KERNEL_SUPPORTS_SHARED_LIBS
-##
-## help Build a toolchain targeting systems running Linux as a kernel.
-
-config KERNEL_LINUX_CUSTOM
- bool
- prompt "custom tarball or directory"
- help
- The choosen linux version shall be not downloaded. Instead use
- a custom location to get the source.
-
-if KERNEL_LINUX_CUSTOM
-
-config KERNEL_LINUX_CUSTOM_LOCATION
- string
- prompt "Path to custom source, tarball or directory"
- help
- Enter the path to the directory or tarball of your source for linux.
-
- If the path is a tarball, it should extract to: <name>-<version>/
- where the name is this component, linux, and the version is set
- below in the custom version string.
-
-config KERNEL_LINUX_CUSTOM_VERSION
- string
- prompt "Custom Linux version"
- help
- Enter the version number for your custom linux.
-
-config KERNEL_VERSION
- string
- default KERNEL_LINUX_CUSTOM_VERSION
-
-endif # KERNEL_LINUX_CUSTOM
-if ! KERNEL_LINUX_CUSTOM
+## help Build a toolchain targeting systems running Linux as a kernel.
# GLIBC and kernel are special when it comes to obsoletion. Users
# of crosstool-ng depend on the ability to build new toolchains matching
# the kernel/libc versions of a particular target system, and LTS releases
# are still using quite ancient versions. Please do not retire versions
# (including versions in between) until the EOL dates indicated below.
-choice
- bool
- prompt "Linux kernel version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config KERNEL_V_4_11
- bool
- prompt "4.11.3"
-
-config KERNEL_V_4_10
- bool
- prompt "4.10.17 (EOL)"
-
-config KERNEL_V_4_9
- bool
- prompt "4.9.30"
-
-config KERNEL_V_4_8
- bool
- prompt "4.8.17 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_4_7
- bool
- prompt "4.7.10 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_4_6
- bool
- prompt "4.6.7 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_4_5
- bool
- prompt "4.5.7 (EOL)"
- depends on OBSOLETE
-
-# EOL 04/2021 [Ubuntu16.04]
-config KERNEL_V_4_4
- bool
- prompt "4.4.70"
-
-config KERNEL_V_4_3
- bool
- prompt "4.3.6 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_4_2
- bool
- prompt "4.2.8 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_4_1
- bool
- prompt "4.1.40"
-
-config KERNEL_V_4_0
- bool
- prompt "4.0.9 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_3_19
- bool
- prompt "3.19.8 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_3_18
- bool
- prompt "3.18.55 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_3_17
- bool
- prompt "3.17.8 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_3_16
- bool
- prompt "3.16.43"
-
-config KERNEL_V_3_15
- bool
- prompt "3.15.10 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_3_14
- bool
- prompt "3.14.79 (EOL)"
- depends on OBSOLETE
-
-# EOL 04/2019 [Ubuntu14.04]
-config KERNEL_V_3_13
- bool
- prompt "3.13.11 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_3_12
- bool
- prompt "3.12.74"
-
-config KERNEL_V_3_11
- bool
- prompt "3.11.10 (EOL)"
- depends on OBSOLETE
-
-# EOL 06/2024 [CentOS7.x]
-config KERNEL_V_3_10
- bool
- prompt "3.10.105"
-
-config KERNEL_V_3_9
- bool
- prompt "3.9.11 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_3_8
- bool
- prompt "3.8.13 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_3_7
- bool
- prompt "3.7.10 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_3_6
- bool
- prompt "3.6.11 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_3_5
- bool
- prompt "3.5.7 (EOL)"
- depends on OBSOLETE
+# Such pinned versions are indicated in version.desc files with a comment.
-config KERNEL_V_3_4
- bool
- prompt "3.4.113"
-
-config KERNEL_V_3_3
- bool
- prompt "3.3.8 (EOL)"
- depends on OBSOLETE
-
-# EOL 04/2017 [Ubuntu12.04]
-config KERNEL_V_3_2
- bool
- prompt "3.2.88"
-
-config KERNEL_V_3_1
- bool
- prompt "3.1.10 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_3_0
- bool
- prompt "3.0.101 (EOL)"
- depends on OBSOLETE
+source "config/versions/linux.in"
-config KERNEL_V_2_6_39
- bool
- prompt "2.6.39.4 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_2_6_38
- bool
- prompt "2.6.38.8 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_2_6_37
- bool
- prompt "2.6.37.6 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_2_6_36
- bool
- prompt "2.6.36.4 (EOL)"
- depends on OBSOLETE
-
-config KERNEL_V_2_6_35
+choice
bool
- prompt "2.6.35.9 (EOL)"
- depends on OBSOLETE
+ prompt "Kernel verbosity:"
+ default KERNEL_LINUX_VERBOSITY_0
-config KERNEL_V_2_6_34
+config KERNEL_LINUX_VERBOSITY_0
bool
- prompt "2.6.34.7 (EOL)"
- depends on OBSOLETE
+ prompt "Simplified"
+ help
+ Print simplified command lines.
-config KERNEL_V_2_6_33
+config KERNEL_LINUX_VERBOSITY_1
bool
- prompt "2.6.33.7 (EOL)"
- depends on OBSOLETE
+ prompt "Full commands"
+ help
+ Print full command lines.
-# EOL 11/2020 [CentOS6.x]
-config KERNEL_V_2_6_32
+config KERNEL_LINUX_VERBOSITY_2
bool
- prompt "2.6.32.27 (EOL)"
- depends on OBSOLETE
+ prompt "Exec reasons"
+ help
+ Print the reasons why a make target is rebuild.
endchoice
-config KERNEL_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "4.11.3" if KERNEL_V_4_11
- default "4.10.17" if KERNEL_V_4_10
- default "4.9.30" if KERNEL_V_4_9
- default "4.8.17" if KERNEL_V_4_8
- default "4.7.10" if KERNEL_V_4_7
- default "4.6.7" if KERNEL_V_4_6
- default "4.5.7" if KERNEL_V_4_5
- default "4.4.70" if KERNEL_V_4_4
- default "4.3.6" if KERNEL_V_4_3
- default "4.2.8" if KERNEL_V_4_2
- default "4.1.40" if KERNEL_V_4_1
- default "4.0.9" if KERNEL_V_4_0
- default "3.19.8" if KERNEL_V_3_19
- default "3.18.55" if KERNEL_V_3_18
- default "3.17.8" if KERNEL_V_3_17
- default "3.16.43" if KERNEL_V_3_16
- default "3.15.10" if KERNEL_V_3_15
- default "3.14.79" if KERNEL_V_3_14
- default "3.13.11" if KERNEL_V_3_13
- default "3.12.74" if KERNEL_V_3_12
- default "3.11.10" if KERNEL_V_3_11
- default "3.10.105" if KERNEL_V_3_10
- default "3.9.11" if KERNEL_V_3_9
- default "3.8.13" if KERNEL_V_3_8
- default "3.7.10" if KERNEL_V_3_7
- default "3.6.11" if KERNEL_V_3_6
- default "3.5.7" if KERNEL_V_3_5
- default "3.4.113" if KERNEL_V_3_4
- default "3.3.8" if KERNEL_V_3_3
- default "3.2.88" if KERNEL_V_3_2
- default "3.1.10" if KERNEL_V_3_1
- default "3.0.101" if KERNEL_V_3_0
- default "2.6.39.4" if KERNEL_V_2_6_39
- default "2.6.38.8" if KERNEL_V_2_6_38
- default "2.6.37.6" if KERNEL_V_2_6_37
- default "2.6.36.4" if KERNEL_V_2_6_36
- default "2.6.35.9" if KERNEL_V_2_6_35
- default "2.6.34.7" if KERNEL_V_2_6_34
- default "2.6.33.7" if KERNEL_V_2_6_33
- default "2.6.32.27" if KERNEL_V_2_6_32
+config KERNEL_LINUX_VERBOSE_LEVEL
+ int
+ default 0 if KERNEL_LINUX_VERBOSITY_0
+ default 1 if KERNEL_LINUX_VERBOSITY_1
+ default 2 if KERNEL_LINUX_VERBOSITY_2
-endif # ! KERNEL_LINUX_CUSTOM
+config KERNEL_LINUX_INSTALL_CHECK
+ bool
+ prompt "Check installed headers"
+ default y
+ help
+ If you are in doubt that installed headers are buggy, say 'Y'
+ here to have an extra check passed onto the headers.
diff --git a/config/kernel/linux.in.2 b/config/kernel/linux.in.2
deleted file mode 100644
index 80e13f3..0000000
--- a/config/kernel/linux.in.2
+++ /dev/null
@@ -1,40 +0,0 @@
-# Linux kernel options
-
-choice
- bool
- prompt "Kernel verbosity:"
- default KERNEL_LINUX_VERBOSITY_0
-
-config KERNEL_LINUX_VERBOSITY_0
- bool
- prompt "Simplified"
- help
- Print simplified command lines.
-
-config KERNEL_LINUX_VERBOSITY_1
- bool
- prompt "Full commands"
- help
- Print full command lines.
-
-config KERNEL_LINUX_VERBOSITY_2
- bool
- prompt "Exec reasons"
- help
- Print the reasons why a make target is rebuild.
-
-endchoice
-
-config KERNEL_LINUX_VERBOSE_LEVEL
- int
- default 0 if KERNEL_LINUX_VERBOSITY_0
- default 1 if KERNEL_LINUX_VERBOSITY_1
- default 2 if KERNEL_LINUX_VERBOSITY_2
-
-config KERNEL_LINUX_INSTALL_CHECK
- bool
- prompt "Check installed headers"
- default y
- help
- If you are in doubt that installed headers are buggy, say 'Y'
- here to have an extra check passed onto the headers.
diff --git a/config/kernel/windows.in b/config/kernel/windows.in
index 797c023..e649787 100644
--- a/config/kernel/windows.in
+++ b/config/kernel/windows.in
@@ -1,6 +1,6 @@
# windows config options
-## depends on ARCH_x86
+## depends on ARCH_X86
## depends on EXPERIMENTAL
##
## select WINDOWS
diff --git a/config/libc.in b/config/libc.in
index 708c3b6..c132fc6 100644
--- a/config/libc.in
+++ b/config/libc.in
@@ -2,23 +2,6 @@
menu "C-library"
-config LIBC
- string
-
-config LIBC_VERSION
- string
- help
- Enter the date of the snapshot you want to use in the form: YYYYMMDD
- where YYYY is the 4-digit year, MM the 2-digit month and DD the 2-digit
- day in the month.
-
- Please note:
- - glibc has snapshots done every monday, and only the last ten are kept.
- - uClibc has daily snapshots, and only the last 30-or-so are kept.
-
- So if you want to be able to re-build your toolchain later, you will
- have to save your C library tarball by yourself.
-
source "config/gen/libc.in"
config LIBC_SUPPORT_THREADS_ANY
@@ -47,7 +30,7 @@ config THREADS
string
default "none" if THREADS_NONE
-if ! LIBC_none
+if ! LIBC_NONE
comment "Common C library options"
@@ -123,8 +106,6 @@ config LIBC_XLDD
for the native ldd. Please see the help, by running it
with '--help' for more explanations.
-source "config/gen/libc.in.2"
-
-endif # ! LIBC_none
+endif # ! LIBC_NONE
endmenu
diff --git a/config/libc/avr-libc.in b/config/libc/avr-libc.in
index 2b8d891..836fed8 100644
--- a/config/libc/avr-libc.in
+++ b/config/libc/avr-libc.in
@@ -1,6 +1,6 @@
# avr-libc options
-## depends on ARCH_avr
+## depends on ARCH_AVR
## depends on ! LINUX && ! WINDOWS && BARE_METAL
##
## select LIBC_SUPPORT_THREADS_NONE
@@ -9,66 +9,11 @@
## help Atmel AVR 8-bit RISC microcontrollers. In addition, the library
## help provides the basic startup code needed by most applications.
-config LIBC_AVR_LIBC_CUSTOM
- bool
- prompt "Custom avr-libc"
- depends on EXPERIMENTAL
- help
- The choosen avr-libc version shall be not downloaded. Instead use
- a custom location to get the source.
-
-if LIBC_AVR_LIBC_CUSTOM
+source "config/versions/avr-libc.in"
-config LIBC_AVR_LIBC_CUSTOM_LOCATION
+config LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY
string
- prompt "Full path to custom avr-libc source"
+ prompt "Extra config for avr-libc"
+ default ""
help
- Enter the path to the directory or tarball of your source for avr-libc.
-
- If the path is a tarball, it should extract to: <name>-<version>/
- where the name is this component, avr-libc, and the version is set
- below in the custom version string.
-
-config LIBC_AVR_LIBC_CUSTOM_VERSION
- string
- prompt "Custom AVR-Libc version"
- help
- Enter the version number for your custom avr-libc.
-
-config LIBC_VERSION
- string
- default LIBC_AVR_LIBC_CUSTOM_VERSION
-
-endif # LIBC_AVR_LIBC_CUSTOM
-
-if ! LIBC_AVR_LIBC_CUSTOM
-
-choice
- bool
- prompt "avr-libc version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config LIBC_AVR_LIBC_V_2_0_0
- bool
- prompt "2.0.0"
-
-config LIBC_AVR_LIBC_V_1_8_1
- bool
- prompt "1.8.1"
-
-config LIBC_AVR_LIBC_V_1_8_0
- bool
- prompt "1.8.0"
-
-endchoice
-
-config LIBC_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "2.0.0" if LIBC_AVR_LIBC_V_2_0_0
- default "1.8.1" if LIBC_AVR_LIBC_V_1_8_1
- default "1.8.0" if LIBC_AVR_LIBC_V_1_8_0
-
-endif # ! LIBC_AVR_LIBC_CUSTOM
+ Extra flags to pass onto ./configure when configuring the avr-libc.
diff --git a/config/libc/avr-libc.in.2 b/config/libc/avr-libc.in.2
deleted file mode 100644
index 89a182f..0000000
--- a/config/libc/avr-libc.in.2
+++ /dev/null
@@ -1,8 +0,0 @@
-# avr-libc second-part options
-
-config LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY
- string
- prompt "Extra config for avr-libc"
- default ""
- help
- Extra flags to pass onto ./configure when configuring the avr-libc.
diff --git a/config/libc/bionic.in b/config/libc/bionic.in
index 9e04130..41b87a1 100644
--- a/config/libc/bionic.in
+++ b/config/libc/bionic.in
@@ -1,9 +1,9 @@
# bionic options
## depends on ! WINDOWS && ! BARE_METAL
-## depends on ARCH_arm || ARCH_mips || ARCH_x86
+## depends on ARCH_ARM || ARCH_MIPS || ARCH_X86
## depends on EXPERIMENTAL
-## depends on CC_GCC_6_or_later
+## select GCC_REQUIRE_6_or_later
##
## select LIBC_SUPPORT_THREADS_POSIX
##
@@ -11,98 +11,17 @@
## help This platform has no TLS (Thread Local Storage) support so that option must be
## help disabled in the Compiler options.
+source "config/versions/android-ndk.in"
+
config THREADS
default "posix"
-config LIBC_BIONIC_CUSTOM
- bool
- prompt "Custom bionic"
- help
- The chosen bionic-libc version shall be not downloaded. Instead use
- a custom location to get the source.
-
-if LIBC_BIONIC_CUSTOM
-
-config LIBC_BIONIC_CUSTOM_LOCATION
- string
- prompt "Full path to custom bionic source"
- help
- Enter the path to the directory or tarball of your source for bionic.
-
- If the path is a zip archive, it should extract to: <name>-<version>/
- where the name is android-ndk, and the version is set
- below in the custom version string.
-
-config LIBC_BIONIC_CUSTOM_VERSION
- string
- prompt "Custom BIONIC version"
- help
- Enter the version number for your custom bionic.
-
-config LIBC_VERSION
- string
- default LIBC_BIONIC_CUSTOM_VERSION
-
-endif # LIBC_BIONIC_CUSTOM
-
-if ! LIBC_BIONIC_CUSTOM
-
-choice
- bool
- prompt "bionic version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config LIBC_BIONIC_V_15beta1
- bool
- prompt "15beta1"
-
-config LIBC_BIONIC_V_14b
- bool
- prompt "14b"
-
-config LIBC_BIONIC_V_13b
- bool
- prompt "13b (OBSOLETE)"
- depends on OBSOLETE
-
-config LIBC_BIONIC_V_12b
- bool
- prompt "12b (OBSOLETE)"
- depends on OBSOLETE
-
-config LIBC_BIONIC_V_11c
- bool
- prompt "11c (OBSOLETE)"
- depends on OBSOLETE
-
-config LIBC_BIONIC_V_10e
- bool
- prompt "10e (OBSOLETE)"
- depends on OBSOLETE
-
-endchoice
-
-config LIBC_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "r15-beta1" if LIBC_BIONIC_V_15beta1
- default "r14b" if LIBC_BIONIC_V_14b
- default "r13b" if LIBC_BIONIC_V_13b
- default "r12b" if LIBC_BIONIC_V_12b
- default "r11c" if LIBC_BIONIC_V_11c
- default "r10e" if LIBC_BIONIC_V_10e
-
-endif # ! LIBC_BIONIC_CUSTOM
-
+# FIXME does API level depend on the bionic version? generate that, too?
choice
bool
prompt "Android API level"
help
The minimum for 64 bit support is 21.
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
config ANDROID_API_24
bool
@@ -169,8 +88,6 @@ endchoice
config ANDROID_API
string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
default "24" if ANDROID_API_24
default "23" if ANDROID_API_23
default "22" if ANDROID_API_22
@@ -184,4 +101,3 @@ config ANDROID_API
default "13" if ANDROID_API_13
default "12" if ANDROID_API_12
default "9" if ANDROID_API_9
-
diff --git a/config/libc/glibc.in b/config/libc/glibc.in
index 9e4ff56..c600326 100644
--- a/config/libc/glibc.in
+++ b/config/libc/glibc.in
@@ -1,222 +1,318 @@
-# glibc options
+# This file contains the common configuration options
+# that apply to both glibc.
## depends on ! WINDOWS && ! BARE_METAL && ARCH_USE_MMU
-##
## select LIBC_SUPPORT_THREADS_NATIVE
## select CC_CORE_PASSES_NEEDED
+# TBD: select GETTEXT for build only, not for host
## select GETTEXT_NEEDED
-##
+## select BINUTILS_FORCE_LD_BFD_DEFAULT
+
## help The de-facto standard for Linux distributions.
## help Feature-rich, but large... Most useful for desktop-like systems.
+# GLIBC and kernel are special when it comes to obsoletion. Users
+# of crosstool-ng depend on the ability to build new toolchains matching
+# the kernel/libc versions of a particular target system, and LTS releases
+# are still using quite ancient versions. Please do not retire versions
+# (including versions in between) until the EOL dates indicated in version.desc.
+source "config/versions/glibc.in"
+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"
-config LIBC_GLIBC_CUSTOM
- bool
- prompt "Custom glibc"
- depends on EXPERIMENTAL
- select LIBC_CUSTOM
- select LIBC_GLIBC_2_20_or_later
+# Known add-ons and when they exist(ed)
+# crypt external in 2.1, no longer an add-on since 2.2
+# libidn external in 2.3.4 .. 2.10, still an add-on
+# linuxthreads external in 2.0.1 .. 2.5, no longer available since 2.6 [*]
+# localedata external in 2.0.1 .. 2.0.6, no longer an add-on since 2.1 [*]
+# ports external in 2.3.4 .. 2.16, no longer an add-on since 2.20
+# nptl never external, no longer an add-on since 2.20
+#
+# Given the list of currently supported glibc releases, we only need to worry about
+# 'libidn', 'ports' and 'nptl' add-ons. Of these, only 'ports' can be an external
+# tarball; and only 'libidn' is user-selectable ('ports' & 'nptl' are selected
+# by crosstool-NG, as dictated by the architecture and thread model).
+#
+# I had trouble locating the sources in the repository for some of the released
+# versions. E.g., there is a 2.5 version of linuxthreads, but the tag for 2.5 in Git
+# does not have the linuxthreads directory at all. Similarly, 2.0.6 tag did not have
+# localedata. Since these releases are no longer supported by crosstool-NG, this is
+# of pure historical interest now, however.
+
+config GLIBC_HAS_NPTL_ADDON
+ def_bool y
+ depends on !GLIBC_2_20_or_later
+
+config GLIBC_HAS_PORTS_ADDON
+ def_bool y
+ depends on !GLIBC_2_20_or_later
+
+config GLIBC_HAS_PORTS_ADDON_EXTERNAL
+ def_bool y
+ depends on !GLIBC_2_17_or_later
+
+# In case it folds into main distribution in some future release, too
+config GLIBC_HAS_LIBIDN_ADDON
+ def_bool y
+
+# Some architectures require the ports addon. List them one by one here:
+# This list must be carefully in sync with the architectures names
+# we can find in config/arch/*
+config GLIBC_USE_PORTS_ADDON
+ def_bool y
+ depends on ARCH_ALPHA || ARCH_ARM || ARCH_M68K || ARCH_MIPS || ARCH_POWERPC
+ depends on GLIBC_HAS_PORTS_ADDON
+
+config GLIBC_USE_PORTS_EXTERNAL
+ def_bool y
+ depends on GLIBC_USE_PORTS_ADDON && GLIBC_HAS_PORTS_ADDON_EXTERNAL
+
+config GLIBC_USE_NPTL_ADDON
+ def_bool y
+ depends on THREADS_NATIVE && GLIBC_HAS_NPTL_ADDON
+
+config GLIBC_USE_LIBIDN_ADDON
+ bool "Build libidn add-on"
help
- The choosen glibc version shall be not downloaded. Instead use
- a custom location to get the source.
-
-if LIBC_GLIBC_CUSTOM
-
-config LIBC_GLIBC_CUSTOM_LOCATION
+ Enables the libidn add-on in GNU libc.
+
+# SPARCv8 support retired in 2.23
+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 "Full path to custom glibc source"
+ prompt "extra config"
+ default ""
help
- Enter the path to the directory or tarball of your source for glibc.
+ Extra flags to pass onto ./configure when configuring.
- If the path is a tarball, it should extract to: <name>-<version>/
- where the name is this component, glibc, and the version is set
- below in the custom version string.
+ You can enter multiple arguments here, and arguments can contain spaces
+ if they are properly quoted (or escaped, but prefer quotes). Eg.:
+ --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
-config LIBC_GLIBC_CUSTOM_VERSION
+config GLIBC_CONFIGPARMS
string
- prompt "Custom GLIBC version"
+ prompt "Extra config params (READ HELP)"
+ default "" if ! ARCH_SH
+ default "no-z-defs=yes" if ARCH_SH
help
- Enter the version number for your custom glibc.
+ Some architectures need to set options in the file configparms.
+ This is the case for sh3/4, which really need to set configparms
+ to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
+
+ Unless you are building a toolchain for sh3/4, you should leave that empty.
+
+ Note: If you need to pass more than one value, separate them with
+ '\n'. Eg.: var1=val1\nvar2=val2
-config LIBC_VERSION
+config GLIBC_EXTRA_CFLAGS
string
- default LIBC_GLIBC_CUSTOM_VERSION
-
-endif # LIBC_GLIBC_CUSTOM
+ prompt "extra target CFLAGS"
+ default ""
+ help
+ Extra target CFLAGS to use when building.
-if ! LIBC_GLIBC_CUSTOM
+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 CC_GLIBC_SHOW_LINARO
+config GLIBC_ENABLE_FORTIFIED_BUILD
bool
- prompt "Show Linaro versions"
+ prompt "Enable fortified build (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
help
- Linaro is maintaining some advanced/more stable/experimental versions
- of glibc, especially for the ARM architecture.
-
- Those versions have not been blessed by the glibc comunity (nor have they
- been cursed either!), but they look to be pretty much stable, and even
- more stable than the upstream versions. YMMV...
+ If you say 'y' here, then glibc will be using fortified versions
+ of functions with format arguments (eg. vsyslog, printf...), and
+ do a sanity check on the format at runtime, to avoid some of the
+ common format string attacks.
- If you do not know what this Linaro stuff is, then simply say 'n' here,
- and rest in peace. OTOH, if you know what you are doing, you will be
- able to use and enjoy :-) the Linaro versions by saying 'y' here.
+ This is currently not supported, and will most probably result in
+ a broken build, with an error message like:
+ ../misc/syslog.c: In function '__vsyslog_chk':
+ ../misc/syslog.c:123: sorry, unimplemented: inlining failed in
+ call to 'syslog': function body not available
- Linaro: http://www.linaro.org/
+ If you are brave enough and want to debug the issue, then say 'y'
+ here. Otherwise, be still and say 'n' (the default). ;-)
-# GLIBC and kernel are special when it comes to obsoletion. Users
-# of crosstool-ng depend on the ability to build new toolchains matching
-# the kernel/libc versions of a particular target system, and LTS releases
-# are still using quite ancient versions. Please do not retire versions
-# (including versions in between) until the EOL dates indicated below.
-choice
- bool
- prompt "glibc version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config LIBC_GLIBC_V_2_25
- bool
- prompt "2.25"
- select LIBC_GLIBC_2_23_or_later
-config LIBC_GLIBC_V_2_24
+config GLIBC_DISABLE_VERSIONING
bool
- prompt "2.24"
- select LIBC_GLIBC_2_23_or_later
-
-# EOL 04/2021 [Ubuntu16.04]
-config LIBC_GLIBC_V_2_23
- bool
- prompt "2.23"
- select LIBC_GLIBC_2_23_or_later
-
-config LIBC_GLIBC_V_2_22
- bool
- prompt "2.22 (OBSOLETE)"
- select LIBC_GLIBC_2_20_or_later
- depends on OBSOLETE
+ prompt "Disable symbols versioning"
+ help
+ Do not include versioning information in the library objects.
-config LIBC_GLIBC_V_2_21
- bool
- prompt "2.21 (OBSOLETE)"
- select LIBC_GLIBC_2_20_or_later
- depends on OBSOLETE
+config GLIBC_OLDEST_ABI
+ string
+ prompt "Oldest supported ABI"
+ default ""
+ help
+ Set the oldest ABI supported by the C library.
+
+ Setting this option, for example, to 2.2 will provide ABI support
+ back to (e)glibc-2.2.
-config LIBC_GLIBC_LINARO_V_2_20
- bool
- prompt "Linaro 2.20-2014.11 (OBSOLETE)"
- select LIBC_GLIBC_2_20_or_later
- depends on CC_GLIBC_SHOW_LINARO
- depends on OBSOLETE
+ If this option is not set, (e)glibc will choose for you.
-config LIBC_GLIBC_V_2_20
+config GLIBC_FORCE_UNWIND
bool
- prompt "2.20 (OBSOLETE)"
- select LIBC_GLIBC_2_20_or_later
- depends on OBSOLETE
+ prompt "Force unwind support (READ HELP!)"
+ default y
+ help
+ If your toolchain fails building while building the C library
+ start files, or the complete C library, with a message like:
+ configure: error: forced unwind support is required
+
+ then you may try changing this option. Otherwise, leave it to
+ the default 'y'.
+
+ The issue seems to be related to building NPTL on old versions
+ of glibc on some architectures
+ (seen on s390, s390x and x86_64).
-# EOL 04/2019 [Ubuntu14.04]
-config LIBC_GLIBC_V_2_19
+config GLIBC_LOCALES
bool
- prompt "2.19 (OBSOLETE)"
- depends on OBSOLETE
- select LIBC_GLIBC_2_17_or_later
-
-config LIBC_GLIBC_V_2_18
+ prompt "Build and install locales"
+ help
+ Whether to build and install the libc locale files for the target,
+ which is required in order to support internationalization.
+
+if LIBC_GLIBC && GLIBC_LOCALES
+comment "WARNING! "
+comment "| The built locales will be usable if and only if the build "
+comment "| machine and the target: "
+comment "| - have the same endianness, "
+comment "| - and have the same alignment requirements for uint32_t. "
+comment "| You will have to check by yourself (for now). "
+comment "WARNING! "
+comment "| Building GLIBC locales requires that GLIBC supports "
+comment "| the build machine as the target. "
+endif # LIBC_GLIBC && GLIBC_LOCALES
+
+if KERNEL_LINUX
+
+choice GLIBC_SUPPORTED_KERNEL
bool
- prompt "2.18 (OBSOLETE)"
- depends on OBSOLETE
- select LIBC_GLIBC_2_17_or_later
+ prompt "Minimum supported kernel version"
+ default GLIBC_KERNEL_VERSION_AS_HEADERS
-# EOL 06/2024 [CentOS7.x]
-config LIBC_GLIBC_V_2_17
+config GLIBC_KERNEL_VERSION_NONE
bool
- prompt "2.17 (OBSOLETE)"
- depends on OBSOLETE
- select LIBC_GLIBC_2_17_or_later
-
-config LIBC_GLIBC_V_2_16_0
+ prompt "Let ./configure decide"
+ help
+ Let ./configure decide what minimum kernel version glibc will be
+ able to run against.
+
+ This will include legacy compatibility code for older kernels in
+ the C library, thus ensuring that it will run on a large number
+ of old kernels.
+
+ The minimum kernel version supported will be dependent upon the
+ target you build for. For example:
+ alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
+ sh[34]-*-linux-gnu Requires Linux 2.6.11
+ powerpc* Requires Linux 2.4.19
+ arm*-*-linux-*gnueabi Requires Linux 2.6.16
+
+config GLIBC_KERNEL_VERSION_AS_HEADERS
bool
- prompt "2.16.0 (OBSOLETE)"
- depends on OBSOLETE
+ prompt "Same as kernel headers (default)"
+ help
+ Normally, you'll want glibc to run against the same kernel
+ version as the one used for the headers.
+
+ This is the default.
+
+ If enabled, crosstool-ng will use the chosen version of kernel
+ headers for the glibc minimum kernel version supported, which is
+ what gets passed to "--enable-kernel=" when configuring glibc.
+
+ Enabling this will ensure that no legacy compatibility code for
+ older kernels is built into your C libraries, but it will
+ be unable to run on kernel versions older than whichever kernel
+ headers version you've built the toolchain for.
+
+ If you know for sure that your toolchain will never need to build
+ applications that will run under a kernel version older than your
+ chosen kernel headers version (CT_KERNEL_VERSION), you can choose
+ "y" here.
-# EOL 04/2017 [Ubuntu12.04]
-config LIBC_GLIBC_V_2_15
+config GLIBC_KERNEL_VERSION_CHOSEN
bool
- prompt "2.15 (OBSOLETE)"
- depends on OBSOLETE
+ prompt "Specific kernel version"
+ help
+ Specify the earliest Linux kernel version you want glibc to
+ include support for. This does not have to match the kernel
+ headers version used for your toolchain. This controls what is
+ passed to the "--enable-kernel=" option to the glibc configure
+ script.
-config LIBC_GLIBC_V_2_14_1
- bool
- prompt "2.14.1 (OBSOLETE)"
- depends on OBSOLETE
+ If you want to be able to statically link programs with your
+ toolchain's C library, make sure this kernel version is lower than
+ all kernels you wish to support to avoid "FATAL: kernel too old"
+ errors. The higher the version you specify, the less legacy code
+ will be built into libc.
-config LIBC_GLIBC_V_2_14
- bool
- prompt "2.14 (OBSOLETE)"
- depends on OBSOLETE
+ Most people can leave this at the default value of "2.6.9".
-config LIBC_GLIBC_V_2_13
- bool
- prompt "2.13 (OBSOLETE)"
- depends on OBSOLETE
+if GLIBC_KERNEL_VERSION_CHOSEN
-# This version did not have glibc-ports addon released
-config LIBC_GLIBC_V_2_12_2
- bool
- prompt "2.12.2 (OBSOLETE)"
- depends on OBSOLETE
- depends on !LIBC_GLIBC_NEEDS_PORTS
+config GLIBC_MIN_KERNEL_VERSION
+ string
+ prompt "Minimum kernel version to support"
+ default "2.6.9"
+ help
+ Enter here the lowest kernel version glibc will be able to run against.
+
+ The minimum kernel version supported will be dependent upon the
+ target you build for. For example:
+ alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
+ sh[34]-*-linux-gnu Requires Linux 2.6.11
+ powerpc* Requires Linux 2.4.19
+ arm*-*-linux-*gnueabi Requires Linux 2.6.16
+
+ Note that no sanity check is performed by crosstool-NG to ensure
+ that the value you enter here is appropriate for your target.
-# EOL 11/2020 [CentOS6.x]
-config LIBC_GLIBC_V_2_12_1
- bool
- prompt "2.12.1 (OBSOLETE)"
- depends on OBSOLETE
+endif # GLIBC_KERNEL_VERSION_CHOSEN
endchoice
-endif # ! LIBC_GLIBC_CUSTOM
-
-# Checked by SPARC build: SPARCv8 is dropped in 2.23.
-config LIBC_GLIBC_2_23_or_later
- select LIBC_GLIBC_2_20_or_later
- bool
-
-# DeMark 2.20 as no longer needs to set NPTL as an addon.
-# It is no longer possible to build glibc without pthread!
-config LIBC_GLIBC_2_20_or_later
- bool
- select LIBC_GLIBC_2_17_or_later
-
-# DeMark no more ports
-config LIBC_GLIBC_2_17_or_later
- bool
-
-if ! LIBC_GLIBC_CUSTOM
-
-config LIBC_VERSION
+config GLIBC_MIN_KERNEL
string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "2.25" if LIBC_GLIBC_V_2_25
- default "2.24" if LIBC_GLIBC_V_2_24
- default "2.23" if LIBC_GLIBC_V_2_23
- default "2.22" if LIBC_GLIBC_V_2_22
- default "2.21" if LIBC_GLIBC_V_2_21
- default "linaro-2.20-2014.11" if LIBC_GLIBC_LINARO_V_2_20
- default "2.20" if LIBC_GLIBC_V_2_20
- default "2.19" if LIBC_GLIBC_V_2_19
- default "2.18" if LIBC_GLIBC_V_2_18
- default "2.17" if LIBC_GLIBC_V_2_17
- default "2.16.0" if LIBC_GLIBC_V_2_16_0
- default "2.15" if LIBC_GLIBC_V_2_15
- default "2.14.1" if LIBC_GLIBC_V_2_14_1
- default "2.14" if LIBC_GLIBC_V_2_14
- default "2.13" if LIBC_GLIBC_V_2_13
- default "2.12.2" if LIBC_GLIBC_V_2_12_2
- default "2.12.1" if LIBC_GLIBC_V_2_12_1
-
-endif # ! LIBC_GLIBC_CUSTOM
+ default "" if GLIBC_KERNEL_VERSION_NONE
+ default LINUX_VERSION if GLIBC_KERNEL_VERSION_AS_HEADERS
+ default GLIBC_MIN_KERNEL_VERSION if GLIBC_KERNEL_VERSION_CHOSEN
+
+endif # KERNEL_LINUX
diff --git a/config/libc/glibc.in.2 b/config/libc/glibc.in.2
deleted file mode 100644
index 93b7b59..0000000
--- a/config/libc/glibc.in.2
+++ /dev/null
@@ -1,245 +0,0 @@
-# This file contains the common configuration options
-# that apply to both glibc.
-
-# Some architectures require the ports addon. List them one by one here:
-# This list must be carefully in sync with the architectures names
-# we can find in config/arch/*
-
-# Ports were integrated into the main tarball in 2.17
-config LIBC_GLIBC_PORTS_EXTERNAL
- def_bool y
- depends on !LIBC_GLIBC_2_17_or_later
-
-config LIBC_GLIBC_NEEDS_PORTS
- def_bool y
- depends on ARCH_alpha || ARCH_arm || ARCH_m68k || ARCH_mips || ARCH_powerpc
-
-# Ports are no longer an add-on starting with 2.20
-config LIBC_GLIBC_USE_PORTS
- def_bool y
- depends on LIBC_GLIBC_NEEDS_PORTS && !LIBC_GLIBC_2_20_or_later
-
-# Force using the BFD linker during the toolchain build
-config LIBC_glibc_family
- bool
- default y
- select BINUTILS_FORCE_LD_BFD_DEFAULT
-
-config LIBC_GLIBC_EXTRA_CONFIG_ARRAY
- string
- prompt "extra config"
- default ""
- help
- Extra flags to pass onto ./configure when configuring.
-
- You can enter multiple arguments here, and arguments can contain spaces
- if they are properly quoted (or escaped, but prefer quotes). Eg.:
- --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
-
-config LIBC_GLIBC_CONFIGPARMS
- string
- prompt "Extra config params (READ HELP)"
- default "" if ! ARCH_sh
- default "no-z-defs=yes" if ARCH_sh
- help
- Some architectures need to set options in the file configparms.
- This is the case for sh3/4, which really need to set configparms
- to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
-
- Unless you are building a toolchain for sh3/4, you should leave that empty.
-
- Note: If you need to pass more than one value, separate them with
- '\n'. Eg.: var1=val1\nvar2=val2
-
-config LIBC_GLIBC_EXTRA_CFLAGS
- string
- prompt "extra target CFLAGS"
- default ""
- help
- Extra target CFLAGS to use when building.
-
-config LIBC_ENABLE_FORTIFIED_BUILD
- bool
- prompt "Enable fortified build (EXPERIMENTAL)"
- depends on EXPERIMENTAL
- help
- If you say 'y' here, then glibc will be using fortified versions
- of functions with format arguments (eg. vsyslog, printf...), and
- do a sanity check on the format at runtime, to avoid some of the
- common format string attacks.
-
- This is currently not supported, and will most probably result in
- a broken build, with an error message like:
- ../misc/syslog.c: In function '__vsyslog_chk':
- ../misc/syslog.c:123: sorry, unimplemented: inlining failed in
- call to 'syslog': function body not available
-
- If you are brave enough and want to debug the issue, then say 'y'
- here. Otherwise, be still and say 'n' (the default). ;-)
-
-
-config LIBC_DISABLE_VERSIONING
- bool
- prompt "Disable symbols versioning"
- help
- Do not include versioning information in the library objects.
-
-config LIBC_OLDEST_ABI
- string
- prompt "Oldest supported ABI"
- default ""
- help
- Set the oldest ABI supported by the C library.
-
- Setting this option, for example, to 2.2 will provide ABI support
- back to (e)glibc-2.2.
-
- If this option is not set, (e)glibc will choose for you.
-
-config LIBC_GLIBC_FORCE_UNWIND
- bool
- prompt "Force unwind support (READ HELP!)"
- default y
- help
- If your toolchain fails building while building the C library
- start files, or the complete C library, with a message like:
- configure: error: forced unwind support is required
-
- then you may try changing this option. Otherwise, leave it to
- the default 'y'.
-
- The issue seems to be related to building NPTL on old versions
- of glibc on some architectures
- (seen on s390, s390x and x86_64).
-
-config LIBC_ADDONS_LIST
- string
- prompt "Extra addons"
- default ""
- help
- Extra addons to include. Space separated list.
-
- You need to specify neither linuxthreads nor nptl, as they are added
- automagically for you depending on the threading model you chose
- earlier and on libc version selected.
-
- Also, do not specify ports even if applicable to the selected libc
- version/architecture; it is selected automatically.
-
- Eg.: libidn
-
-config LIBC_LOCALES
- bool
- prompt "Build and install locales"
- help
- Whether to build and install the libc locale files for the target,
- which is required in order to support internationalization.
-
-if LIBC_glibc && LIBC_LOCALES
-comment "WARNING! "
-comment "| The built locales will be usable if and only if the build "
-comment "| machine and the target: "
-comment "| - have the same endianness, "
-comment "| - and have the same alignment requirements for uint32_t. "
-comment "| You will have to check by yourself (for now). "
-comment "WARNING! "
-comment "| Building GLIBC locales requires that GLIBC supports "
-comment "| the build machine as the target. "
-endif # LIBC_glibc && LIBC_LOCALES
-
-if KERNEL_linux
-
-choice LIBC_GLIBC_SUPPORTED_KERNEL
- bool
- prompt "Minimum supported kernel version"
- default LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
-
-config LIBC_GLIBC_KERNEL_VERSION_NONE
- bool
- prompt "Let ./configure decide"
- help
- Let ./configure decide what minimum kernel version glibc will be
- able to run against.
-
- This will include legacy compatibility code for older kernels in
- the C library, thus ensuring that it will run on a large number
- of old kernels.
-
- The minimum kernel version supported will be dependent upon the
- target you build for. For example:
- alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
- sh[34]-*-linux-gnu Requires Linux 2.6.11
- powerpc* Requires Linux 2.4.19
- arm*-*-linux-*gnueabi Requires Linux 2.6.16
-
-config LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
- bool
- prompt "Same as kernel headers (default)"
- help
- Normally, you'll want glibc to run against the same kernel
- version as the one used for the headers.
-
- This is the default.
-
- If enabled, crosstool-ng will use the chosen version of kernel
- headers for the glibc minimum kernel version supported, which is
- what gets passed to "--enable-kernel=" when configuring glibc.
-
- Enabling this will ensure that no legacy compatibility code for
- older kernels is built into your C libraries, but it will
- be unable to run on kernel versions older than whichever kernel
- headers version you've built the toolchain for.
-
- If you know for sure that your toolchain will never need to build
- applications that will run under a kernel version older than your
- chosen kernel headers version (CT_KERNEL_VERSION), you can choose
- "y" here.
-
-config LIBC_GLIBC_KERNEL_VERSION_CHOSEN
- bool
- prompt "Specific kernel version"
- help
- Specify the earliest Linux kernel version you want glibc to
- include support for. This does not have to match the kernel
- headers version used for your toolchain. This controls what is
- passed to the "--enable-kernel=" option to the glibc configure
- script.
-
- If you want to be able to statically link programs with your
- toolchain's C library, make sure this kernel version is lower than
- all kernels you wish to support to avoid "FATAL: kernel too old"
- errors. The higher the version you specify, the less legacy code
- will be built into libc.
-
- Most people can leave this at the default value of "2.6.9".
-
-if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
-
-config LIBC_GLIBC_MIN_KERNEL_VERSION
- string
- prompt "Minimum kernel version to support"
- default "2.6.9"
- help
- Enter here the lowest kernel version glibc will be able to run against.
-
- The minimum kernel version supported will be dependent upon the
- target you build for. For example:
- alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
- sh[34]-*-linux-gnu Requires Linux 2.6.11
- powerpc* Requires Linux 2.4.19
- arm*-*-linux-*gnueabi Requires Linux 2.6.16
-
- Note that no sanity check is performed by crosstool-NG to ensure
- that the value you enter here is appropriate for your target.
-
-endif # LIBC_GLIBC_KERNEL_VERSION_CHOSEN
-
-endchoice
-
-config LIBC_GLIBC_MIN_KERNEL
- string
- default "" if LIBC_GLIBC_KERNEL_VERSION_NONE
- default KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
- default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
-
-endif # KERNEL_linux
diff --git a/config/libc/mingw-w64.in b/config/libc/mingw-w64.in
new file mode 100644
index 0000000..34f8dbc
--- /dev/null
+++ b/config/libc/mingw-w64.in
@@ -0,0 +1,43 @@
+# mingw options
+
+## depends on WINDOWS
+##
+## select LIBC_SUPPORT_THREADS_NATIVE
+## select LIBC_SUPPORT_THREADS_POSIX
+## select CC_CORE_PASS_2_NEEDED
+##
+## help The de-facto standard for Mingw distributions.
+
+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
+
+config MINGW_SECURE_API
+ bool "Expose secure API prototypes"
+ default y
+
+config MINGW_DIRECTX
+ bool "Include DirectX development files"
+
+config MINGW_DDK
+ bool "Include DDK development files"
+
+config MINGW_TOOLS
+ bool "Include the companion tools"
+ default y
+ help
+ Build the companion tools with mingw such as widl, gendef,
+ and genpeimg.
+
+config MINGW_TOOL_LIST_ARRAY
+ string "List of mingw-w64 tools to build"
+ default "gendef genidl genlib genpeimg widl"
+ depends on MINGW_TOOLS
+ help
+ List of mingw-w64 tools to build.
diff --git a/config/libc/mingw.in b/config/libc/mingw.in
deleted file mode 100644
index 0ca1823..0000000
--- a/config/libc/mingw.in
+++ /dev/null
@@ -1,159 +0,0 @@
-# mingw options
-
-## depends on WINDOWS
-##
-## select LIBC_SUPPORT_THREADS_NATIVE
-## select LIBC_SUPPORT_THREADS_POSIX
-## select CC_CORE_PASS_2_NEEDED
-##
-## help The de-facto standard for Mingw distributions.
-
-config THREADS
- default "win32" if THREADS_NATIVE
- default "posix" if THREADS_POSIX
-
-choice
- bool
- prompt "Windows API version"
-
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config WINAPI_V_5_0_2
- bool
- prompt "5.0.2"
-
-config WINAPI_V_5_0_1
- bool
- prompt "5.0.1 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_5_0_0
- bool
- prompt "5.0.0 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_4_0_6
- bool
- prompt "4.0.6"
-
-config WINAPI_V_4_0_5
- bool
- prompt "4.0.5 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_4_0_4
- bool
- prompt "4.0.4 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_4_0_2
- bool
- prompt "4.0.2 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_4_0_1
- bool
- prompt "4.0.1 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_4_0_0
- bool
- prompt "4.0.0 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_3_3_0
- bool
- prompt "3.3.0 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_3_2_0
- bool
- prompt "3.2.0 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_3_1_0
- bool
- prompt "3.1.0 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_3_0_0
- bool
- prompt "3.0.0 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_2_0_9
- bool
- prompt "2.0.9 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_2_0_8
- bool
- prompt "2.0.8 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_2_0_7
- bool
- prompt "2.0.7 (OBSOLETE)"
- depends on OBSOLETE
-
-config WINAPI_V_select
- bool
- prompt "Other version"
-
-config WINAPI_V_DEVEL
- bool
- prompt "devel"
- depends on EXPERIMENTAL
- depends on CONFIGURE_has_git
-
-endchoice
-
-config WINAPI_VERSION
- string
- prompt "Windows API version" if WINAPI_V_select
- default "devel" if WINAPI_V_DEVEL
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "5.0.2" if WINAPI_V_5_0_2
- default "5.0.1" if WINAPI_V_5_0_1
- default "5.0.0" if WINAPI_V_5_0_0
- default "4.0.6" if WINAPI_V_4_0_6
- default "4.0.5" if WINAPI_V_4_0_5
- default "4.0.4" if WINAPI_V_4_0_4
- default "4.0.2" if WINAPI_V_4_0_2
- default "4.0.1" if WINAPI_V_4_0_1
- default "4.0.0" if WINAPI_V_4_0_0
- default "3.3.0" if WINAPI_V_3_3_0
- default "3.2.0" if WINAPI_V_3_2_0
- default "3.1.0" if WINAPI_V_3_1_0
- default "3.0.0" if WINAPI_V_3_0_0
- default "2.0.9" if WINAPI_V_2_0_9
- default "2.0.8" if WINAPI_V_2_0_8
- default "2.0.7" if WINAPI_V_2_0_7
- help
- Enter the version number of the Windows API files to use
-
-config MINGW_SECURE_API
- bool "Expose secure API prototypes"
- default y
-
-config MINGW_DIRECTX
- bool "Include DirectX development files"
-
-config MINGW_DDK
- bool "Include DDK development files"
-
-config MINGW_TOOLS
- bool "Include the companion tools"
- default y
- help
- Build the companion tools with mingw such as widl, gendef,
- and genpeimg.
-
-config MINGW_TOOL_LIST_ARRAY
- string "List of mingw-w64 tools to build"
- default "gendef genidl genlib genpeimg widl"
- depends on MINGW_TOOLS
- help
- List of mingw-w64 tools to build.
diff --git a/config/libc/musl.in b/config/libc/musl.in
index 5ea166f..e16e85a 100644
--- a/config/libc/musl.in
+++ b/config/libc/musl.in
@@ -1,75 +1,66 @@
-# musl options
+# musl second-part option
## depends on ! WINDOWS && ! BARE_METAL
## depends on EXPERIMENTAL
-##
## select LIBC_SUPPORT_THREADS_NATIVE
## select CC_CORE_PASSES_NEEDED
-##
+
## help Musl is a new standard library to power a new generation of Linux-based
## help devices. musl is lightweight, fast, simple, free, and strives to be
## help correct in the sense of standards-conformance and safety.
+source "config/versions/musl.in"
+
+# TBD why? it claims "native", why report "musl"?
config THREADS
default "musl"
-config LIBC_MUSL_CUSTOM
+config LIBC_MUSL_DEBUG
bool
- prompt "Custom musl"
- depends on EXPERIMENTAL
+ prompt "Build with debugging information"
help
- The choosen musl-libc version shall be not downloaded. Instead use
- a custom location to get the source.
-
-if LIBC_MUSL_CUSTOM
+ This option enables debugging information, this will increase the size of
+ the resulting library.
-config LIBC_MUSL_CUSTOM_LOCATION
- string
- prompt "Full path to custom musl-libc source"
+config LIBC_MUSL_WARNINGS
+ bool
+ prompt "Build with recommended warnings flags"
help
- Enter the path to the directory or tarball of your source for musl.
+ Build musl-libc with extra warnings, useful for musl-libc development.
- If the path is a tarball, it should extract to: <name>-<version>/
- where the name is this component, musl, and the version is set
- below in the custom version string.
+choice
+ prompt "How to optimize musl-libc"
+ default LIBC_MUSL_OPTIMIZE_AUTO
-config LIBC_MUSL_CUSTOM_VERSION
- string
- prompt "Custom MUSL version"
+config LIBC_MUSL_OPTIMIZE_NONE
+ bool
+ prompt "Do not optimize musl-libc"
help
- Enter the version number for your custom musl-libc.
+ This option sets `--enable-optimize=no' to disable optimization.
-config LIBC_VERSION
- string
- default LIBC_MUSL_CUSTOM_VERSION
-
-endif # LIBC_MUSL_CUSTOM
-
-if ! LIBC_MUSL_CUSTOM
-
-choice
+config LIBC_MUSL_OPTIMIZE_AUTO
bool
- prompt "musl version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
+ prompt "Use musl-libc's automatic optimization"
+ help
+ This option sets `--enable-optimize=auto' to automatically set optimization.
-config LIBC_MUSL_V_1_1_16
+config LIBC_MUSL_OPTIMIZE_SPEED
bool
- prompt "1.1.16"
- depends on EXPERIMENTAL
+ prompt "Optimize musl-libc for speed"
+ help
+ This option sets `--enable-optimize=yes' to set optimization to -O3 for speed.
-config LIBC_MUSL_V_1_1_15
+config LIBC_MUSL_OPTIMIZE_SIZE
bool
- prompt "1.1.15 (OBSOLETE)"
- depends on EXPERIMENTAL && OBSOLETE
+ prompt "Optimize musl-libc for size"
+ help
+ This option sets `--enable-optimize=size' to set optimization to -Os for size.
endchoice
-config LIBC_VERSION
+config LIBC_MUSL_OPTIMIZE
string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "1.1.16" if LIBC_MUSL_V_1_1_16
- default "1.1.15" if LIBC_MUSL_V_1_1_15
-
-endif # ! LIBC_MUSL_CUSTOM
+ default "no" if LIBC_MUSL_OPTIMIZE_NONE
+ default "auto" if LIBC_MUSL_OPTIMIZE_AUTO
+ default "yes" if LIBC_MUSL_OPTIMIZE_SPEED
+ default "size" if LIBC_MUSL_OPTIMIZE_SIZE
diff --git a/config/libc/musl.in.2 b/config/libc/musl.in.2
deleted file mode 100644
index f4abcc4..0000000
--- a/config/libc/musl.in.2
+++ /dev/null
@@ -1,51 +0,0 @@
-# musl second-part option
-
-config LIBC_MUSL_DEBUG
- bool
- prompt "Build with debugging information"
- help
- This option enables debugging information, this will increase the size of
- the resulting library.
-
-config LIBC_MUSL_WARNINGS
- bool
- prompt "Build with recommended warnings flags"
- help
- Build musl-libc with extra warnings, useful for musl-libc development.
-
-choice
- prompt "How to optimize musl-libc"
- default LIBC_MUSL_OPTIMIZE_AUTO
-
-config LIBC_MUSL_OPTIMIZE_NONE
- bool
- prompt "Do not optimize musl-libc"
- help
- This option sets `--enable-optimize=no' to disable optimization.
-
-config LIBC_MUSL_OPTIMIZE_AUTO
- bool
- prompt "Use musl-libc's automatic optimization"
- help
- This option sets `--enable-optimize=auto' to automatically set optimization.
-
-config LIBC_MUSL_OPTIMIZE_SPEED
- bool
- prompt "Optimize musl-libc for speed"
- help
- This option sets `--enable-optimize=yes' to set optimization to -O3 for speed.
-
-config LIBC_MUSL_OPTIMIZE_SIZE
- bool
- prompt "Optimize musl-libc for size"
- help
- This option sets `--enable-optimize=size' to set optimization to -Os for size.
-
-endchoice
-
-config LIBC_MUSL_OPTIMIZE
- string
- default "no" if LIBC_MUSL_OPTIMIZE_NONE
- default "auto" if LIBC_MUSL_OPTIMIZE_AUTO
- default "yes" if LIBC_MUSL_OPTIMIZE_SPEED
- default "size" if LIBC_MUSL_OPTIMIZE_SIZE
diff --git a/config/libc/newlib.in b/config/libc/newlib.in
index 68e8b62..f43a67d 100644
--- a/config/libc/newlib.in
+++ b/config/libc/newlib.in
@@ -1,220 +1,219 @@
# newlib options
## depends on BARE_METAL
-##
## select LIBC_SUPPORT_THREADS_NONE
## select CC_CORE_PASSES_NEEDED if CANADIAN
## select CC_CORE_PASS_2_NEEDED if ! CANADIAN
-##
+
## help Newlib is a C library intended for use on embedded systems. It is a
## help conglomeration of several library parts, all under free software
## help licenses that make them easily usable on embedded products. Newlib
## help is only available in source form. It can be compiled for a wide
## help array of processors, and will usually work on any architecture with
## help the addition of a few low-level routines.
-#
-config LIBC_NEWLIB_CUSTOM
- bool
- prompt "Custom newlib"
- depends on EXPERIMENTAL
- select LIBC_NEWLIB_2_5_or_later
- help
- The choosen newlib version shall be not downloaded. Instead use
- a custom location to get the source.
-if LIBC_NEWLIB_CUSTOM
+source "config/versions/newlib.in"
-config LIBC_NEWLIB_CUSTOM_LOCATION
- string
- prompt "Full path to custom newlib source"
- help
- Enter the path to the directory or tarball of your source for newlib.
+# maybe older versions of newlib will support it too, but this
+# needs to be checked
+config NEWLIB_CXA_ATEXIT
+ def_bool y
+ depends on NEWLIB_2_0_or_later
+ select LIBC_PROVIDES_CXA_ATEXIT
- If the path is a tarball, it should extract to: <name>-<version>/
- where the name is this component, newlib, and the version is set
- below in the custom version string.
+config NEWLIB_HAS_NANO_MALLOC
+ def_bool y
+ depends on NEWLIB_2_1_or_later
-config LIBC_NEWLIB_CUSTOM_VERSION
- string
- prompt "Custom NEWLIB version"
- help
- Enter the version number for your custom newlib.
+config NEWLIB_HAS_NANO_FORMATTED_IO
+ def_bool y
+ depends on NEWLIB_2_2_or_later
-config LIBC_VERSION
+config LIBC_NEWLIB_TARGET_CFLAGS
string
- default LIBC_NEWLIB_CUSTOM_VERSION
-
-endif # LIBC_NEWLIB_CUSTOM
-
-if ! LIBC_NEWLIB_CUSTOM
-
-config CC_NEWLIB_SHOW_LINARO
- bool
- prompt "Show Linaro versions"
+ prompt "Target CFLAGS for newlib"
+ default ""
help
- Linaro is maintaining some advanced/more stable/experimental versions
- of newlib, especially for the ARM architecture.
-
- Those versions have not been blessed by the newlib comunity (nor have they
- been cursed either!), but they look to be pretty much stable, and even
- more stable than the upstream versions. YMMV...
-
- If you do not know what this Linaro stuff is, then simply say 'n' here,
- and rest in peace. OTOH, if you know what you are doing, you will be
- able to use and enjoy :-) the Linaro versions by saying 'y' here.
-
- Linaro: http://www.linaro.org/
-
-choice
- bool
- prompt "newlib version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-config LIBC_NEWLIB_V_2_5_0
- bool
- prompt "2.5.0.20170519"
- select LIBC_NEWLIB_2_5
+ Used to add specific options when compiling the target libraries
+ (eg. -ffunction-sections -fdata-sections), which can't be defined
+ in global TARGET_CFLAGS, because they shall be not used for the
+ gcc target libraries.
+ Note: Both TARGET_CFLAGS and LIBC_NEWLIB_TARGET_CFLAGS are used
+ to compile the libraries.
-config LIBC_NEWLIB_V_2_4_0
- bool
- prompt "2.4.0.20161025"
- select LIBC_NEWLIB_2_4
+ Leave blank if you don't know better.
-config LIBC_NEWLIB_V_2_3_0
+config LIBC_NEWLIB_IO_C99FMT
bool
- prompt "2.3.0.20160226"
- select LIBC_NEWLIB_2_3
+ prompt "Enable IOs on C99 formats"
+ help
+ Enable support for IOs on C99 formats.
-config LIBC_NEWLIB_LINARO_V_2_2_0
+config LIBC_NEWLIB_IO_LL
bool
- prompt "Linaro 2.2.0-2015.01"
- depends on CC_NEWLIB_SHOW_LINARO
- select LIBC_NEWLIB_2_2
+ prompt "Enable IOs on long long"
+ help
+ Enable support for IOs on long long integers.
-config LIBC_NEWLIB_V_2_2_0
+config LIBC_NEWLIB_IO_FLOAT
bool
- prompt "2.2.0.20151023"
- select LIBC_NEWLIB_2_2
+ prompt "Enable IOs on floats and doubles"
+ help
+ Enable support for IOs on floating point
+ values (float and double).
-config LIBC_NEWLIB_LINARO_V_2_1_0
+config LIBC_NEWLIB_IO_LDBL
bool
- prompt "Linaro 2.1.0-2014.09"
- depends on CC_NEWLIB_SHOW_LINARO
- select LIBC_NEWLIB_2_1
+ prompt "Enable IOs on long doubles"
+ depends on LIBC_NEWLIB_IO_FLOAT
+ help
+ Enable support for IOs on long doubles.
-config LIBC_NEWLIB_V_2_1_0
+config LIBC_NEWLIB_IO_POS_ARGS
bool
- prompt "2.1.0"
- select LIBC_NEWLIB_2_1
+ prompt "Enable printf-family positional arg support"
+ help
+ Enable printf-family positional arg support.
-config LIBC_NEWLIB_V_2_0_0
+config LIBC_NEWLIB_FVWRITE_IN_STREAMIO
bool
- prompt "2.0.0"
- select LIBC_NEWLIB_2_0
+ prompt "Vector buffer mechanism to support stream IO buffering"
+ default y
+ help
+ NEWLIB implements the vector buffer mechanism to support stream IO
+ buffering required by C standard. This feature is possibly
+ unnecessary for embedded systems which won't change file buffering
+ with functions like `setbuf' or `setvbuf'. The buffering mechanism
+ still acts as default for STDIN/STDOUT/STDERR even if this option
+ is specified.
-config LIBC_NEWLIB_V_1_20_0
+config LIBC_NEWLIB_UNBUF_STREAM_OPT
bool
- prompt "1.20.0"
+ prompt "Optimize fprintf to unbuffered unix file"
+ default y
+ help
+ NEWLIB does optimization when `fprintf to write only unbuffered unix
+ file'. It creates a temorary buffer to do the optimization that
+ increases stack consumption by about `BUFSIZ' bytes. Disabling this option
+ disables the optimization and saves size of text and stack.
-config LIBC_NEWLIB_V_1_19_0
+config LIBC_NEWLIB_FSEEK_OPTIMIZATION
bool
- prompt "1.19.0"
+ prompt "Fseek optimisation"
+ default y
+ help
+ Disabling fseek optimisation can decrease code size.
-config LIBC_NEWLIB_V_1_18_0
+config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
bool
- prompt "1.18.0"
+ prompt "Disable the syscalls supplied with newlib"
+ help
+ Disable the syscalls that come with newlib. You
+ will have to implement your own _sbrk, _read,
+ _write... If you plan to port newlib to a new
+ platform/board, say Yes.
-config LIBC_NEWLIB_V_1_17_0
+config LIBC_NEWLIB_REGISTER_FINI
bool
- prompt "1.17.0"
-
-endchoice
-
-endif # ! LIBC_NEWLIB_CUSTOM
+ prompt "Enable finalization function registration using atexit"
+ help
+ Enable finalization function registration using atexit.
-config LIBC_NEWLIB_2_5
+config LIBC_NEWLIB_ATEXIT_DYNAMIC_ALLOC
bool
- select LIBC_NEWLIB_2_5_or_later
+ prompt "Enable dynamic allocation of atexit entries"
+ default y
+ help
+ Enable dynamic allocation of atexit entries.
-config LIBC_NEWLIB_2_4
+config LIBC_NEWLIB_GLOBAL_ATEXIT
bool
- select LIBC_NEWLIB_2_4_or_later
+ prompt "Enable atexit data structure as global variable"
+ help
+ Enable atexit data structure as global variable. By doing so it is
+ move out of _reent structure, and can be garbage collected if atexit
+ is not referenced.
-config LIBC_NEWLIB_2_3
+config LIBC_NEWLIB_LITE_EXIT
bool
- select LIBC_NEWLIB_2_3_or_later
+ prompt "Enable lite exit"
+ help
+ Enable lite exit, a size-reduced implementation of exit that doesn't
+ invoke clean-up functions such as _fini or global destructors.
-config LIBC_NEWLIB_2_2
+config LIBC_NEWLIB_REENT_SMALL
bool
- select LIBC_NEWLIB_2_2_or_later
+ prompt "Enable small reentrant struct support"
+ help
+ Enable small reentrant struct support.
-config LIBC_NEWLIB_2_1
+config LIBC_NEWLIB_MULTITHREAD
bool
- select LIBC_NEWLIB_2_1_or_later
+ prompt "Enable support for multiple threads"
+ default y
+ help
+ Enable support for multiple threads.
-config LIBC_NEWLIB_2_0
+config LIBC_NEWLIB_EXTRA_SECTIONS
bool
- select LIBC_NEWLIB_2_0_or_later
+ prompt "Place each function & data element in their own section"
+ help
+ Place each function & data symbol in their own section. This allows
+ the linker to garbage collect unused symbols at link time.
-config LIBC_NEWLIB_2_5_or_later
+config LIBC_NEWLIB_WIDE_ORIENT
bool
- select LIBC_NEWLIB_2_4_or_later
+ prompt "Allow wide C99 stream orientation"
+ default y
+ help
+ C99 states that each stream has an orientation, wide or byte. This
+ feature is possibly unnecessary for embedded systems which only do
+ byte input/output operations on stream. Disabling this feature can
+ decrease code size.
-config LIBC_NEWLIB_2_4_or_later
+config LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE
bool
- select LIBC_NEWLIB_2_3_or_later
+ prompt "Optimize newlib for size"
+ default y
+ help
+ Pass --enable-target-optspace to newlib configure.
-config LIBC_NEWLIB_2_3_or_later
- bool
- select LIBC_NEWLIB_2_2_or_later
+ This will compile newlib with -Os.
-config LIBC_NEWLIB_2_2_or_later
+config LIBC_NEWLIB_LTO
bool
- select LIBC_NEWLIB_2_1_or_later
+ prompt "Enable Link Time Optimization"
+ depends on CC_GCC_USE_LTO
+ help
+ Builds the libraries with -flto to enable more aggressive link time
+ optimization. You will need to add -flto-partition=one to your
+ application's link line to keep the RETURN assembler macro together
+ with it's consumers.
-config LIBC_NEWLIB_2_1_or_later
+config LIBC_NEWLIB_NANO_MALLOC
bool
- select LIBC_NEWLIB_2_0_or_later
+ prompt "Enable Nano Malloc"
+ depends on NEWLIB_HAS_NANO_MALLOC
+ help
+ NEWLIB has two implementations of malloc family's functions, one in
+ `mallocr.c' and the other one in `nano-mallocr.c'. This options
+ enables the nano-malloc implementation, which is for small systems
+ with very limited memory. Note that this implementation does not
+ support `--enable-malloc-debugging' any more.
-# maybe older versions of newlib will support it too, but this
-# needs to be checked
-config LIBC_NEWLIB_2_0_or_later
+config LIBC_NEWLIB_NANO_FORMATTED_IO
bool
- select LIBC_PROVIDES_CXA_ATEXIT
-
-if ! LIBC_NEWLIB_CUSTOM
-config LIBC_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "2.5.0.20170519" if LIBC_NEWLIB_V_2_5_0
- default "2.4.0.20161025" if LIBC_NEWLIB_V_2_4_0
- default "2.3.0.20160226" if LIBC_NEWLIB_V_2_3_0
- default "linaro-2.2.0-2015.01" if LIBC_NEWLIB_LINARO_V_2_2_0
- default "2.2.0.20151023" if LIBC_NEWLIB_V_2_2_0
- default "linaro-2.1.0-2014.09" if LIBC_NEWLIB_LINARO_V_2_1_0
- default "2.1.0" if LIBC_NEWLIB_V_2_1_0
- default "2.0.0" if LIBC_NEWLIB_V_2_0_0
- default "1.20.0" if LIBC_NEWLIB_V_1_20_0
- default "1.19.0" if LIBC_NEWLIB_V_1_19_0
- default "1.18.0" if LIBC_NEWLIB_V_1_18_0
- default "1.17.0" if LIBC_NEWLIB_V_1_17_0
- help
- Enter the tag you want to use.
- Leave empty to use the 'head' of the repository.
-
-endif # ! LIBC_NEWLIB_CUSTOM
+ prompt "Enable Nano Formatted I/O"
+ depends on NEWLIB_HAS_NANO_FORMATTED_IO
+ help
+ This builds NEWLIB with a special implementation of formatted I/O
+ functions, designed to lower the size of application on small systems
+ with size constraint issues. This option does not affect wide-char
+ formatted I/O functions.
-config LIBC_NEWLIB_TARGET_CFLAGS
+config LIBC_NEWLIB_EXTRA_CONFIG_ARRAY
string
- prompt "Target CFLAGS for newlib"
+ prompt "Extra config for newlib"
default ""
help
- Used to add specific options when compiling the target libraries
- (eg. -ffunction-sections -fdata-sections), which can't be defined
- in global TARGET_CFLAGS, because they shall be not used for the
- gcc target libraries.
- Note: Both TARGET_CFLAGS and LIBC_NEWLIB_TARGET_CFLAGS are used
- to compile the libraries.
-
- Leave blank if you don't know better.
+ Extra flags to pass onto ./configure when configuring the newlib.
diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2
deleted file mode 100644
index 96bd22b..0000000
--- a/config/libc/newlib.in.2
+++ /dev/null
@@ -1,176 +0,0 @@
-# newlib second-part options
-
-config LIBC_NEWLIB_IO_C99FMT
- bool
- prompt "Enable IOs on C99 formats"
- help
- Enable support for IOs on C99 formats.
-
-config LIBC_NEWLIB_IO_LL
- bool
- prompt "Enable IOs on long long"
- help
- Enable support for IOs on long long integers.
-
-config LIBC_NEWLIB_IO_FLOAT
- bool
- prompt "Enable IOs on floats and doubles"
- help
- Enable support for IOs on floating point
- values (float and double).
-
-config LIBC_NEWLIB_IO_LDBL
- bool
- prompt "Enable IOs on long doubles"
- depends on LIBC_NEWLIB_IO_FLOAT
- help
- Enable support for IOs on long doubles.
-
-config LIBC_NEWLIB_IO_POS_ARGS
- bool
- prompt "Enable printf-family positional arg support"
- help
- Enable printf-family positional arg support.
-
-config LIBC_NEWLIB_FVWRITE_IN_STREAMIO
- bool
- prompt "Vector buffer mechanism to support stream IO buffering"
- default y
- help
- NEWLIB implements the vector buffer mechanism to support stream IO
- buffering required by C standard. This feature is possibly
- unnecessary for embedded systems which won't change file buffering
- with functions like `setbuf' or `setvbuf'. The buffering mechanism
- still acts as default for STDIN/STDOUT/STDERR even if this option
- is specified.
-
-config LIBC_NEWLIB_UNBUF_STREAM_OPT
- bool
- prompt "Optimize fprintf to unbuffered unix file"
- default y
- help
- NEWLIB does optimization when `fprintf to write only unbuffered unix
- file'. It creates a temorary buffer to do the optimization that
- increases stack consumption by about `BUFSIZ' bytes. Disabling this option
- disables the optimization and saves size of text and stack.
-
-config LIBC_NEWLIB_FSEEK_OPTIMIZATION
- bool
- prompt "Fseek optimisation"
- default y
- help
- Disabling fseek optimisation can decrease code size.
-
-config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
- bool
- prompt "Disable the syscalls supplied with newlib"
- help
- Disable the syscalls that come with newlib. You
- will have to implement your own _sbrk, _read,
- _write... If you plan to port newlib to a new
- platform/board, say Yes.
-
-config LIBC_NEWLIB_REGISTER_FINI
- bool
- prompt "Enable finalization function registration using atexit"
- help
- Enable finalization function registration using atexit.
-
-config LIBC_NEWLIB_ATEXIT_DYNAMIC_ALLOC
- bool
- prompt "Enable dynamic allocation of atexit entries"
- default y
- help
- Enable dynamic allocation of atexit entries.
-
-config LIBC_NEWLIB_GLOBAL_ATEXIT
- bool
- prompt "Enable atexit data structure as global variable"
- help
- Enable atexit data structure as global variable. By doing so it is
- move out of _reent structure, and can be garbage collected if atexit
- is not referenced.
-
-config LIBC_NEWLIB_LITE_EXIT
- bool
- prompt "Enable lite exit"
- help
- Enable lite exit, a size-reduced implementation of exit that doesn't
- invoke clean-up functions such as _fini or global destructors.
-
-config LIBC_NEWLIB_REENT_SMALL
- bool
- prompt "Enable small reentrant struct support"
- help
- Enable small reentrant struct support.
-
-config LIBC_NEWLIB_MULTITHREAD
- bool
- prompt "Enable support for multiple threads"
- default y
- help
- Enable support for multiple threads.
-
-config LIBC_NEWLIB_EXTRA_SECTIONS
- bool
- prompt "Place each function & data element in their own section"
- help
- Place each function & data symbol in their own section. This allows
- the linker to garbage collect unused symbols at link time.
-
-config LIBC_NEWLIB_WIDE_ORIENT
- bool
- prompt "Allow wide C99 stream orientation"
- default y
- help
- C99 states that each stream has an orientation, wide or byte. This
- feature is possibly unnecessary for embedded systems which only do
- byte input/output operations on stream. Disabling this feature can
- decrease code size.
-
-config LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE
- bool
- prompt "Optimize newlib for size"
- default y
- help
- Pass --enable-target-optspace to newlib configure.
-
- This will compile newlib with -Os.
-
-config LIBC_NEWLIB_LTO
- bool
- prompt "Enable Link Time Optimization"
- depends on CC_GCC_USE_LTO
- help
- Builds the libraries with -flto to enable more aggressive link time
- optimization. You will need to add -flto-partition=one to your
- application's link line to keep the RETURN assembler macro together
- with it's consumers.
-
-config LIBC_NEWLIB_NANO_MALLOC
- bool
- prompt "Enable Nano Malloc"
- depends on LIBC_NEWLIB_2_1_or_later
- help
- NEWLIB has two implementations of malloc family's functions, one in
- `mallocr.c' and the other one in `nano-mallocr.c'. This options
- enables the nano-malloc implementation, which is for small systems
- with very limited memory. Note that this implementation does not
- support `--enable-malloc-debugging' any more.
-
-config LIBC_NEWLIB_NANO_FORMATTED_IO
- bool
- prompt "Enable Nano Formatted I/O"
- depends on LIBC_NEWLIB_2_2_or_later
- help
- This builds NEWLIB with a special implementation of formatted I/O
- functions, designed to lower the size of application on small systems
- with size constraint issues. This option does not affect wide-char
- formatted I/O functions.
-
-config LIBC_NEWLIB_EXTRA_CONFIG_ARRAY
- string
- prompt "Extra config for newlib"
- default ""
- help
- Extra flags to pass onto ./configure when configuring the newlib.
diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in
index a85cf21..e12c3fd 100644
--- a/config/libc/uClibc.in
+++ b/config/libc/uClibc.in
@@ -4,6 +4,7 @@
##
## select LIBC_SUPPORT_THREADS_LT
## select LIBC_SUPPORT_THREADS_NONE
+## select LIBC_SUPPORT_THREADS_NATIVE if UCLIBC_0_9_33_2_or_later
## select CC_CORE_PASSES_NEEDED
##
## help The de-facto standard for embeded linux systems.
@@ -11,6 +12,8 @@
## help Highly configurable, thus as feature-rich as you
## help need, without compromising for size.
+source "config/versions/uClibc.in"
+
config THREADS
default "nptl" if THREADS_NATIVE
default "linuxthreads" if THREADS_LT
@@ -20,141 +23,18 @@ comment "'softfp' ABI and uClibc is not entirely tested in crosstool-NG"
comment "You may experience issues, although it should work just fine"
endif # ARCH_FLOAT_SOFTFP
-config LIBC_UCLIBC_CUSTOM
- bool
- prompt "Custom uClibc"
- depends on EXPERIMENTAL
- help
- The choosen uclibc version shall be not downloaded. Instead use
- a custom location to get the source.
-
-if LIBC_UCLIBC_CUSTOM
-
-choice
- bool
- prompt "uClibc Version Name"
-
-config LIBC_UCLIBC_CUSTOM_UCLIBC
- bool "uClibc (OBSOLETE)"
- depends on OBSOLETE
- select LIBC_UCLIBC_0_9_33_2_or_later
-
-config LIBC_UCLIBC_CUSTOM_UCLIBC_NG
- bool "uClibc-ng (1.0.15 or later)"
- select LIBC_UCLIBC_NG_1_0_15_or_later
-
-config LIBC_UCLIBC_CUSTOM_UCLIBC_NG_OLD
- bool "uClibc-ng (older than 1.0.15)"
- select LIBC_UCLIBC_NG_1_0_0_or_later
-
-endchoice
-
-config LIBC_UCLIBC_CUSTOM_LOCATION
- string
- prompt "Full path to custom uClibc source"
- help
- Enter the path to the directory or tarball of your source for uClibc.
-
- If the path is a tarball, it should extract to: <name>-<version>/
- where the name is this component will be set by the uClibc Version Name
- option from above, and the version is set below in the custom version
- string.
-
-config LIBC_UCLIBC_CUSTOM_VERSION
- string
- prompt "Custom uClibc Version"
- help
- Enter the version number for your custom uClibc.
- Version 1.0.18 is only enabled in EXPERIMENTAL builds due to issues
- with static libraries.
-
-config LIBC_VERSION
- string
- default LIBC_UCLIBC_CUSTOM_VERSION
-
-endif # LIBC_UCLIBC_CUSTOM
-
-if ! LIBC_UCLIBC_CUSTOM
-
-choice
- bool
- prompt "uClibc version"
-# Don't remove next line
-# CT_INSERT_VERSION_BELOW
-
-config LIBC_UCLIBC_NG_V_1_0_25
- bool
- prompt "1.0.25"
- select LIBC_UCLIBC_NG_1_0_15_or_later
-
-config LIBC_UCLIBC_NG_V_1_0_24
- bool
- prompt "1.0.24"
- select LIBC_UCLIBC_NG_1_0_15_or_later
-
-config LIBC_UCLIBC_NG_V_1_0_23
- bool
- prompt "1.0.23"
- select LIBC_UCLIBC_NG_1_0_15_or_later
-
-config LIBC_UCLIBC_NG_V_1_0_22
- bool
- prompt "1.0.22"
- select LIBC_UCLIBC_NG_1_0_15_or_later
-
-config LIBC_UCLIBC_NG_V_1_0_21
- bool
- prompt "1.0.21 (OBSOLETE)"
- depends on OBSOLETE
- select LIBC_UCLIBC_NG_1_0_15_or_later
-
-config LIBC_UCLIBC_NG_V_1_0_20
- bool
- prompt "1.0.20 (OBSOLETE)"
- depends on OBSOLETE
- select LIBC_UCLIBC_NG_1_0_15_or_later
-
-config LIBC_UCLIBC_V_0_9_33_2
- bool
- prompt "0.9.33.2 (OBSOLETE)"
- depends on OBSOLETE
- select LIBC_UCLIBC_0_9_33_2_or_later
-
-endchoice
-
-config LIBC_VERSION
- string
-# Don't remove next line
-# CT_INSERT_VERSION_STRING_BELOW
- default "1.0.25" if LIBC_UCLIBC_NG_V_1_0_25
- default "1.0.24" if LIBC_UCLIBC_NG_V_1_0_24
- default "1.0.23" if LIBC_UCLIBC_NG_V_1_0_23
- default "1.0.22" if LIBC_UCLIBC_NG_V_1_0_22
- default "1.0.21" if LIBC_UCLIBC_NG_V_1_0_21
- default "1.0.20" if LIBC_UCLIBC_NG_V_1_0_20
- default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2
-
-endif # ! LIBC_UCLIBC_CUSTOM
-
-config LIBC_UCLIBC_NG_1_0_15_or_later
- bool
- select LIBC_UCLIBC_NG_1_0_0_or_later
-
-config LIBC_UCLIBC_NG_1_0_0_or_later
- bool
- select LIBC_UCLIBC_NG
- select LIBC_UCLIBC_0_9_33_2_or_later
-
-config LIBC_UCLIBC_0_9_33_2_or_later
- bool
- select LIBC_SUPPORT_THREADS_NATIVE
- select LIBC_UCLIBC_PARALLEL
-
config LIBC_UCLIBC_PARALLEL
- bool
+ def_bool y
+ depends on UCLIBC_0_9_33_2_or_later
config LIBC_UCLIBC_NG
- bool
+ def_bool y
+ depends on UCLIBC_1_0_0_or_later
+
+# uClibc-ng 1.0.15 did away with 2 implementations of linuxthreads
+config UCLIBC_MERGED_LINUXTHREADS
+ def_bool y
+ depends on UCLIBC_1_0_15_or_later
choice
bool
@@ -230,3 +110,98 @@ config LIBC_UCLIBC_CONFIG_FILE
Path to the configuration file.
If the file is not provided, we fall back to a default config file.
+
+if THREADS_LT && !UCLIBC_MERGED_LINUXTHREADS
+
+choice
+ bool
+ prompt "Linuxthread implementation: "
+ default LIBC_UCLIBC_LNXTHRD_OLD
+
+config LIBC_UCLIBC_LNXTHRD_OLD
+ bool
+ prompt "old/stable"
+ help
+ From the uClibc config option help:
+ There are two versions of linuxthreads. The older (stable) version
+ has been in uClibc for quite a long time but hasn't seen too many
+ updates other than bugfixes.
+
+config LIBC_UCLIBC_LNXTHRD_NEW
+ bool
+ prompt "new"
+ help
+ From the uClibc config option help:
+ The new version has not been tested much, and lacks ports for arches
+ which glibc does not support (like frv, etc...), but is based on
+ the latest code from glibc, so it may be the only choice for the
+ newer ports (like alpha/amd64/64bit arches and hppa).
+
+endchoice
+
+endif # THREADS_LT
+
+config LIBC_UCLIBC_LNXTHRD
+ string
+ default "" if THREADS_NONE
+ default "" if THREADS_NATIVE
+ default "" if UCLIBC_MERGED_LINUXTHREADS
+ default "old" if LIBC_UCLIBC_LNXTHRD_OLD
+ default "new" if LIBC_UCLIBC_LNXTHRD_NEW
+
+config LIBC_UCLIBC_LOCALES
+ bool
+ select LIBC_UCLIBC_WCHAR
+ prompt "Add support for locales"
+ help
+ Say y if you want uClibc to support localisation.
+
+ Note that seems to be broken on recent uClibc releases.
+
+config LIBC_UCLIBC_IPV6
+ bool
+ prompt "Add support for IPv6"
+ help
+ Say y if you want uClibc to support IPv6.
+
+config LIBC_UCLIBC_WCHAR
+ bool
+ prompt "Add support for WCHAR"
+ help
+ Say y if you want uClibc to support WCHAR.
+
+ Maybe this is needed, if you're building a C++-Compiler
+
+config LIBC_UCLIBC_FENV
+ bool
+ prompt "Add support for fenv.h"
+ default y if ARCH_X86
+ help
+ fenv.h provides functions to control the floating point environment,
+ such as rounding mode, exceptions...
+
+ For some architectures, fenv.h is incomplete, so is not installed
+ by default. x86 is known to have a rather complete fenv.h, so it is
+ installed by default only for x86.
+
+ If you need fenv.h on other architectures, say 'y' here, but you may
+ encounter some issues.
+
+config LIBC_UCLIBC_RPC
+ bool
+ prompt "Add support for RPC"
+ help
+ Enable support for remote procedure calls (RPC) in uClibc.
+
+if ARCH_ARM
+config LIBC_UCLIBC_USE_GNU_SUFFIX
+ bool
+ default y
+ prompt "Use -uclibcgnueabi suffix"
+ help
+ Depending on where the resulting toolchain will be used, you may need
+ to tweak the "system" part of the target tuple. Buildroot prefers
+ to have arm-*-linux-uclibcgnueabi; OpenEmbedded prefers
+ arm-*-linux-uclibceabi. Other tools seem to either accept both, or
+ don't care about the suffix.
+endif
diff --git a/config/libc/uClibc.in.2 b/config/libc/uClibc.in.2
deleted file mode 100644
index 1b34855..0000000
--- a/config/libc/uClibc.in.2
+++ /dev/null
@@ -1,110 +0,0 @@
-# uClibc second-part option
-
-if THREADS_LT && !LIBC_UCLIBC_NG_1_0_15_or_later
-
-choice
- bool
- prompt "Linuxthread implementation: "
- default LIBC_UCLIBC_LNXTHRD_OLD
-
-config LIBC_UCLIBC_LNXTHRD_OLD
- bool
- prompt "old/stable"
- help
- From the uClibc config option help:
- There are two versions of linuxthreads. The older (stable) version
- has been in uClibc for quite a long time but hasn't seen too many
- updates other than bugfixes.
-
-config LIBC_UCLIBC_LNXTHRD_NEW
- bool
- prompt "new"
- help
- From the uClibc config option help:
- The new version has not been tested much, and lacks ports for arches
- which glibc does not support (like frv, etc...), but is based on
- the latest code from glibc, so it may be the only choice for the
- newer ports (like alpha/amd64/64bit arches and hppa).
-
-endchoice
-
-endif # THREADS_LT
-
-# uClibc-ng 1.0.15 did away with 2 implementations of linuxthreads
-config LIBC_UCLIBC_LNXTHRD
- string
- default "" if THREADS_NONE
- default "" if THREADS_NATIVE
- default "" if LIBC_UCLIBC_NG_1_0_15_or_later
- default "old" if LIBC_UCLIBC_LNXTHRD_OLD
- default "new" if LIBC_UCLIBC_LNXTHRD_NEW
-
-config LIBC_UCLIBC_LOCALES
- bool
- select LIBC_UCLIBC_WCHAR
- prompt "Add support for locales"
- help
- Say y if you want uClibc to support localisation.
-
- Note that seems to be broken on recent uClibc releases.
-
-config LIBC_UCLIBC_LOCALES_PREGEN_DATA
- bool
- prompt "Use pregen locales"
- depends on LIBC_UCLIBC_LOCALES
- depends on ! LIBC_UCLIBC_NG
- default y
- help
- If you see issues with using pre-generated locales data,
- you can try switching this off.
-
- If so, please report the issue, so we can default this
- to off if too many people complain.
-
-config LIBC_UCLIBC_IPV6
- bool
- prompt "Add support for IPv6"
- help
- Say y if you want uClibc to support IPv6.
-
-config LIBC_UCLIBC_WCHAR
- bool
- prompt "Add support for WCHAR"
- help
- Say y if you want uClibc to support WCHAR.
-
- Maybe this is needed, if you're building a C++-Compiler
-
-config LIBC_UCLIBC_FENV
- bool
- prompt "Add support for fenv.h"
- default y if ARCH_x86
- help
- fenv.h provides functions to control the floating point environment,
- such as rounding mode, exceptions...
-
- For some architectures, fenv.h is incomplete, so is not installed
- by default. x86 is known to have a rather complete fenv.h, so it is
- installed by default only for x86.
-
- If you need fenv.h on other architectures, say 'y' here, but you may
- encounter some issues.
-
-config LIBC_UCLIBC_RPC
- bool
- prompt "Add support for RPC"
- help
- Enable support for remote procedure calls (RPC) in uClibc.
-
-if ARCH_arm
-config LIBC_UCLIBC_USE_GNU_SUFFIX
- bool
- default y
- prompt "Use -uclibcgnueabi suffix"
- help
- Depending on where the resulting toolchain will be used, you may need
- to tweak the "system" part of the target tuple. Buildroot prefers
- to have arm-*-linux-uclibcgnueabi; OpenEmbedded prefers
- arm-*-linux-uclibceabi. Other tools seem to either accept both, or
- don't care about the suffix.
-endif
diff --git a/config/target.in b/config/target.in
index 50aaa61..677c67e 100644
--- a/config/target.in
+++ b/config/target.in
@@ -2,9 +2,6 @@
menu "Target options"
-config ARCH
- string
-
source "config/gen/arch.in"
config ARCH_SUFFIX
@@ -96,8 +93,16 @@ config ARCH_USE_MMU
have one (eg. ARM Cortex-A8).
#--------------------------------------
+config ARCH_SUPPORTS_EITHER_ENDIAN
+ bool
+ help
+ Architecture allows to select endianness at the time the toolchain is built.
+
config ARCH_SUPPORTS_BOTH_ENDIAN
bool
+ select ARCH_SUPPORTS_EITHER_ENDIAN
+ help
+ Toolchain supports both big/little endian.
config ARCH_DEFAULT_BE
bool
@@ -105,12 +110,22 @@ config ARCH_DEFAULT_BE
config ARCH_DEFAULT_LE
bool
+config ARCH_DEFAULT_BE_LE
+ bool
+ depends on ARCH_SUPPORTS_BOTH_ENDIAN
+
+config ARCH_DEFAULT_LE_BE
+ bool
+ depends on ARCH_SUPPORTS_BOTH_ENDIAN
+
choice
bool
prompt "Endianness:"
- depends on ARCH_SUPPORTS_BOTH_ENDIAN
+ depends on ARCH_SUPPORTS_EITHER_ENDIAN
default ARCH_BE if ARCH_DEFAULT_BE
default ARCH_LE if ARCH_DEFAULT_LE
+ default ARCH_BE_LE if ARCH_DEFAULT_BE_LE
+ default ARCH_LE_BE if ARCH_DEFAULT_LE_BE
config ARCH_BE
bool
@@ -120,13 +135,23 @@ config ARCH_LE
bool
prompt "Little endian"
+config ARCH_BE_LE
+ bool
+ prompt "Both, default big endian"
+
+config ARCH_LE_BE
+ bool
+ prompt "Both, default little endian"
+
endchoice
config ARCH_ENDIAN
string
- depends on ARCH_SUPPORTS_BOTH_ENDIAN
- default "big" if ARCH_BE
- default "little" if ARCH_LE
+ depends on ARCH_SUPPORTS_EITHER_ENDIAN
+ default "big" if ARCH_BE
+ default "little" if ARCH_LE
+ default "big,little" if ARCH_BE_LE
+ default "little,big" if ARCH_LE_BE
#--------------------------------------
config ARCH_SUPPORTS_8
@@ -211,6 +236,9 @@ config ARCH_SUPPORTS_WITH_FLOAT
config ARCH_SUPPORTS_WITH_FPU
bool
+config ARCH_SUPPORTS_WITH_ENDIAN
+ bool
+
config ARCH_SUPPORTS_SOFTFP
bool
@@ -399,12 +427,35 @@ config TARGET_LDFLAGS
config ARCH_FLOAT
string
- default "" if ! ARCH_SUPPORTS_WITH_FLOAT
default "auto" if ARCH_FLOAT_AUTO
default "hard" if ARCH_FLOAT_HW
default "soft" if ARCH_FLOAT_SW
default "softfp" if ARCH_FLOAT_SOFTFP
-source "config/gen/arch.in.2"
+config TARGET_USE_OVERLAY
+ bool
+
+if TARGET_USE_OVERLAY
+
+config OVERLAY_NAME
+ string "Custom processor configuration name"
+ help
+ Enter the name of the custom processor configuration.
+ Overlay file for that configuration must be called
+ '<ARCH>_<OVERLAY_NAME>.tar' (optionally, with .gz/.bz2/.lzma/.xz
+ extension).
+
+ Leave blank to use the default '<ARCH>_overlay.tar'.
+ For more information about this option, please also consult the
+ section 'Using crosstool-NG to build Xtensa toolchains' in the
+ in http://crosstool-ng.github.io/docs/caveats-features/
+
+config OVERLAY_LOCATION
+ string "Full path to custom configuration (overlay)"
+ help
+ Enter the path to the directory for the custom processor
+ configuration file.
+
+endif
endmenu
diff --git a/config/toolchain.in b/config/toolchain.in
index 1b2a289..6d3ff29 100644
--- a/config/toolchain.in
+++ b/config/toolchain.in
@@ -76,6 +76,22 @@ config STATIC_TOOLCHAIN
NOTE: this has no connection to whether the target libraries will be
dynamic or static. This only applies to the tools themselves.
+config SHOW_CT_VERSION
+ bool
+ prompt "Add crosstool-NG version to --version output"
+ default y
+ help
+ If yes, the crosstool-NG version will be included in the output of
+ gcc --version, and also in binutils, glibc, gdb and gdbserver.
+
+ If this is enabled, the package version will include:
+ "crosstool-NG ${CT_VERSION}"
+
+ If this is disabled and no ID string is given below, the default
+ of each individual package will be used.
+
+ This is passed to the configure flag --with-pkgversion.
+
config TOOLCHAIN_PKGVERSION
string
prompt "Toolchain ID string"
@@ -86,10 +102,10 @@ config TOOLCHAIN_PKGVERSION
the output of gcc --version, and also in binutils, glibc, gdb and
gdbserver.
- If this string is left empty, the actual package version will be:
- "crosstool-NG ${CT_VERSION}"
- Otherwise, it will be:
+ If this is enabled, it will either be added to the crosstool-NG version:
"crosstool-NG ${CT_VERSION} - ${CT_TOOLCHAIN_PKGVERSION}"
+ Or it will be entirely on its own:
+ "${CT_TOOLCHAIN_PKGVERSION}"
This is passed to the configure flag --with-pkgversion.
@@ -105,7 +121,7 @@ comment "Tuple completion and aliasing"
config TARGET_VENDOR
string
prompt "Tuple's vendor string"
- depends on !LIBC_avr_libc
+ depends on !LIBC_AVR_LIBC
default "unknown"
help
Vendor part of the target tuple.
diff --git a/configure.ac b/configure.ac
index 010c2e0..24dcbcd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -313,7 +313,7 @@ ACX_PROG_VERSION([LIBTOOLIZE],
ACX_PROG_VERSION([AUTOCONF],
[GNU autoconf >= 2.65],
- [AUTOCONF],
+ [autoconf],
[autoconf],
['\(GNU Autoconf\) ([3-9]\.|2\.[7-9][0-9]|2\.6[5-9])'],
[autoconf_2_63_or_newer])
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/kconfig/kconfig.mk b/kconfig/kconfig.mk
index c82e502..ec0cd8a 100644
--- a/kconfig/kconfig.mk
+++ b/kconfig/kconfig.mk
@@ -26,6 +26,7 @@ nconfig:
oldconfig: .config
@$(CT_ECHO) " CONF $@"
+ $(SILENT)$(sed) -i -r -f $(CT_LIB_DIR)/scripts/upgrade.sed $<
$(SILENT)$(CONF) --silent$@ $(KCONFIG_TOP)
savedefconfig: .config
diff --git a/maintainer/addToolVersion.sh b/maintainer/addToolVersion.sh
deleted file mode 100755
index 38c2e55..0000000
--- a/maintainer/addToolVersion.sh
+++ /dev/null
@@ -1,238 +0,0 @@
-#!/bin/sh
-set -e
-
-# Adds a new version to one of the toolchain component
-myname="$0"
-
-# Parse the tools' paths configuration
-# It is expected that this script is only to be run from the
-# source directory of crosstool-NG, so it is trivial to find
-# paths.sh (we can't use ". paths.sh", as POSIX states that
-# $PATH should be searched for, and $PATH most probably doe
-# not include "."), hence the "./".
-. "./paths.sh"
-
-doHelp() {
- cat <<-EOF
- Usage: ${myname} <--tool> <[options] version [...]> ...
- 'tool' in one of:
- gcc, binutils, glibc, uClibc, uClibc-ng, newlib, linux, gdb,
- duma, strace, ltrace, libelf, gmp, mpfr, isl, cloog, mpc,
- mingw-w64, expat, ncurses, musl, gettext, zlib, libiconv
-
- Valid options for all tools:
- --stable, -s, +x (default)
- mark the version as being stable (as opposed to experimental, below)
-
- --experimental, -x, +s
- mark the version as being experimental (as opposed to stable, above)
-
- --current, -c, +o (default)
- mark the version as being cuurent (as opposed to obsolete, below)
-
- --obsolete, -o, +c
- mark the version as being obsolete (as opposed to current, above)
-
- Note: setting a new tool resets to the defaults: 'stable' and 'current'.
-
- 'version' is a valid version for the specified tool.
-
- Examples:
- add stable current version 2.6.19.2 to linux kernel:
- ${myname} --linux 2.6.19.2
-
- add experimental obsolete version 2.3.5 and stable current versions 2.6.1
- and 2.6.2 to glibc, add stable obsolete version 3.3.3 to gcc:
- ${myname} --glibc -x -o 2.3.5 -s -c 2.6.1 2.6.2 --gcc -o 3.3.3
-EOF
-}
-
-# Extract field $3 from version $1 with separator $2
-getVersionField() {
- local version="$1"
- local sep="$2"
- local field="$3"
-
- echo "${version}${sep}${sep}${sep}${sep}" |cut -d ${sep} -f ${field}
-}
-
-# Effectively add a version to the specified tool
-# $cat : tool category
-# $tool : tool name
-# $tool_prefix : tool directory prefix
-# $EXP : set to non empty if experimental, to empty otherwise
-# OBS : set to non empty if obsolete, to empty otherwise
-# $1 : version string to add
-addToolVersion() {
- local version="$1"
- local file="$2"
- local config_ver_option
- local exp_obs_prompt
- local deps v ver_M ver_m ver_p
- local SedExpr1 SedExpr2
-
- [ -f "${file}" ] || return 0
-
- v=$(echo "${version}" |"${sed}" -r -e 's/-/_/g; s/\./_/g;')
-
- config_ver_option="${cat}_V_${v}"
-
- # Check for existing version: it can be legitimitate for an end-user
- # to try adding a new version if the one he/she wants is not listed.
- # But it can be the case where the version is hidden behind either one
- # of EXPERIMENTAL or OBSOLETE, so warn if the version is already listed.
- if ${grep} -E "^config ${config_ver_option}$" "${file}" >/dev/null 2>&1; then
- echo "'${tool}': version '${version}' already present:"
- ${grep} -A1 -B0 -n \
- -E "^(config ${config_ver_option}| {4}prompt \"${version}\")$" \
- "${file}" /dev/null
- return 0
- fi
-
- SedExpr1="${SedExpr1}config ${config_ver_option}\n"
- SedExpr1="${SedExpr1} bool\n"
- SedExpr1="${SedExpr1} prompt \"${version}"
- case "${EXP},${OBS}" in
- ,) ;;
- ,*) exp_obs_prompt=" (OBSOLETE)"
- deps=" depends on OBSOLETE"
- ;;
- *,) exp_obs_prompt=" (EXPERIMENTAL)"
- deps=" depends on EXPERIMENTAL"
- ;;
- *) exp_obs_prompt=" (EXPERIMENTAL, OBSOLETE)"
- deps=" depends on EXPERIMENTAL \\&\\& OBSOLETE"
- ;;
- esac
- [ -n "${exp_obs_prompt}" ] && SedExpr1="${SedExpr1}${exp_obs_prompt}"
- SedExpr1="${SedExpr1}\""
- [ -n "${deps}" ] && SedExpr1="${SedExpr1}\n${deps}"
- case "${tool}" in
- gcc)
- # Extract 'M'ajor and 'm'inor from version string
- ver_M=$(getVersionField "${version}" . 1)
- ver_m=$(getVersionField "${version}" . 2)
- if [ ${ver_M} -ge 4 ] && [ ${ver_m} -ge 2 ]; then
- SedExpr1="${SedExpr1}\n select CC_GCC_${ver_M}_${ver_m}"
- fi
- ;;
- binutils)
- # Extract 'M'ajor, 'm'inor, sometimes 'p'atch from version string
- # TODO: Rework this
- ver_M=$(getVersionField "${version}" . 1)
- ver_m=$(getVersionField "${version}" . 2)
- ver_p=$(getVersionField "${version}" . 3)
- if [ ${ver_M} -eq 2 -a ${ver_m} -eq 27 ]; then
- SedExpr1="${SedExpr1}\n select BINUTILS_2_27_or_later"
- elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 26 ]; then
- SedExpr1="${SedExpr1}\n select BINUTILS_2_26_or_later"
- elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 25 -a ${ver_p} -eq 1 ]; then
- SedExpr1="${SedExpr1}\n select BINUTILS_2_25_1_or_later"
- elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 25 -a -z ${ver_p} ]; then
- SedExpr1="${SedExpr1}\n select BINUTILS_2_25_or_later"
- elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 24 ]; then
- SedExpr1="${SedExpr1}\n select BINUTILS_2_24_or_later"
- elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 23 -a ${ver_p} -eq 2 ]; then
- SedExpr1="${SedExpr1}\n select BINUTILS_2_23_2_or_later"
- fi
- ;;
- uClibc)
- # uClibc-0.9.33.2 needs some love
- ver_M=$(getVersionField "${version}" . 1)
- ver_m=$(getVersionField "${version}" . 2)
- ver_p=$(getVersionField "${version}" . 3)
- if [ ${ver_M} -eq 0 -a ${ver_m} -eq 9 -a ${ver_p} -eq 33 ]; then
- SedExpr1="${SedExpr1}\n select LIBC_UCLIBC_0_9_33_2_or_later"
- fi
- ;;
- uClibc-ng)
- # uClibc-ng-1.0.15 changed threading configuration, no longer compatible
- # with the rest of uClibc gang.
- ver_M=$(getVersionField "${version}" . 1)
- ver_m=$(getVersionField "${version}" . 2)
- ver_p=$(getVersionField "${version}" . 3)
- if [ ${ver_M} -eq 1 -a ${ver_m} -eq 0 -a ${ver_p} -eq 15 ]; then
- SedExpr1="${SedExpr1}\n select LIBC_UCLIBC_NG_1_0_15_or_later"
- fi
- ;;
- gdb)
- # gdb-7.0 and above have special handling
- ver_M=$(getVersionField "${version}" . 1)
- ver_m=$(getVersionField "${version}" . 2)
- if [ ${ver_M} -ge 7 ]; then
- if [ ${ver_m} -ge 2 ]; then
- SedExpr1="${SedExpr1}\n select GDB_7_2_or_later"
- else
- SedExpr1="${SedExpr1}\n select GDB_7_0_or_later"
- fi
- fi
- ;;
- esac
- SedExpr2=" default \"${version}\" if ${config_ver_option}"
- "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_BELOW)$/\1\n\n'"${SedExpr1}"'/;' "${file}"
- "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_STRING_BELOW)$/\1\n'"${SedExpr2}"'/;' "${file}"
-}
-
-cat=
-tool=
-tool_prefix=
-VERSION=
-EXP=
-OBS=
-
-if [ $# -eq 0 ]; then
- doHelp
- exit 1
-fi
-
-while [ $# -gt 0 ]; do
- case "$1" in
- # Tools:
- --gcc) EXP=; OBS=; cat=CC_GCC; tool=gcc; tool_prefix=cc; dot2suffix=;;
- --binutils) EXP=; OBS=; cat=BINUTILS; tool=binutils; tool_prefix=binutils; dot2suffix=;;
- --glibc) EXP=; OBS=; cat=LIBC_GLIBC; tool=glibc; tool_prefix=libc; dot2suffix=;;
- --uClibc) EXP=; OBS=; cat=LIBC_UCLIBC; tool=uClibc; tool_prefix=libc; dot2suffix=;;
- --uClibc-ng)EXP=; OBS=; cat=LIBC_UCLIBC_NG; tool=uClibc; tool_prefix=libc; dot2suffix=;;
- --newlib) EXP=; OBS=; cat=LIBC_NEWLIB; tool=newlib; tool_prefix=libc; dot2suffix=;;
- --mingw-w64)EXP=; OBS=; cat=WINAPI; tool=mingw; tool_prefix=libc; dot2suffix=;;
- --musl) EXP=; OBS=; cat=LIBC_MUSL; tool=musl; tool_prefix=libc; dot2suffix=;;
- --linux) EXP=; OBS=; cat=KERNEL; tool=linux; tool_prefix=kernel; dot2suffix=;;
- --gdb) EXP=; OBS=; cat=GDB; tool=gdb; tool_prefix=debug; dot2suffix=;;
- --duma) EXP=; OBS=; cat=DUMA; tool=duma; tool_prefix=debug; dot2suffix=;;
- --strace) EXP=; OBS=; cat=STRACE; tool=strace; tool_prefix=debug; dot2suffix=;;
- --ltrace) EXP=; OBS=; cat=LTRACE; tool=ltrace; tool_prefix=debug; dot2suffix=;;
- --gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=companion_libs; dot2suffix=;;
- --mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=companion_libs; dot2suffix=;;
- --isl) EXP=; OBS=; cat=ISL; tool=isl; tool_prefix=companion_libs; dot2suffix=;;
- --cloog) EXP=; OBS=; cat=CLOOG; tool=cloog; tool_prefix=companion_libs; dot2suffix=;;
- --mpc) EXP=; OBS=; cat=MPC; tool=mpc; tool_prefix=companion_libs; dot2suffix=;;
- --libelf) EXP=; OBS=; cat=LIBELF; tool=libelf; tool_prefix=companion_libs; dot2suffix=;;
- --expat) EXP=; OBS=; cat=EXPAT; tool=expat; tool_prefix=companion_libs; dot2suffix=;;
- --ncurses) EXP=; OBS=; cat=NCURSES; tool=ncurses; tool_prefix=companion_libs; dot2suffix=;;
- --gettext) EXP=; OBS=; cat=GETTEXT; tool=gettext; tool_prefix=companion_libs; dot2suffix=;;
- --libiconv) EXP=; OBS=; cat=LIBICONV; tool=libiconv; tool_prefix=companion_libs; dot2suffix=;;
- --zlib) EXP=; OBS=; cat=ZLIB; tool=zlib; tool_prefix=companion_tools; dot2suffix=;;
- --make) EXP=; OBS=; cat=MAKE; tool=make; tool_prefix=companion_tools; dot2suffix=;;
- --m4) EXP=; OBS=; cat=M4; tool=m4; tool_prefix=companion_tools; dot2suffix=;;
- --autoconf) EXP=; OBS=; cat=AUTOCONF; tool=autoconf; tool_prefix=companion_tools; dot2suffix=;;
- --automake) EXP=; OBS=; cat=AUTOMAKE; tool=automake; tool_prefix=companion_tools; dot2suffix=;;
- --libtool) EXP=; OBS=; cat=LIBTOOL; tool=libtool; tool_prefix=companion_tools; dot2suffix=;;
-
- # Tools options:
- -x|--experimental|+s) EXP=1;;
- -s|--stable|+x) EXP=;;
- -o|--obsolete|+c) OBS=1;;
- -c|--current|+o) OBS=;;
-
- # Misc:
- -h|--help) doHelp; exit 0;;
- -*) echo "Unknown option: '$1' (use -h/--help for help)."; exit 1;;
-
- # Version string:
- *) [ -n "${tool}" ] || { doHelp; exit 1; }
- file_base="config/${tool_prefix}/${tool}.in"
- addToolVersion "$1" "${file_base}${dot2suffix}"
- ;;
- esac
- shift
-done
diff --git a/maintainer/gen-kconfig.sh b/maintainer/gen-kconfig.sh
deleted file mode 100755
index 364844d..0000000
--- a/maintainer/gen-kconfig.sh
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/bin/bash
-
-set -e
-
-# Accept overrides from command line if needed
-sed=${SED:-sed}
-grep=${GREP:-grep}
-
-# Generate either a choice or a menuconfig with the specified entries.
-#
-# Usage:
-# generate a choice:
-# gen_choice <out-file> <label> <config-prefix> <base-dir>
-#
-# generate a menuconfig:
-# gen_menu <out-file> <label> <config-prefix> <base-dir>
-#
-# where:
-# out-file
-# put the generated choice/menuconfig into that file
-# for choices, it acts as the base bname of the file, the secondary
-# parts (the .in.2) are put in out-file.2
-#
-# label
-# name for the entries family
-# eg. Architecture, Kernel...
-#
-# config-prefix
-# prefix for the choice entries
-# eg. ARCH, KERNEL...
-#
-# base-dir
-# base directory containing config files
-# eg. config/arch, config/kernel...
-#
-
-# Helper: find the base names of all *.in files in a given directory
-get_components() {
- local dir="${1}"
- local f b
-
- for f in ${dir}/*.in; do
- b=${f#${dir}/}
- echo ${b%.in}
- done
-}
-
-# Generate a choice
-# See above for usage
-gen_choice() {
- local out_file="${1}"
- local label="${2}"
- local cfg_prefix="${3}"
- local base_dir="${4}"
- local file entry _entry
-
- # Generate the part-1
- exec >"${out_file}"
- printf '# %s menu\n' "${label}"
- printf '# Generated file, do not edit!!!\n'
- printf '\n'
- printf 'choice GEN_CHOICE_%s\n' "${cfg_prefix}"
- printf ' bool\n'
- printf ' prompt "%s"\n' "${label}"
- printf '\n'
- for entry in `get_components ${base_dir}`; do
- file="${base_dir}/${entry}.in"
- _entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;')
- printf 'config %s_%s\n' "${cfg_prefix}" "${_entry}"
- printf ' bool\n'
- printf ' prompt "%s"\n' "${entry}"
- "${sed}" -r -e '/^## depends on /!d; s/^## / /;' ${file} 2>/dev/null
- "${sed}" -r -e '/^## select /!d; s/^## / /;' ${file} 2>/dev/null
- if "${grep}" -E '^## help' ${file} >/dev/null 2>&1; then
- printf ' help\n'
- "${sed}" -r -e '/^## help ?/!d; s/^## help ?/ /;' ${file} 2>/dev/null
- fi
- printf '\n'
- done
- printf 'endchoice\n'
-
- printf '\n'
- printf 'config %s\n' "${cfg_prefix}"
- for entry in `get_components ${base_dir}`; do
- file="${base_dir}/${entry}.in"
- _entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;')
- printf ' default "%s" if %s_%s\n' "${entry}" "${cfg_prefix}" "${_entry}"
- done
-
- printf '\n'
- for entry in `get_components ${base_dir}`; do
- file="${base_dir}/${entry}.in"
- _entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;')
- printf 'if %s_%s\n' "${cfg_prefix}" "${_entry}"
- printf 'source "%s"\n' "${file}"
- printf 'endif\n'
- done
-
- # Generate the part-2
- exec >"${out_file}.2"
- printf '# %s second part options\n' "${label}"
- printf '# Generated file, do not edit!!!\n'
- for entry in `get_components ${base_dir}`; do
- file="${base_dir}/${entry}.in"
- _entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;')
- if [ -f "${file}.2" ]; then
- printf '\n'
- printf 'if %s_%s\n' "${cfg_prefix}" "${_entry}"
- printf 'comment "%s other options"\n' "${entry}"
- printf 'source "%s.2"\n' "${file}"
- printf 'endif\n'
- fi
- done
-}
-
-# Generate a menuconfig
-# See above for usage
-gen_menu() {
- local out_file="${1}"
- local label="${2}"
- local cfg_prefix="${3}"
- local base_dir="${4}"
- local file entry _entry
-
- # Generate the menuconfig
- exec >"${out_file}"
- printf '# %s menu\n' "${label}"
- printf '# Generated file, do not edit!!!\n'
- printf '\n'
- for entry in `get_components ${base_dir}`; do
- file="${base_dir}/${entry}.in"
- _entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;')
- printf 'menuconfig %s_%s\n' "${cfg_prefix}" "${_entry}"
- printf ' bool\n'
- if "${grep}" -E '^## default' ${file} >/dev/null 2>&1; then
- "${sed}" -r -e '/^## default ?/!d; s/^## default ?/ default /;' ${file} 2>/dev/null
- fi
- printf ' prompt "%s"\n' "${entry}"
- "${sed}" -r -e '/^## depends on /!d; s/^## / /;' ${file} 2>/dev/null
- "${sed}" -r -e '/^## select /!d; s/^## / /;' ${file} 2>/dev/null
- if "${grep}" -E '^## help' ${file} >/dev/null 2>&1; then
- printf ' help\n'
- "${sed}" -r -e '/^## help ?/!d; s/^## help ?/ /;' ${file} 2>/dev/null
- fi
- printf '\n'
- printf 'if %s_%s\n' "${cfg_prefix}" "${_entry}"
- printf 'source "%s"\n' "${file}"
- printf 'endif\n'
- printf '\n'
- done
-}
-
-mkdir -p config/gen
-gen_choice config/gen/arch.in "Target Architecture" "ARCH" "config/arch"
-gen_choice config/gen/kernel.in "Target OS" "KERNEL" "config/kernel"
-gen_choice config/gen/cc.in "Compiler" "CC" "config/cc"
-gen_choice config/gen/binutils.in "Binutils" "BINUTILS" "config/binutils"
-gen_choice config/gen/libc.in "C library" "LIBC" "config/libc"
-gen_menu config/gen/debug.in "Debug facilities" "DEBUG" "config/debug"
-gen_menu config/gen/companion_tools.in "Companion tools" "COMP_TOOLS" "config/companion_tools"
diff --git a/maintainer/kconfig-choice.template b/maintainer/kconfig-choice.template
new file mode 100644
index 0000000..b2ca217
--- /dev/null
+++ b/maintainer/kconfig-choice.template
@@ -0,0 +1,32 @@
+#
+# DO NOT EDIT! This file is automatically generated.
+#
+
+choice GEN_CHOICE_@@dir|@@
+ bool "@@label@@"
+
+#!foreach choice
+config @@dir|@@_@@choice|@@
+ bool "@@choice@@"
+#!foreach dependency
+ @@depline@@
+#!end-foreach
+ help
+#!foreach help
+ @@helpline@@
+#!end-foreach
+
+#!end-foreach
+endchoice
+
+config @@dir|@@
+ string
+#!foreach choice
+ default "@@choice@@" if @@dir|@@_@@choice|@@
+#!end-foreach
+
+#!foreach choice
+if @@dir|@@_@@choice|@@
+source "config/@@dir@@/@@choice@@.in"
+endif
+#!end-foreach
diff --git a/maintainer/kconfig-menu.template b/maintainer/kconfig-menu.template
new file mode 100644
index 0000000..1a7daa5
--- /dev/null
+++ b/maintainer/kconfig-menu.template
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT! This file is automatically generated.
+#
+
+#!foreach choice
+menuconfig @@dir|@@_@@choice|@@
+ bool "@@choice@@"
+#!foreach dependency
+ @@depline@@
+#!end-foreach
+ help
+#!foreach help
+ @@helpline@@
+#!end-foreach
+
+if @@dir|@@_@@choice|@@
+source "config/@@dir@@/@@choice@@.in"
+endif
+
+#!end-foreach
diff --git a/maintainer/kconfig-versions.template b/maintainer/kconfig-versions.template
new file mode 100644
index 0000000..0e0ceb0
--- /dev/null
+++ b/maintainer/kconfig-versions.template
@@ -0,0 +1,301 @@
+#
+# DO NOT EDIT! This file is automatically generated.
+#
+
+# The component directory name
+config @@master|@@_DIR_NAME
+ string
+ default "@@master@@"
+
+#!if [ "@@nforks@@" -ge 2 ]
+
+choice
+ bool "Show @@master@@ versions from"
+
+#!foreach fork
+config @@master|@@_USE_@@origin|@@
+ bool "@@origin@@"
+#!if [ -n "@@only_obsolete@@" ]
+ depends on OBSOLETE
+#!end-if
+#!if [ -n "@@only_experimental@@" ]
+ depends on EXPERIMENTAL
+#!end-if
+ help
+@@originhelp@@
+
+#!end-foreach
+endchoice
+
+config @@master|@@_USE
+ string
+#!foreach fork
+ default "@@fork|@@" if @@master|@@_USE_@@origin|@@
+#!end-foreach
+
+#!end-if
+
+#!foreach fork
+#!if [ "@@nforks@@" -ge 2 ]
+if @@master|@@_USE_@@origin|@@
+#!end-if
+
+config @@fork|@@_PKG_NAME
+ string
+ default "@@pkg_name@@"
+
+#!// If a project makes official releases, using "bleeding edge"
+#!// from a development repository is experimental. However, there
+#!// are projects that consider its HEAD a "rolling release". For
+#!// those, checking out from a repository is the regular method.
+choice
+ bool "Source of @@pkg_label@@"
+
+#!if [ "@@#version@@" -gt 0 ]
+config @@fork|@@_SRC_RELEASE
+ bool "Released tarball"
+ help
+ Download a released tarball.
+
+#!end-if
+config @@fork|@@_SRC_DEVEL
+ bool "Vendor/custom repository"
+#!if [ "@@#version@@" -gt 0 ]
+ depends on EXPERIMENTAL
+#!end-if
+ help
+ Check out from a repository.
+#!if [ -n "@@repository@@" ]
+ Default is the vendor repository at @@repository_url@@
+#!end-if
+
+if @@fork|@@_SRC_DEVEL
+
+choice
+ bool "VCS type"
+#!if [ -n "@@repository@@" ]
+ 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 @@fork|@@_DEVEL_VCS_git
+ bool "Git"
+
+config @@fork|@@_DEVEL_VCS_svn
+ bool "Subversion"
+
+config @@fork|@@_DEVEL_VCS_hg
+ bool "Mercurial"
+
+config @@fork|@@_DEVEL_VCS_cvs
+ bool "CVS"
+
+endchoice
+
+config @@fork|@@_DEVEL_VCS
+ string
+ 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 @@fork|@@_DEVEL_URL
+ string "Repository URL"
+#!if [ -n "@@repository@@" ]
+ default "@@repository_url@@"
+#!end-if
+ help
+ Repository URL.
+
+ For CVS, enter both the value of CVS root and the module name, separated
+ by a space.
+
+config @@fork|@@_DEVEL_BRANCH
+ string "Branch/tag to check out"
+ default "@@repository_branch@@"
+ help
+ Git/CVS: branch/tag to be checked out
+ Subversion: directories to append to the repository URL (i.e. branch or tag)
+ Mercurial: official guide recommends using separate repositories to maintain
+ stable branches. You likely need to change the repository URL, rather than
+ enter anything here.
+
+config @@fork|@@_DEVEL_REVISION
+ string "Revision/changeset"
+ default "@@repository_cset@@"
+ help
+ Commit ID or revision ID to check out.
+ Git: enter the commit ID to check out a commit.
+ CVS: enter the date in "YYYY/MM/DD HH:MM:SS" format (UTC) to check out certain date.
+ Subversion: enter the revision.
+
+config @@fork|@@_DEVEL_SUBDIR
+ string "Subdirectory in the repository"
+ default "@@repository_subdir@@"
+ help
+ Some projects produce releases not from the top-level directory in the
+ repository, but rather from some subdirectory. If it is the case,
+ specify this subdirectory here.
+
+config @@fork|@@_DEVEL_BOOTSTRAP
+ string "Bootstrap command"
+ default "@@bootstrap@@"
+ help
+ Command to run after checking out. Some projects don't store the generated
+ files like configure script in the repository; building out of a checked out
+ working copy thus requires some extra steps. Separate multiple shell commands
+ with &&.
+
+endif
+
+config @@fork|@@_SRC_CUSTOM
+ bool "Custom location"
+ depends on EXPERIMENTAL
+ help
+ Custom directory or tarball.
+
+if @@fork|@@_SRC_CUSTOM
+
+config @@fork|@@_CUSTOM_LOCATION
+ string "Custom source location"
+ help
+ Path to the directory or tarball with the sources.
+
+endif
+
+endchoice
+
+#!// 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
+#!// selecting FOO_5_or_later and so on) so that we can handle the cases
+#!// 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 [ "@@#version@@" -gt 0 -a -z "@@versionlocked@@" ]
+choice
+ bool "Version of @@pkg_label@@"
+ help
+ For a released version, select the version of @@pkg_label@@ to download
+ and build. For sources out of the vendor repository or from a custom
+ location, select the version that describes those custom sources.
+ Based on this version, crosstool-NG may apply some version-specific
+ quirks while building @@pkg_label@@.
+
+config @@fork|@@_VERY_NEW
+ bool "newer than anything below"
+ depends on EXPERIMENTAL
+ depends on @@fork|@@_SRC_DEVEL || @@fork|@@_SRC_CUSTOM
+#!foreach milestone
+ select @@master|@@_@@ms|@@_or_later
+ depends on !@@master|@@_REQUIRE_@@ms|@@_or_older
+#!end-foreach
+
+#!foreach version
+config @@fork|@@_V_@@ver_sel|@@
+ bool "@@ver@@@@obsolete? (OBSOLETE)@@@@experimental? (EXPERIMENTAL)@@"
+#!if [ "@@obsolete@@" = "yes" ]
+ depends on OBSOLETE
+#!end-if
+#!if [ "@@experimental@@" = "yes" ]
+ depends on EXPERIMENTAL
+#!end-if
+#!foreach milestone
+#!if [ "@@version_cmp_milestone@@" -ge 0 ]
+ select @@master|@@_@@ms|@@_or_later
+#!end-if
+#!if [ "@@version_cmp_milestone@@" -le 0 ]
+ select @@master|@@_@@ms|@@_or_older
+#!end-if
+#!if [ "@@version_cmp_milestone@@" -gt 0 ]
+ depends on !@@master|@@_REQUIRE_@@ms|@@_or_older
+#!end-if
+#!if [ "@@version_cmp_milestone@@" -lt 0 ]
+ depends on !@@master|@@_REQUIRE_@@ms|@@_or_later
+#!end-if
+#!end-foreach
+
+#!end-foreach
+config @@fork|@@_VERY_OLD
+ bool "older than anything above"
+ depends on OBSOLETE && EXPERIMENTAL
+ depends on @@fork|@@_SRC_DEVEL || @@fork|@@_SRC_CUSTOM
+#!foreach milestone
+ depends on !@@master|@@_REQUIRE_@@ms|@@_or_later
+#!end-foreach
+
+endchoice
+#!end-if
+
+#!if [ -n "@@versionlocked@@" ]
+#!foreach version
+config @@fork|@@_V_@@ver_sel|@@
+ def_bool y
+ depends on @@versionlocked|@@_V_@@ver_sel|@@
+
+#!end-foreach
+#!end-if
+
+config @@fork|@@_VERSION
+ string
+#!foreach version
+ 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
+
+#!end-foreach
+
+#!foreach milestone
+#!// Milestones selected by a chosen version of this package
+config @@master|@@_@@ms|@@_or_later
+ bool
+
+config @@master|@@_@@ms|@@_or_older
+ bool
+
+#!// Milestone requirements selected by other packages that restrict
+#!// the choices in this package
+config @@master|@@_REQUIRE_@@ms|@@_or_later
+ bool
+
+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..42aaad7
--- /dev/null
+++ b/maintainer/test-packages.sh
@@ -0,0 +1,196 @@
+#!/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
+}
+
+[ -r .config ] && mv .config .config-saved
+. maintainer/package-versions
+[ -r .config-saved ] && mv .config-saved .config
+
+rm -rf ${CT_TARBALLS_DIR} ${CT_COMMON_SRC_DIR}
diff --git a/packages/GNU.help b/packages/GNU.help
new file mode 100644
index 0000000..ae6ba14
--- /dev/null
+++ b/packages/GNU.help
@@ -0,0 +1,6 @@
+GNU (which is a recursive acronym for "GNU's Not Unix") provides GNU binutils,
+GNU C Compiler (gcc), GNU debugger (gdb) and many other utilities. GNU is
+considered the master source for these packages.
+
+You should select "GNU" here unless you definitely know that you need some version
+from another source.
diff --git a/packages/Linaro.help b/packages/Linaro.help
new file mode 100644
index 0000000..f752543
--- /dev/null
+++ b/packages/Linaro.help
@@ -0,0 +1,4 @@
+Linaro is maintaining some advanced/more stable/experimental versions
+of binutils, gcc, glibc and gdb, especially for the ARM architecture.
+These versions contain some changes that are not (yet?) merged into
+their respective upstream repositories.
diff --git a/packages/android-ndk/package.desc b/packages/android-ndk/package.desc
new file mode 100644
index 0000000..5be8222
--- /dev/null
+++ b/packages/android-ndk/package.desc
@@ -0,0 +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/android-ndk/r10e/version.desc b/packages/android-ndk/r10e/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/android-ndk/r10e/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/android-ndk/r11c/version.desc b/packages/android-ndk/r11c/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/android-ndk/r11c/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/android-ndk/r12b/version.desc b/packages/android-ndk/r12b/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/android-ndk/r12b/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/android-ndk/r13b/version.desc b/packages/android-ndk/r13b/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/android-ndk/r13b/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/android-ndk/r14b/version.desc b/packages/android-ndk/r14b/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/android-ndk/r14b/version.desc
diff --git a/packages/android-ndk/r15c/version.desc b/packages/android-ndk/r15c/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/android-ndk/r15c/version.desc
diff --git a/packages/autoconf/2.65/version.desc b/packages/autoconf/2.65/version.desc
new file mode 100644
index 0000000..6d5245d
--- /dev/null
+++ b/packages/autoconf/2.65/version.desc
@@ -0,0 +1 @@
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/autoconf/2.69/version.desc b/packages/autoconf/2.69/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/autoconf/2.69/version.desc
diff --git a/packages/autoconf/package.desc b/packages/autoconf/package.desc
new file mode 100644
index 0000000..af39172
--- /dev/null
+++ b/packages/autoconf/package.desc
@@ -0,0 +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/autoconf/version.desc b/packages/autoconf/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/autoconf/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/automake/1.11.6/version.desc b/packages/automake/1.11.6/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/automake/1.11.6/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/automake/1.14.1/version.desc b/packages/automake/1.14.1/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/automake/1.14.1/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/automake/1.15.1/version.desc b/packages/automake/1.15.1/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/automake/1.15.1/version.desc
diff --git a/packages/automake/package.desc b/packages/automake/package.desc
new file mode 100644
index 0000000..a624d49
--- /dev/null
+++ b/packages/automake/package.desc
@@ -0,0 +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.1/version.desc b/packages/avr-libc/1.8.1/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/avr-libc/1.8.1/version.desc
diff --git a/packages/avr-libc/2.0.0/version.desc b/packages/avr-libc/2.0.0/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/avr-libc/2.0.0/version.desc
diff --git a/packages/avr-libc/package.desc b/packages/avr-libc/package.desc
new file mode 100644
index 0000000..9161c74
--- /dev/null
+++ b/packages/avr-libc/package.desc
@@ -0,0 +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
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/binutils-linaro/2.23.2-2013.10-4/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/binutils-linaro/2.24.0-2014.11-2/version.desc b/packages/binutils-linaro/2.24.0-2014.11-2/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/binutils-linaro/2.24.0-2014.11-2/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/binutils-linaro/2.25.0-2015.01-2/version.desc b/packages/binutils-linaro/2.25.0-2015.01-2/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/binutils-linaro/2.25.0-2015.01-2/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/binutils-linaro/package.desc b/packages/binutils-linaro/package.desc
new file mode 100644
index 0000000..eb994a7
--- /dev/null
+++ b/packages/binutils-linaro/package.desc
@@ -0,0 +1,6 @@
+master='binutils'
+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/patches/binutils/2.23.2/120-sh-conf.patch b/packages/binutils/2.23.2/120-sh-conf.patch
index ea3d1b6..ea3d1b6 100644
--- a/patches/binutils/2.23.2/120-sh-conf.patch
+++ b/packages/binutils/2.23.2/120-sh-conf.patch
diff --git a/patches/binutils/2.23.2/300-001_ld_makefile_patch.patch b/packages/binutils/2.23.2/300-001_ld_makefile_patch.patch
index 5cb0f61..5cb0f61 100644
--- a/patches/binutils/2.23.2/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.23.2/300-001_ld_makefile_patch.patch
diff --git a/patches/binutils/2.23.2/300-012_check_ldrunpath_length.patch b/packages/binutils/2.23.2/300-012_check_ldrunpath_length.patch
index df78310..df78310 100644
--- a/patches/binutils/2.23.2/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.23.2/300-012_check_ldrunpath_length.patch
diff --git a/patches/binutils/2.26/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.23.2/310-fix-gold-pthreads-typo.patch
index f2e6ff2..f2e6ff2 100644
--- a/patches/binutils/2.26/310-fix-gold-pthreads-typo.patch
+++ b/packages/binutils/2.23.2/310-fix-gold-pthreads-typo.patch
diff --git a/patches/binutils/2.26/500-sysroot.patch b/packages/binutils/2.23.2/500-sysroot.patch
index e49c795..e49c795 100644
--- a/patches/binutils/2.26/500-sysroot.patch
+++ b/packages/binutils/2.23.2/500-sysroot.patch
diff --git a/patches/binutils/2.23.2/600-poison-system-directories.patch b/packages/binutils/2.23.2/600-poison-system-directories.patch
index 780e48e..780e48e 100644
--- a/patches/binutils/2.23.2/600-poison-system-directories.patch
+++ b/packages/binutils/2.23.2/600-poison-system-directories.patch
diff --git a/patches/binutils/2.24/900-xtensa-trampolines.patch b/packages/binutils/2.23.2/900-xtensa-trampolines.patch
index b5b934f..b5b934f 100644
--- a/patches/binutils/2.24/900-xtensa-trampolines.patch
+++ b/packages/binutils/2.23.2/900-xtensa-trampolines.patch
diff --git a/patches/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch b/packages/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch
index e1c2d85..e1c2d85 100644
--- a/patches/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch
+++ b/packages/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch
diff --git a/patches/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch b/packages/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch
index ba24f4e..ba24f4e 100644
--- a/patches/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch
+++ b/packages/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch
diff --git a/patches/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch b/packages/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
index 6a0846e..6a0846e 100644
--- a/patches/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
+++ b/packages/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
diff --git a/patches/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch b/packages/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
index dba7620..dba7620 100644
--- a/patches/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
+++ b/packages/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
diff --git a/patches/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch b/packages/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch
index 8aeb064..8aeb064 100644
--- a/patches/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch
+++ b/packages/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch
diff --git a/patches/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/packages/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
index 9ad6b3b..9ad6b3b 100644
--- a/patches/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
+++ b/packages/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
diff --git a/patches/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/packages/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
index 4a3de2c..4a3de2c 100644
--- a/patches/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
+++ b/packages/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
diff --git a/patches/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch
index 2955e11..2955e11 100644
--- a/patches/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch
+++ b/packages/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch
diff --git a/patches/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch
index 62bc4b5..62bc4b5 100644
--- a/patches/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch
+++ b/packages/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch
diff --git a/packages/binutils/2.23.2/version.desc b/packages/binutils/2.23.2/version.desc
new file mode 100644
index 0000000..f26b5a2
--- /dev/null
+++ b/packages/binutils/2.23.2/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/patches/binutils/2.24/001-fix-enable-install-libiberty-flag.patch b/packages/binutils/2.24/001-fix-enable-install-libiberty-flag.patch
index e408401..e408401 100644
--- a/patches/binutils/2.24/001-fix-enable-install-libiberty-flag.patch
+++ b/packages/binutils/2.24/001-fix-enable-install-libiberty-flag.patch
diff --git a/patches/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch b/packages/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch
index 7881646..7881646 100644
--- a/patches/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch
+++ b/packages/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch
diff --git a/patches/binutils/2.24/120-sh-conf.patch b/packages/binutils/2.24/120-sh-conf.patch
index d5913e8..d5913e8 100644
--- a/patches/binutils/2.24/120-sh-conf.patch
+++ b/packages/binutils/2.24/120-sh-conf.patch
diff --git a/patches/binutils/2.24/300-001_ld_makefile_patch.patch b/packages/binutils/2.24/300-001_ld_makefile_patch.patch
index 4b5888a..4b5888a 100644
--- a/patches/binutils/2.24/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.24/300-001_ld_makefile_patch.patch
diff --git a/patches/binutils/2.24/300-012_check_ldrunpath_length.patch b/packages/binutils/2.24/300-012_check_ldrunpath_length.patch
index b49cc04..b49cc04 100644
--- a/patches/binutils/2.24/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.24/300-012_check_ldrunpath_length.patch
diff --git a/patches/binutils/2.25.1/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.24/310-fix-gold-pthreads-typo.patch
index f2e6ff2..f2e6ff2 100644
--- a/patches/binutils/2.25.1/310-fix-gold-pthreads-typo.patch
+++ b/packages/binutils/2.24/310-fix-gold-pthreads-typo.patch
diff --git a/patches/binutils/2.25.1/500-sysroot.patch b/packages/binutils/2.24/500-sysroot.patch
index e49c795..e49c795 100644
--- a/patches/binutils/2.25.1/500-sysroot.patch
+++ b/packages/binutils/2.24/500-sysroot.patch
diff --git a/patches/binutils/2.24/600-poison-system-directories.patch b/packages/binutils/2.24/600-poison-system-directories.patch
index 6a3bf6b..6a3bf6b 100644
--- a/patches/binutils/2.24/600-poison-system-directories.patch
+++ b/packages/binutils/2.24/600-poison-system-directories.patch
diff --git a/patches/binutils/2.28/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch
index cea92f3..cea92f3 100644
--- a/patches/binutils/2.28/700-Fix-library-paths-on-PowerPC.patch
+++ b/packages/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch
diff --git a/patches/binutils/2.23.2/900-xtensa-trampolines.patch b/packages/binutils/2.24/900-xtensa-trampolines.patch
index b5b934f..b5b934f 100644
--- a/patches/binutils/2.23.2/900-xtensa-trampolines.patch
+++ b/packages/binutils/2.24/900-xtensa-trampolines.patch
diff --git a/patches/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch b/packages/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch
index e1c2d85..e1c2d85 100644
--- a/patches/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch
+++ b/packages/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch
diff --git a/patches/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch b/packages/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch
index ba24f4e..ba24f4e 100644
--- a/patches/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch
+++ b/packages/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch
diff --git a/patches/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch b/packages/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
index 6a0846e..6a0846e 100644
--- a/patches/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
+++ b/packages/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
diff --git a/patches/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch b/packages/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
index e4c600e..e4c600e 100644
--- a/patches/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
+++ b/packages/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch
diff --git a/patches/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch b/packages/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch
index 8aeb064..8aeb064 100644
--- a/patches/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch
+++ b/packages/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch
diff --git a/patches/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch b/packages/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch
index 8a21100..8a21100 100644
--- a/patches/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch
+++ b/packages/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch
diff --git a/patches/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch b/packages/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch
index 9df8065..9df8065 100644
--- a/patches/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch
+++ b/packages/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch
diff --git a/patches/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch b/packages/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch
index 96d526f..96d526f 100644
--- a/patches/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch
+++ b/packages/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch
diff --git a/patches/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch b/packages/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch
index 3090cc2..3090cc2 100644
--- a/patches/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch
+++ b/packages/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch
diff --git a/patches/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch b/packages/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch
index 043ff4d..043ff4d 100644
--- a/patches/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch
+++ b/packages/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch
diff --git a/patches/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/packages/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
index 9ad6b3b..9ad6b3b 100644
--- a/patches/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
+++ b/packages/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
diff --git a/patches/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/packages/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
index 4a3de2c..4a3de2c 100644
--- a/patches/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
+++ b/packages/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
diff --git a/patches/binutils/2.24/913-xtensa-add-auto-litpools-option.patch b/packages/binutils/2.24/913-xtensa-add-auto-litpools-option.patch
index f0199e1..f0199e1 100644
--- a/patches/binutils/2.24/913-xtensa-add-auto-litpools-option.patch
+++ b/packages/binutils/2.24/913-xtensa-add-auto-litpools-option.patch
diff --git a/patches/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch
index 2955e11..2955e11 100644
--- a/patches/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch
+++ b/packages/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch
diff --git a/patches/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch
index 656373f..656373f 100644
--- a/patches/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch
+++ b/packages/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch
diff --git a/packages/binutils/2.24/version.desc b/packages/binutils/2.24/version.desc
new file mode 100644
index 0000000..f26b5a2
--- /dev/null
+++ b/packages/binutils/2.24/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/patches/binutils/2.28/120-sh-conf.patch b/packages/binutils/2.25.1/120-sh-conf.patch
index c12a023..c12a023 100644
--- a/patches/binutils/2.28/120-sh-conf.patch
+++ b/packages/binutils/2.25.1/120-sh-conf.patch
diff --git a/patches/binutils/2.28/300-001_ld_makefile_patch.patch b/packages/binutils/2.25.1/300-001_ld_makefile_patch.patch
index 2a1320c..2a1320c 100644
--- a/patches/binutils/2.28/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.25.1/300-001_ld_makefile_patch.patch
diff --git a/patches/binutils/2.28/300-012_check_ldrunpath_length.patch b/packages/binutils/2.25.1/300-012_check_ldrunpath_length.patch
index f1f31af..f1f31af 100644
--- a/patches/binutils/2.28/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.25.1/300-012_check_ldrunpath_length.patch
diff --git a/patches/binutils/2.24/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.25.1/310-fix-gold-pthreads-typo.patch
index f2e6ff2..f2e6ff2 100644
--- a/patches/binutils/2.24/310-fix-gold-pthreads-typo.patch
+++ b/packages/binutils/2.25.1/310-fix-gold-pthreads-typo.patch
diff --git a/patches/binutils/2.26/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
index f9a8af6..f9a8af6 100644
--- a/patches/binutils/2.26/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
+++ b/packages/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
diff --git a/patches/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
index af4032a..af4032a 100644
--- a/patches/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
+++ b/packages/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
diff --git a/patches/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
index 33441cc..33441cc 100644
--- a/patches/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
+++ b/packages/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
diff --git a/patches/binutils/2.28/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.25.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
index 6168b31..6168b31 100644
--- a/patches/binutils/2.28/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
+++ b/packages/binutils/2.25.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
diff --git a/patches/binutils/2.25.1/400-arm-rotate_left-fix.patch b/packages/binutils/2.25.1/400-arm-rotate_left-fix.patch
index 4149597..4149597 100644
--- a/patches/binutils/2.25.1/400-arm-rotate_left-fix.patch
+++ b/packages/binutils/2.25.1/400-arm-rotate_left-fix.patch
diff --git a/patches/binutils/2.24/500-sysroot.patch b/packages/binutils/2.25.1/500-sysroot.patch
index e49c795..e49c795 100644
--- a/patches/binutils/2.24/500-sysroot.patch
+++ b/packages/binutils/2.25.1/500-sysroot.patch
diff --git a/patches/binutils/2.25.1/600-poison-system-directories.patch b/packages/binutils/2.25.1/600-poison-system-directories.patch
index ec3622b..ec3622b 100644
--- a/patches/binutils/2.25.1/600-poison-system-directories.patch
+++ b/packages/binutils/2.25.1/600-poison-system-directories.patch
diff --git a/patches/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch
index cea92f3..cea92f3 100644
--- a/patches/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch
+++ b/packages/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch
diff --git a/patches/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch b/packages/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch
index 8aeb064..8aeb064 100644
--- a/patches/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch
+++ b/packages/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch
diff --git a/patches/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch b/packages/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch
index 8a21100..8a21100 100644
--- a/patches/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch
+++ b/packages/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch
diff --git a/patches/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch b/packages/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch
index 9df8065..9df8065 100644
--- a/patches/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch
+++ b/packages/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch
diff --git a/patches/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch b/packages/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch
index 96d526f..96d526f 100644
--- a/patches/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch
+++ b/packages/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch
diff --git a/patches/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch b/packages/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch
index 3090cc2..3090cc2 100644
--- a/patches/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch
+++ b/packages/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch
diff --git a/patches/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch b/packages/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch
index 043ff4d..043ff4d 100644
--- a/patches/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch
+++ b/packages/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch
diff --git a/patches/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/packages/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
index 9ad6b3b..9ad6b3b 100644
--- a/patches/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
+++ b/packages/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch
diff --git a/patches/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/packages/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
index 4a3de2c..4a3de2c 100644
--- a/patches/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
+++ b/packages/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch
diff --git a/patches/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch b/packages/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch
index 3ed9af1..3ed9af1 100644
--- a/patches/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch
+++ b/packages/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch
diff --git a/patches/binutils/2.26/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch
index 66d4e60..66d4e60 100644
--- a/patches/binutils/2.26/914-xtensa-fix-signedness-of-gas-relocations.patch
+++ b/packages/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch
diff --git a/patches/binutils/2.26/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch
index ead3e42..ead3e42 100644
--- a/patches/binutils/2.26/915-xtensa-fix-.init-.fini-literals-moving.patch
+++ b/packages/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch
diff --git a/packages/binutils/2.25.1/version.desc b/packages/binutils/2.25.1/version.desc
new file mode 100644
index 0000000..f26b5a2
--- /dev/null
+++ b/packages/binutils/2.25.1/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/patches/binutils/2.27/120-sh-conf.patch b/packages/binutils/2.26.1/120-sh-conf.patch
index c12a023..c12a023 100644
--- a/patches/binutils/2.27/120-sh-conf.patch
+++ b/packages/binutils/2.26.1/120-sh-conf.patch
diff --git a/patches/binutils/2.27/300-001_ld_makefile_patch.patch b/packages/binutils/2.26.1/300-001_ld_makefile_patch.patch
index 2a1320c..2a1320c 100644
--- a/patches/binutils/2.27/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.26.1/300-001_ld_makefile_patch.patch
diff --git a/patches/binutils/2.27/300-012_check_ldrunpath_length.patch b/packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch
index f1f31af..f1f31af 100644
--- a/patches/binutils/2.27/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch
diff --git a/patches/binutils/2.23.2/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch
index f2e6ff2..f2e6ff2 100644
--- a/patches/binutils/2.23.2/310-fix-gold-pthreads-typo.patch
+++ b/packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch
diff --git a/patches/binutils/2.25.1/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/patches/binutils/2.25.1/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/patches/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/patches/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/patches/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/patches/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/patches/binutils/2.27/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/patches/binutils/2.27/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/patches/binutils/2.23.2/500-sysroot.patch b/packages/binutils/2.26.1/500-sysroot.patch
index e49c795..e49c795 100644
--- a/patches/binutils/2.23.2/500-sysroot.patch
+++ b/packages/binutils/2.26.1/500-sysroot.patch
diff --git a/patches/binutils/2.26/600-poison-system-directories.patch b/packages/binutils/2.26.1/600-poison-system-directories.patch
index aa04082..aa04082 100644
--- a/patches/binutils/2.26/600-poison-system-directories.patch
+++ b/packages/binutils/2.26.1/600-poison-system-directories.patch
diff --git a/patches/binutils/2.26/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/patches/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch
+++ b/packages/binutils/2.26.1/700-Fix-library-paths-on-PowerPC.patch
diff --git a/patches/binutils/2.25.1/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/patches/binutils/2.25.1/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/patches/binutils/2.25.1/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/patches/binutils/2.25.1/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/patches/binutils/2.27/100-missing-break.patch b/packages/binutils/2.27/100-missing-break.patch
index 6f9d67c..6f9d67c 100644
--- a/patches/binutils/2.27/100-missing-break.patch
+++ b/packages/binutils/2.27/100-missing-break.patch
diff --git a/patches/binutils/2.26/120-sh-conf.patch b/packages/binutils/2.27/120-sh-conf.patch
index c12a023..c12a023 100644
--- a/patches/binutils/2.26/120-sh-conf.patch
+++ b/packages/binutils/2.27/120-sh-conf.patch
diff --git a/patches/binutils/2.26/300-001_ld_makefile_patch.patch b/packages/binutils/2.27/300-001_ld_makefile_patch.patch
index 2a1320c..2a1320c 100644
--- a/patches/binutils/2.26/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.27/300-001_ld_makefile_patch.patch
diff --git a/patches/binutils/2.26/300-012_check_ldrunpath_length.patch b/packages/binutils/2.27/300-012_check_ldrunpath_length.patch
index f1f31af..f1f31af 100644
--- a/patches/binutils/2.26/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.27/300-012_check_ldrunpath_length.patch
diff --git a/patches/binutils/2.28/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.27/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
index 2956385..2956385 100644
--- a/patches/binutils/2.28/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
+++ b/packages/binutils/2.27/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
diff --git a/patches/binutils/2.28/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.27/330-Dont-link-to-libfl-as-its-unnecessary.patch
index c52af05..c52af05 100644
--- a/patches/binutils/2.28/330-Dont-link-to-libfl-as-its-unnecessary.patch
+++ b/packages/binutils/2.27/330-Dont-link-to-libfl-as-its-unnecessary.patch
diff --git a/patches/binutils/2.27/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.27/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
index e4f235b..e4f235b 100644
--- a/patches/binutils/2.27/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
+++ b/packages/binutils/2.27/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
diff --git a/patches/binutils/2.26/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.27/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
index 6168b31..6168b31 100644
--- a/patches/binutils/2.26/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
+++ b/packages/binutils/2.27/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
diff --git a/patches/binutils/2.28/500-sysroot.patch b/packages/binutils/2.27/500-sysroot.patch
index 4cb9bc7..4cb9bc7 100644
--- a/patches/binutils/2.28/500-sysroot.patch
+++ b/packages/binutils/2.27/500-sysroot.patch
diff --git a/patches/binutils/2.28/600-poison-system-directories.patch b/packages/binutils/2.27/600-poison-system-directories.patch
index ff235e3..ff235e3 100644
--- a/patches/binutils/2.28/600-poison-system-directories.patch
+++ b/packages/binutils/2.27/600-poison-system-directories.patch
diff --git a/patches/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch
index cea92f3..cea92f3 100644
--- a/patches/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch
+++ b/packages/binutils/2.27/700-Fix-library-paths-on-PowerPC.patch
diff --git a/patches/binutils/2.27/999-xtensa-reverse-shift-count.patch b/packages/binutils/2.27/999-xtensa-reverse-shift-count.patch
index f8bb9c1..f8bb9c1 100644
--- a/patches/binutils/2.27/999-xtensa-reverse-shift-count.patch
+++ b/packages/binutils/2.27/999-xtensa-reverse-shift-count.patch
diff --git a/packages/binutils/2.27/version.desc b/packages/binutils/2.27/version.desc
new file mode 100644
index 0000000..d44e333
--- /dev/null
+++ b/packages/binutils/2.27/version.desc
@@ -0,0 +1 @@
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/patches/binutils/2.25.1/120-sh-conf.patch b/packages/binutils/2.28.1/120-sh-conf.patch
index c12a023..c12a023 100644
--- a/patches/binutils/2.25.1/120-sh-conf.patch
+++ b/packages/binutils/2.28.1/120-sh-conf.patch
diff --git a/patches/binutils/2.25.1/300-001_ld_makefile_patch.patch b/packages/binutils/2.28.1/300-001_ld_makefile_patch.patch
index 2a1320c..2a1320c 100644
--- a/patches/binutils/2.25.1/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.28.1/300-001_ld_makefile_patch.patch
diff --git a/patches/binutils/2.25.1/300-012_check_ldrunpath_length.patch b/packages/binutils/2.28.1/300-012_check_ldrunpath_length.patch
index f1f31af..f1f31af 100644
--- a/patches/binutils/2.25.1/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.28.1/300-012_check_ldrunpath_length.patch
diff --git a/patches/binutils/2.27/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/patches/binutils/2.27/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/patches/binutils/2.27/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/patches/binutils/2.27/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/patches/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/patches/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/patches/binutils/2.25.1/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/patches/binutils/2.25.1/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/patches/binutils/2.27/500-sysroot.patch b/packages/binutils/2.28.1/500-sysroot.patch
index 4cb9bc7..4cb9bc7 100644
--- a/patches/binutils/2.27/500-sysroot.patch
+++ b/packages/binutils/2.28.1/500-sysroot.patch
diff --git a/patches/binutils/2.27/600-poison-system-directories.patch b/packages/binutils/2.28.1/600-poison-system-directories.patch
index ff235e3..ff235e3 100644
--- a/patches/binutils/2.27/600-poison-system-directories.patch
+++ b/packages/binutils/2.28.1/600-poison-system-directories.patch
diff --git a/packages/binutils/2.28.1/version.desc b/packages/binutils/2.28.1/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ 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/binutils/2.29/version.desc b/packages/binutils/2.29/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/binutils/2.29/version.desc
diff --git a/packages/binutils/package.desc b/packages/binutils/package.desc
new file mode 100644
index 0000000..5069307
--- /dev/null
+++ b/packages/binutils/package.desc
@@ -0,0 +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 2.25'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/cloog/0.18.1/version.desc b/packages/cloog/0.18.1/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/cloog/0.18.1/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/cloog/0.18.4/version.desc b/packages/cloog/0.18.4/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/cloog/0.18.4/version.desc
diff --git a/packages/cloog/package.desc b/packages/cloog/package.desc
new file mode 100644
index 0000000..2a12994
--- /dev/null
+++ b/packages/cloog/package.desc
@@ -0,0 +1,5 @@
+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/patches/duma/2_5_15/100-cross-compile.patch b/packages/duma/2_5_15/100-cross-compile.patch
index cc95160..cc95160 100644
--- a/patches/duma/2_5_15/100-cross-compile.patch
+++ b/packages/duma/2_5_15/100-cross-compile.patch
diff --git a/patches/duma/2_5_15/110-separate_cpp.patch b/packages/duma/2_5_15/110-separate_cpp.patch
index 4bbccc7..4bbccc7 100644
--- a/patches/duma/2_5_15/110-separate_cpp.patch
+++ b/packages/duma/2_5_15/110-separate_cpp.patch
diff --git a/patches/duma/2_5_15/200-cpp11-new-operator.patch b/packages/duma/2_5_15/200-cpp11-new-operator.patch
index 900333e..900333e 100644
--- a/patches/duma/2_5_15/200-cpp11-new-operator.patch
+++ b/packages/duma/2_5_15/200-cpp11-new-operator.patch
diff --git a/packages/duma/2_5_15/version.desc b/packages/duma/2_5_15/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/duma/2_5_15/version.desc
diff --git a/packages/duma/package.desc b/packages/duma/package.desc
new file mode 100644
index 0000000..13f637f
--- /dev/null
+++ b/packages/duma/package.desc
@@ -0,0 +1,5 @@
+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/elf2flt/package.desc b/packages/elf2flt/package.desc
new file mode 100644
index 0000000..c46788c
--- /dev/null
+++ b/packages/elf2flt/package.desc
@@ -0,0 +1,2 @@
+repository='git https://github.com/uclinux-dev/elf2flt.git'
+repository_cset='6d80ab6c93409e796f85da404bde84b841231531'
diff --git a/packages/expat/2.1.1/version.desc b/packages/expat/2.1.1/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/expat/2.1.1/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/expat/2.2.3/version.desc b/packages/expat/2.2.3/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/expat/2.2.3/version.desc
diff --git a/packages/expat/package.desc b/packages/expat/package.desc
new file mode 100644
index 0000000..6a541b3
--- /dev/null
+++ b/packages/expat/package.desc
@@ -0,0 +1,5 @@
+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/patches/gcc/linaro-4.8-2015.06/001_gcc_bug_62231.patch b/packages/gcc-linaro/4.8-2015.06/001_gcc_bug_62231.patch
index e7c9cf9..e7c9cf9 100644
--- a/patches/gcc/linaro-4.8-2015.06/001_gcc_bug_62231.patch
+++ b/packages/gcc-linaro/4.8-2015.06/001_gcc_bug_62231.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/002_gcc_bug_62231.patch b/packages/gcc-linaro/4.8-2015.06/002_gcc_bug_62231.patch
index b970ebc..b970ebc 100644
--- a/patches/gcc/linaro-4.8-2015.06/002_gcc_bug_62231.patch
+++ b/packages/gcc-linaro/4.8-2015.06/002_gcc_bug_62231.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/100-uclibc-conf.patch b/packages/gcc-linaro/4.8-2015.06/100-uclibc-conf.patch
index d56bf0a..d56bf0a 100644
--- a/patches/gcc/linaro-4.9-2017.01/100-uclibc-conf.patch
+++ b/packages/gcc-linaro/4.8-2015.06/100-uclibc-conf.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/1000-libtool-leave-framework-alone.patch b/packages/gcc-linaro/4.8-2015.06/1000-libtool-leave-framework-alone.patch
index 525592e..525592e 100644
--- a/patches/gcc/linaro-4.9-2017.01/1000-libtool-leave-framework-alone.patch
+++ b/packages/gcc-linaro/4.8-2015.06/1000-libtool-leave-framework-alone.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/1000-powerpc-link-with-math-lib.patch.conditional b/packages/gcc-linaro/4.8-2015.06/1000-powerpc-link-with-math-lib.patch.conditional
index b7094fe..b7094fe 100644
--- a/patches/gcc/linaro-4.8-2015.06/1000-powerpc-link-with-math-lib.patch.conditional
+++ b/packages/gcc-linaro/4.8-2015.06/1000-powerpc-link-with-math-lib.patch.conditional
diff --git a/patches/gcc/linaro-4.8-2015.06/111-pr65730.patch b/packages/gcc-linaro/4.8-2015.06/111-pr65730.patch
index f195e30..f195e30 100644
--- a/patches/gcc/linaro-4.8-2015.06/111-pr65730.patch
+++ b/packages/gcc-linaro/4.8-2015.06/111-pr65730.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/130-pr43538.patch b/packages/gcc-linaro/4.8-2015.06/130-pr43538.patch
index 19e57bb..19e57bb 100644
--- a/patches/gcc/linaro-4.9-2017.01/130-pr43538.patch
+++ b/packages/gcc-linaro/4.8-2015.06/130-pr43538.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch b/packages/gcc-linaro/4.8-2015.06/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
index 1c49fb0..1c49fb0 100644
--- a/patches/gcc/linaro-4.9-2017.01/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
+++ b/packages/gcc-linaro/4.8-2015.06/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/132-build_gcc-5_with_gcc-6.patch b/packages/gcc-linaro/4.8-2015.06/132-build_gcc-5_with_gcc-6.patch
index ac1d846..ac1d846 100644
--- a/patches/gcc/linaro-4.8-2015.06/132-build_gcc-5_with_gcc-6.patch
+++ b/packages/gcc-linaro/4.8-2015.06/132-build_gcc-5_with_gcc-6.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/301-missing-execinfo_h.patch b/packages/gcc-linaro/4.8-2015.06/301-missing-execinfo_h.patch
index 00efda2..00efda2 100644
--- a/patches/gcc/linaro-4.9-2017.01/301-missing-execinfo_h.patch
+++ b/packages/gcc-linaro/4.8-2015.06/301-missing-execinfo_h.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/305-libmudflap-susv3-legacy.patch b/packages/gcc-linaro/4.8-2015.06/305-libmudflap-susv3-legacy.patch
index 35d5f50..35d5f50 100644
--- a/patches/gcc/linaro-4.8-2015.06/305-libmudflap-susv3-legacy.patch
+++ b/packages/gcc-linaro/4.8-2015.06/305-libmudflap-susv3-legacy.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc-linaro/4.8-2015.06/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index 3cf66b2..3cf66b2 100644
--- a/patches/gcc/linaro-4.8-2015.06/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc-linaro/4.8-2015.06/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/810-arm-softfloat-libgcc.patch b/packages/gcc-linaro/4.8-2015.06/810-arm-softfloat-libgcc.patch
index c8cb377..c8cb377 100644
--- a/patches/gcc/linaro-4.8-2015.06/810-arm-softfloat-libgcc.patch
+++ b/packages/gcc-linaro/4.8-2015.06/810-arm-softfloat-libgcc.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/830-arm_unbreak_armv4t.patch b/packages/gcc-linaro/4.8-2015.06/830-arm_unbreak_armv4t.patch
index 37f8f2a..37f8f2a 100644
--- a/patches/gcc/linaro-4.9-2017.01/830-arm_unbreak_armv4t.patch
+++ b/packages/gcc-linaro/4.8-2015.06/830-arm_unbreak_armv4t.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/841-PR57717-E500v2.patch b/packages/gcc-linaro/4.8-2015.06/841-PR57717-E500v2.patch
index a011e24..a011e24 100644
--- a/patches/gcc/linaro-4.8-2015.06/841-PR57717-E500v2.patch
+++ b/packages/gcc-linaro/4.8-2015.06/841-PR57717-E500v2.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/842-PR60155.patch b/packages/gcc-linaro/4.8-2015.06/842-PR60155.patch
index 7bc2122..7bc2122 100644
--- a/patches/gcc/linaro-4.8-2015.06/842-PR60155.patch
+++ b/packages/gcc-linaro/4.8-2015.06/842-PR60155.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/843-aarch64-vmlaq_lane_s32-typo.patch b/packages/gcc-linaro/4.8-2015.06/843-aarch64-vmlaq_lane_s32-typo.patch
index afa650c..afa650c 100644
--- a/patches/gcc/linaro-4.8-2015.06/843-aarch64-vmlaq_lane_s32-typo.patch
+++ b/packages/gcc-linaro/4.8-2015.06/843-aarch64-vmlaq_lane_s32-typo.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/850-libstdcxx-uclibc-c99.patch b/packages/gcc-linaro/4.8-2015.06/850-libstdcxx-uclibc-c99.patch
index 792976f..792976f 100644
--- a/patches/gcc/linaro-4.8-2015.06/850-libstdcxx-uclibc-c99.patch
+++ b/packages/gcc-linaro/4.8-2015.06/850-libstdcxx-uclibc-c99.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/851-PR-other-56780.patch b/packages/gcc-linaro/4.8-2015.06/851-PR-other-56780.patch
index feb4339..feb4339 100644
--- a/patches/gcc/linaro-4.8-2015.06/851-PR-other-56780.patch
+++ b/packages/gcc-linaro/4.8-2015.06/851-PR-other-56780.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/870-xtensa-add-mauto-litpools-option.patch b/packages/gcc-linaro/4.8-2015.06/870-xtensa-add-mauto-litpools-option.patch
index aa1376c..aa1376c 100644
--- a/patches/gcc/linaro-5.4-2017.05/870-xtensa-add-mauto-litpools-option.patch
+++ b/packages/gcc-linaro/4.8-2015.06/870-xtensa-add-mauto-litpools-option.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/871-xtensa-reimplement-register-spilling.patch b/packages/gcc-linaro/4.8-2015.06/871-xtensa-reimplement-register-spilling.patch
index abc7a08..abc7a08 100644
--- a/patches/gcc/linaro-4.9-2017.01/871-xtensa-reimplement-register-spilling.patch
+++ b/packages/gcc-linaro/4.8-2015.06/871-xtensa-reimplement-register-spilling.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/packages/gcc-linaro/4.8-2015.06/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
index f23a5c0..f23a5c0 100644
--- a/patches/gcc/linaro-4.9-2017.01/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
+++ b/packages/gcc-linaro/4.8-2015.06/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/873-xtensa-fix-_Unwind_GetCFA.patch b/packages/gcc-linaro/4.8-2015.06/873-xtensa-fix-_Unwind_GetCFA.patch
index dc40513..dc40513 100644
--- a/patches/gcc/linaro-4.9-2017.01/873-xtensa-fix-_Unwind_GetCFA.patch
+++ b/packages/gcc-linaro/4.8-2015.06/873-xtensa-fix-_Unwind_GetCFA.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/874-gcc-xtensa-fix-fprintf-format-specifiers.patch b/packages/gcc-linaro/4.8-2015.06/874-gcc-xtensa-fix-fprintf-format-specifiers.patch
index 6013fef..6013fef 100644
--- a/patches/gcc/linaro-4.8-2015.06/874-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ b/packages/gcc-linaro/4.8-2015.06/874-gcc-xtensa-fix-fprintf-format-specifiers.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/900-musl-support.patch b/packages/gcc-linaro/4.8-2015.06/900-musl-support.patch
index 6743a88..6743a88 100644
--- a/patches/gcc/linaro-4.8-2015.06/900-musl-support.patch
+++ b/packages/gcc-linaro/4.8-2015.06/900-musl-support.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/950-cygwin64.patch b/packages/gcc-linaro/4.8-2015.06/950-cygwin64.patch
index 67182ee..67182ee 100644
--- a/patches/gcc/linaro-4.8-2015.06/950-cygwin64.patch
+++ b/packages/gcc-linaro/4.8-2015.06/950-cygwin64.patch
diff --git a/packages/gcc-linaro/4.8-2015.06/version.desc b/packages/gcc-linaro/4.8-2015.06/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/gcc-linaro/4.8-2015.06/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
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/patches/gcc/linaro-4.9-2017.01/001-gcc_bug_62231.patch b/packages/gcc-linaro/4.9-2017.01/001-gcc_bug_62231.patch
index e7c9cf9..e7c9cf9 100644
--- a/patches/gcc/linaro-4.9-2017.01/001-gcc_bug_62231.patch
+++ b/packages/gcc-linaro/4.9-2017.01/001-gcc_bug_62231.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/002-gcc_bug_62231.patch b/packages/gcc-linaro/4.9-2017.01/002-gcc_bug_62231.patch
index b970ebc..b970ebc 100644
--- a/patches/gcc/linaro-4.9-2017.01/002-gcc_bug_62231.patch
+++ b/packages/gcc-linaro/4.9-2017.01/002-gcc_bug_62231.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/100-uclibc-conf.patch b/packages/gcc-linaro/4.9-2017.01/100-uclibc-conf.patch
index d56bf0a..d56bf0a 100644
--- a/patches/gcc/linaro-4.8-2015.06/100-uclibc-conf.patch
+++ b/packages/gcc-linaro/4.9-2017.01/100-uclibc-conf.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/1000-libtool-leave-framework-alone.patch b/packages/gcc-linaro/4.9-2017.01/1000-libtool-leave-framework-alone.patch
index 525592e..525592e 100644
--- a/patches/gcc/linaro-4.8-2015.06/1000-libtool-leave-framework-alone.patch
+++ b/packages/gcc-linaro/4.9-2017.01/1000-libtool-leave-framework-alone.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/1000-powerpc-link-with-math-lib.patch.conditional b/packages/gcc-linaro/4.9-2017.01/1000-powerpc-link-with-math-lib.patch.conditional
index 5e0484f..5e0484f 100644
--- a/patches/gcc/linaro-4.9-2017.01/1000-powerpc-link-with-math-lib.patch.conditional
+++ b/packages/gcc-linaro/4.9-2017.01/1000-powerpc-link-with-math-lib.patch.conditional
diff --git a/patches/gcc/linaro-4.9-2017.01/1100-msp430-string-literals.patch b/packages/gcc-linaro/4.9-2017.01/1100-msp430-string-literals.patch
index 346842e..346842e 100644
--- a/patches/gcc/linaro-4.9-2017.01/1100-msp430-string-literals.patch
+++ b/packages/gcc-linaro/4.9-2017.01/1100-msp430-string-literals.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/111-pr65730.patch b/packages/gcc-linaro/4.9-2017.01/111-pr65730.patch
index 8a41fd2..8a41fd2 100644
--- a/patches/gcc/linaro-4.9-2017.01/111-pr65730.patch
+++ b/packages/gcc-linaro/4.9-2017.01/111-pr65730.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch b/packages/gcc-linaro/4.9-2017.01/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
index bb77c4b..bb77c4b 100644
--- a/patches/gcc/linaro-4.9-2017.01/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
+++ b/packages/gcc-linaro/4.9-2017.01/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/130-pr43538.patch b/packages/gcc-linaro/4.9-2017.01/130-pr43538.patch
index 19e57bb..19e57bb 100644
--- a/patches/gcc/linaro-4.8-2015.06/130-pr43538.patch
+++ b/packages/gcc-linaro/4.9-2017.01/130-pr43538.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch b/packages/gcc-linaro/4.9-2017.01/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
index 1c49fb0..1c49fb0 100644
--- a/patches/gcc/linaro-4.8-2015.06/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
+++ b/packages/gcc-linaro/4.9-2017.01/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch b/packages/gcc-linaro/4.9-2017.01/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch
index 55f3228..55f3228 100644
--- a/patches/gcc/linaro-4.9-2017.01/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch
+++ b/packages/gcc-linaro/4.9-2017.01/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/301-missing-execinfo_h.patch b/packages/gcc-linaro/4.9-2017.01/301-missing-execinfo_h.patch
index 00efda2..00efda2 100644
--- a/patches/gcc/linaro-4.8-2015.06/301-missing-execinfo_h.patch
+++ b/packages/gcc-linaro/4.9-2017.01/301-missing-execinfo_h.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc-linaro/4.9-2017.01/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index c3bab15..c3bab15 100644
--- a/patches/gcc/linaro-4.9-2017.01/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc-linaro/4.9-2017.01/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/810-arm-softfloat-libgcc.patch b/packages/gcc-linaro/4.9-2017.01/810-arm-softfloat-libgcc.patch
index 5efa7fd..5efa7fd 100644
--- a/patches/gcc/linaro-6.3-2017.05/810-arm-softfloat-libgcc.patch
+++ b/packages/gcc-linaro/4.9-2017.01/810-arm-softfloat-libgcc.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/830-arm_unbreak_armv4t.patch b/packages/gcc-linaro/4.9-2017.01/830-arm_unbreak_armv4t.patch
index 37f8f2a..37f8f2a 100644
--- a/patches/gcc/linaro-4.8-2015.06/830-arm_unbreak_armv4t.patch
+++ b/packages/gcc-linaro/4.9-2017.01/830-arm_unbreak_armv4t.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/840-microblaze-enable-dwarf-eh-support.patch b/packages/gcc-linaro/4.9-2017.01/840-microblaze-enable-dwarf-eh-support.patch
index 03fc47f..03fc47f 100644
--- a/patches/gcc/linaro-4.9-2017.01/840-microblaze-enable-dwarf-eh-support.patch
+++ b/packages/gcc-linaro/4.9-2017.01/840-microblaze-enable-dwarf-eh-support.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/850-libstdcxx-uclibc-c99.patch b/packages/gcc-linaro/4.9-2017.01/850-libstdcxx-uclibc-c99.patch
index 533d01f..533d01f 100644
--- a/patches/gcc/linaro-4.9-2017.01/850-libstdcxx-uclibc-c99.patch
+++ b/packages/gcc-linaro/4.9-2017.01/850-libstdcxx-uclibc-c99.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/860-cilk-wchar.patch b/packages/gcc-linaro/4.9-2017.01/860-cilk-wchar.patch
index 1837405..1837405 100644
--- a/patches/gcc/linaro-4.9-2017.01/860-cilk-wchar.patch
+++ b/packages/gcc-linaro/4.9-2017.01/860-cilk-wchar.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/870-xtensa-add-mauto-litpools-option.patch b/packages/gcc-linaro/4.9-2017.01/870-xtensa-add-mauto-litpools-option.patch
index 98c7b3f..98c7b3f 100644
--- a/patches/gcc/linaro-4.9-2017.01/870-xtensa-add-mauto-litpools-option.patch
+++ b/packages/gcc-linaro/4.9-2017.01/870-xtensa-add-mauto-litpools-option.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/871-xtensa-reimplement-register-spilling.patch b/packages/gcc-linaro/4.9-2017.01/871-xtensa-reimplement-register-spilling.patch
index abc7a08..abc7a08 100644
--- a/patches/gcc/linaro-4.8-2015.06/871-xtensa-reimplement-register-spilling.patch
+++ b/packages/gcc-linaro/4.9-2017.01/871-xtensa-reimplement-register-spilling.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/packages/gcc-linaro/4.9-2017.01/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
index f23a5c0..f23a5c0 100644
--- a/patches/gcc/linaro-4.8-2015.06/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
+++ b/packages/gcc-linaro/4.9-2017.01/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/873-xtensa-fix-_Unwind_GetCFA.patch b/packages/gcc-linaro/4.9-2017.01/873-xtensa-fix-_Unwind_GetCFA.patch
index dc40513..dc40513 100644
--- a/patches/gcc/linaro-4.8-2015.06/873-xtensa-fix-_Unwind_GetCFA.patch
+++ b/packages/gcc-linaro/4.9-2017.01/873-xtensa-fix-_Unwind_GetCFA.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/874-xtensa-add-uclinux-support.patch b/packages/gcc-linaro/4.9-2017.01/874-xtensa-add-uclinux-support.patch
index 881aec0..881aec0 100644
--- a/patches/gcc/linaro-4.9-2017.01/874-xtensa-add-uclinux-support.patch
+++ b/packages/gcc-linaro/4.9-2017.01/874-xtensa-add-uclinux-support.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/875-gcc-xtensa-fix-fprintf-format-specifiers.patch b/packages/gcc-linaro/4.9-2017.01/875-gcc-xtensa-fix-fprintf-format-specifiers.patch
index 052ffc3..052ffc3 100644
--- a/patches/gcc/linaro-4.9-2017.01/875-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ b/packages/gcc-linaro/4.9-2017.01/875-gcc-xtensa-fix-fprintf-format-specifiers.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/880-nios2_legitimize_address.patch b/packages/gcc-linaro/4.9-2017.01/880-nios2_legitimize_address.patch
index 4623f29..4623f29 100644
--- a/patches/gcc/linaro-4.9-2017.01/880-nios2_legitimize_address.patch
+++ b/packages/gcc-linaro/4.9-2017.01/880-nios2_legitimize_address.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/890-fix-m68k-compile.patch b/packages/gcc-linaro/4.9-2017.01/890-fix-m68k-compile.patch
index 140977b..140977b 100644
--- a/patches/gcc/linaro-4.9-2017.01/890-fix-m68k-compile.patch
+++ b/packages/gcc-linaro/4.9-2017.01/890-fix-m68k-compile.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/891-fix-m68k-uclinux.patch b/packages/gcc-linaro/4.9-2017.01/891-fix-m68k-uclinux.patch
index 4347642..4347642 100644
--- a/patches/gcc/linaro-4.9-2017.01/891-fix-m68k-uclinux.patch
+++ b/packages/gcc-linaro/4.9-2017.01/891-fix-m68k-uclinux.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/930-libgcc-disable-split-stack-nothreads.patch b/packages/gcc-linaro/4.9-2017.01/930-libgcc-disable-split-stack-nothreads.patch
index 670cf8d..670cf8d 100644
--- a/patches/gcc/linaro-4.9-2017.01/930-libgcc-disable-split-stack-nothreads.patch
+++ b/packages/gcc-linaro/4.9-2017.01/930-libgcc-disable-split-stack-nothreads.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/940-uclinux-enable-threads.patch b/packages/gcc-linaro/4.9-2017.01/940-uclinux-enable-threads.patch
index 5108147..5108147 100644
--- a/patches/gcc/linaro-4.9-2017.01/940-uclinux-enable-threads.patch
+++ b/packages/gcc-linaro/4.9-2017.01/940-uclinux-enable-threads.patch
diff --git a/packages/gcc-linaro/4.9-2017.01/version.desc b/packages/gcc-linaro/4.9-2017.01/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gcc-linaro/4.9-2017.01/version.desc
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/patches/gcc/linaro-6.3-2017.05/100-uclibc-conf.patch b/packages/gcc-linaro/5.4-2017.05/100-uclibc-conf.patch
index 73d1f0d..73d1f0d 100644
--- a/patches/gcc/linaro-6.3-2017.05/100-uclibc-conf.patch
+++ b/packages/gcc-linaro/5.4-2017.05/100-uclibc-conf.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/1000-libtool-leave-framework-alone.patch b/packages/gcc-linaro/5.4-2017.05/1000-libtool-leave-framework-alone.patch
index 0f4912a..0f4912a 100644
--- a/patches/gcc/linaro-5.4-2017.05/1000-libtool-leave-framework-alone.patch
+++ b/packages/gcc-linaro/5.4-2017.05/1000-libtool-leave-framework-alone.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/110-xtensa-implement-trap-pattern.patch b/packages/gcc-linaro/5.4-2017.05/110-xtensa-implement-trap-pattern.patch
index 3304532..3304532 100644
--- a/patches/gcc/linaro-5.4-2017.05/110-xtensa-implement-trap-pattern.patch
+++ b/packages/gcc-linaro/5.4-2017.05/110-xtensa-implement-trap-pattern.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/1100-msp430-string-literals.patch b/packages/gcc-linaro/5.4-2017.05/1100-msp430-string-literals.patch
index 819d6d2..819d6d2 100644
--- a/patches/gcc/linaro-5.4-2017.05/1100-msp430-string-literals.patch
+++ b/packages/gcc-linaro/5.4-2017.05/1100-msp430-string-literals.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch b/packages/gcc-linaro/5.4-2017.05/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
index c11ad35..c11ad35 100644
--- a/patches/gcc/linaro-5.4-2017.05/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
+++ b/packages/gcc-linaro/5.4-2017.05/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/301-missing-execinfo_h.patch b/packages/gcc-linaro/5.4-2017.05/301-missing-execinfo_h.patch
index 2d0e7ba..2d0e7ba 100644
--- a/patches/gcc/linaro-6.3-2017.05/301-missing-execinfo_h.patch
+++ b/packages/gcc-linaro/5.4-2017.05/301-missing-execinfo_h.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc-linaro/5.4-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index d8986d5..d8986d5 100644
--- a/patches/gcc/linaro-6.3-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc-linaro/5.4-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc-linaro/5.4-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch
index 12ef48e..12ef48e 100644
--- a/patches/gcc/linaro-6.3-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch
+++ b/packages/gcc-linaro/5.4-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/810-arm-softfloat-libgcc.patch b/packages/gcc-linaro/5.4-2017.05/810-arm-softfloat-libgcc.patch
index 5efa7fd..5efa7fd 100644
--- a/patches/gcc/linaro-5.4-2017.05/810-arm-softfloat-libgcc.patch
+++ b/packages/gcc-linaro/5.4-2017.05/810-arm-softfloat-libgcc.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/830-arm_unbreak_armv4t.patch b/packages/gcc-linaro/5.4-2017.05/830-arm_unbreak_armv4t.patch
index b730059..b730059 100644
--- a/patches/gcc/linaro-6.3-2017.05/830-arm_unbreak_armv4t.patch
+++ b/packages/gcc-linaro/5.4-2017.05/830-arm_unbreak_armv4t.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/840-microblaze-enable-dwarf-eh-support.patch b/packages/gcc-linaro/5.4-2017.05/840-microblaze-enable-dwarf-eh-support.patch
index 9d29090..9d29090 100644
--- a/patches/gcc/linaro-5.4-2017.05/840-microblaze-enable-dwarf-eh-support.patch
+++ b/packages/gcc-linaro/5.4-2017.05/840-microblaze-enable-dwarf-eh-support.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/850-libstdcxx-uclibc-c99.patch b/packages/gcc-linaro/5.4-2017.05/850-libstdcxx-uclibc-c99.patch
index 9e97d94..9e97d94 100644
--- a/patches/gcc/linaro-5.4-2017.05/850-libstdcxx-uclibc-c99.patch
+++ b/packages/gcc-linaro/5.4-2017.05/850-libstdcxx-uclibc-c99.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/860-cilk-wchar.patch b/packages/gcc-linaro/5.4-2017.05/860-cilk-wchar.patch
index 1d9916f..1d9916f 100644
--- a/patches/gcc/linaro-6.3-2017.05/860-cilk-wchar.patch
+++ b/packages/gcc-linaro/5.4-2017.05/860-cilk-wchar.patch
diff --git a/patches/gcc/linaro-4.8-2015.06/870-xtensa-add-mauto-litpools-option.patch b/packages/gcc-linaro/5.4-2017.05/870-xtensa-add-mauto-litpools-option.patch
index aa1376c..aa1376c 100644
--- a/patches/gcc/linaro-4.8-2015.06/870-xtensa-add-mauto-litpools-option.patch
+++ b/packages/gcc-linaro/5.4-2017.05/870-xtensa-add-mauto-litpools-option.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/871-xtensa-reimplement-register-spilling.patch b/packages/gcc-linaro/5.4-2017.05/871-xtensa-reimplement-register-spilling.patch
index 4056f8b..4056f8b 100644
--- a/patches/gcc/linaro-5.4-2017.05/871-xtensa-reimplement-register-spilling.patch
+++ b/packages/gcc-linaro/5.4-2017.05/871-xtensa-reimplement-register-spilling.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/packages/gcc-linaro/5.4-2017.05/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
index 9707f68..9707f68 100644
--- a/patches/gcc/linaro-5.4-2017.05/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
+++ b/packages/gcc-linaro/5.4-2017.05/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/873-xtensa-fix-_Unwind_GetCFA.patch b/packages/gcc-linaro/5.4-2017.05/873-xtensa-fix-_Unwind_GetCFA.patch
index 2d8eb7c..2d8eb7c 100644
--- a/patches/gcc/linaro-5.4-2017.05/873-xtensa-fix-_Unwind_GetCFA.patch
+++ b/packages/gcc-linaro/5.4-2017.05/873-xtensa-fix-_Unwind_GetCFA.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/874-xtensa-add-uclinux-support.patch b/packages/gcc-linaro/5.4-2017.05/874-xtensa-add-uclinux-support.patch
index 23db3d8..23db3d8 100644
--- a/patches/gcc/linaro-5.4-2017.05/874-xtensa-add-uclinux-support.patch
+++ b/packages/gcc-linaro/5.4-2017.05/874-xtensa-add-uclinux-support.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch b/packages/gcc-linaro/5.4-2017.05/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch
index d128596..d128596 100644
--- a/patches/gcc/linaro-5.4-2017.05/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch
+++ b/packages/gcc-linaro/5.4-2017.05/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/876-xtensa-fix-libgcc-build-with-text-section-literals.patch b/packages/gcc-linaro/5.4-2017.05/876-xtensa-fix-libgcc-build-with-text-section-literals.patch
index 4b2334a..4b2334a 100644
--- a/patches/gcc/linaro-5.4-2017.05/876-xtensa-fix-libgcc-build-with-text-section-literals.patch
+++ b/packages/gcc-linaro/5.4-2017.05/876-xtensa-fix-libgcc-build-with-text-section-literals.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch b/packages/gcc-linaro/5.4-2017.05/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
index 6e0ce6e..6e0ce6e 100644
--- a/patches/gcc/linaro-5.4-2017.05/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
+++ b/packages/gcc-linaro/5.4-2017.05/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/878-xtensa-Fix-PR-target-78603.patch b/packages/gcc-linaro/5.4-2017.05/878-xtensa-Fix-PR-target-78603.patch
index 4646d3c..4646d3c 100644
--- a/patches/gcc/linaro-5.4-2017.05/878-xtensa-Fix-PR-target-78603.patch
+++ b/packages/gcc-linaro/5.4-2017.05/878-xtensa-Fix-PR-target-78603.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/879-gcc-xtensa-fix-fprintf-format-specifiers.patch b/packages/gcc-linaro/5.4-2017.05/879-gcc-xtensa-fix-fprintf-format-specifiers.patch
index e75e258..e75e258 100644
--- a/patches/gcc/linaro-5.4-2017.05/879-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ b/packages/gcc-linaro/5.4-2017.05/879-gcc-xtensa-fix-fprintf-format-specifiers.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/890-fix-m68k-compile.patch b/packages/gcc-linaro/5.4-2017.05/890-fix-m68k-compile.patch
index 6e63de0..6e63de0 100644
--- a/patches/gcc/linaro-6.3-2017.05/890-fix-m68k-compile.patch
+++ b/packages/gcc-linaro/5.4-2017.05/890-fix-m68k-compile.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/891-fix-m68k-uclinux.patch b/packages/gcc-linaro/5.4-2017.05/891-fix-m68k-uclinux.patch
index 4e186bd..4e186bd 100644
--- a/patches/gcc/linaro-6.3-2017.05/891-fix-m68k-uclinux.patch
+++ b/packages/gcc-linaro/5.4-2017.05/891-fix-m68k-uclinux.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/892-microblaze-uclibc.patch b/packages/gcc-linaro/5.4-2017.05/892-microblaze-uclibc.patch
index a8eb5a6..a8eb5a6 100644
--- a/patches/gcc/linaro-5.4-2017.05/892-microblaze-uclibc.patch
+++ b/packages/gcc-linaro/5.4-2017.05/892-microblaze-uclibc.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/902-unwind-fix-for-musl.patch b/packages/gcc-linaro/5.4-2017.05/902-unwind-fix-for-musl.patch
index ef47054..ef47054 100644
--- a/patches/gcc/linaro-5.4-2017.05/902-unwind-fix-for-musl.patch
+++ b/packages/gcc-linaro/5.4-2017.05/902-unwind-fix-for-musl.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/910-nios2-bad-multilib-default.patch b/packages/gcc-linaro/5.4-2017.05/910-nios2-bad-multilib-default.patch
index d94697f..d94697f 100644
--- a/patches/gcc/linaro-5.4-2017.05/910-nios2-bad-multilib-default.patch
+++ b/packages/gcc-linaro/5.4-2017.05/910-nios2-bad-multilib-default.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/930-libgcc-disable-split-stack-nothreads.patch b/packages/gcc-linaro/5.4-2017.05/930-libgcc-disable-split-stack-nothreads.patch
index 07f9a73..07f9a73 100644
--- a/patches/gcc/linaro-6.3-2017.05/930-libgcc-disable-split-stack-nothreads.patch
+++ b/packages/gcc-linaro/5.4-2017.05/930-libgcc-disable-split-stack-nothreads.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/940-uclinux-enable-threads.patch b/packages/gcc-linaro/5.4-2017.05/940-uclinux-enable-threads.patch
index 490a55b..490a55b 100644
--- a/patches/gcc/linaro-6.3-2017.05/940-uclinux-enable-threads.patch
+++ b/packages/gcc-linaro/5.4-2017.05/940-uclinux-enable-threads.patch
diff --git a/packages/gcc-linaro/5.4-2017.05/version.desc b/packages/gcc-linaro/5.4-2017.05/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gcc-linaro/5.4-2017.05/version.desc
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/patches/gcc/linaro-5.4-2017.05/100-uclibc-conf.patch b/packages/gcc-linaro/6.3-2017.05/100-uclibc-conf.patch
index 73d1f0d..73d1f0d 100644
--- a/patches/gcc/linaro-5.4-2017.05/100-uclibc-conf.patch
+++ b/packages/gcc-linaro/6.3-2017.05/100-uclibc-conf.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/1000-libtool-leave-framework-alone.patch b/packages/gcc-linaro/6.3-2017.05/1000-libtool-leave-framework-alone.patch
index bce09eb..bce09eb 100644
--- a/patches/gcc/linaro-6.3-2017.05/1000-libtool-leave-framework-alone.patch
+++ b/packages/gcc-linaro/6.3-2017.05/1000-libtool-leave-framework-alone.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/301-missing-execinfo_h.patch b/packages/gcc-linaro/6.3-2017.05/301-missing-execinfo_h.patch
index 2d0e7ba..2d0e7ba 100644
--- a/patches/gcc/linaro-5.4-2017.05/301-missing-execinfo_h.patch
+++ b/packages/gcc-linaro/6.3-2017.05/301-missing-execinfo_h.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc-linaro/6.3-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index d8986d5..d8986d5 100644
--- a/patches/gcc/linaro-5.4-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc-linaro/6.3-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc-linaro/6.3-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch
index 12ef48e..12ef48e 100644
--- a/patches/gcc/linaro-5.4-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch
+++ b/packages/gcc-linaro/6.3-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch
diff --git a/patches/gcc/linaro-4.9-2017.01/810-arm-softfloat-libgcc.patch b/packages/gcc-linaro/6.3-2017.05/810-arm-softfloat-libgcc.patch
index 5efa7fd..5efa7fd 100644
--- a/patches/gcc/linaro-4.9-2017.01/810-arm-softfloat-libgcc.patch
+++ b/packages/gcc-linaro/6.3-2017.05/810-arm-softfloat-libgcc.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/830-arm_unbreak_armv4t.patch b/packages/gcc-linaro/6.3-2017.05/830-arm_unbreak_armv4t.patch
index b730059..b730059 100644
--- a/patches/gcc/linaro-5.4-2017.05/830-arm_unbreak_armv4t.patch
+++ b/packages/gcc-linaro/6.3-2017.05/830-arm_unbreak_armv4t.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/860-cilk-wchar.patch b/packages/gcc-linaro/6.3-2017.05/860-cilk-wchar.patch
index 1d9916f..1d9916f 100644
--- a/patches/gcc/linaro-5.4-2017.05/860-cilk-wchar.patch
+++ b/packages/gcc-linaro/6.3-2017.05/860-cilk-wchar.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch b/packages/gcc-linaro/6.3-2017.05/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
index 6e0ce6e..6e0ce6e 100644
--- a/patches/gcc/linaro-6.3-2017.05/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
+++ b/packages/gcc-linaro/6.3-2017.05/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/871-xtensa-Fix-PR-target-78118.patch b/packages/gcc-linaro/6.3-2017.05/871-xtensa-Fix-PR-target-78118.patch
index c6ae103..c6ae103 100644
--- a/patches/gcc/linaro-6.3-2017.05/871-xtensa-Fix-PR-target-78118.patch
+++ b/packages/gcc-linaro/6.3-2017.05/871-xtensa-Fix-PR-target-78118.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/872-xtensa-Fix-PR-target-78603.patch b/packages/gcc-linaro/6.3-2017.05/872-xtensa-Fix-PR-target-78603.patch
index 669097c..669097c 100644
--- a/patches/gcc/linaro-6.3-2017.05/872-xtensa-Fix-PR-target-78603.patch
+++ b/packages/gcc-linaro/6.3-2017.05/872-xtensa-Fix-PR-target-78603.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/873-gcc-xtensa-fix-fprintf-format-specifiers.patch b/packages/gcc-linaro/6.3-2017.05/873-gcc-xtensa-fix-fprintf-format-specifiers.patch
index a5b0624..a5b0624 100644
--- a/patches/gcc/linaro-6.3-2017.05/873-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ b/packages/gcc-linaro/6.3-2017.05/873-gcc-xtensa-fix-fprintf-format-specifiers.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/890-fix-m68k-compile.patch b/packages/gcc-linaro/6.3-2017.05/890-fix-m68k-compile.patch
index 6e63de0..6e63de0 100644
--- a/patches/gcc/linaro-5.4-2017.05/890-fix-m68k-compile.patch
+++ b/packages/gcc-linaro/6.3-2017.05/890-fix-m68k-compile.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/891-fix-m68k-uclinux.patch b/packages/gcc-linaro/6.3-2017.05/891-fix-m68k-uclinux.patch
index 4e186bd..4e186bd 100644
--- a/patches/gcc/linaro-5.4-2017.05/891-fix-m68k-uclinux.patch
+++ b/packages/gcc-linaro/6.3-2017.05/891-fix-m68k-uclinux.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/892-libgcc-mkmap-symver-support-skip_underscore.patch b/packages/gcc-linaro/6.3-2017.05/892-libgcc-mkmap-symver-support-skip_underscore.patch
index 73ee6c5..73ee6c5 100644
--- a/patches/gcc/linaro-6.3-2017.05/892-libgcc-mkmap-symver-support-skip_underscore.patch
+++ b/packages/gcc-linaro/6.3-2017.05/892-libgcc-mkmap-symver-support-skip_underscore.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch b/packages/gcc-linaro/6.3-2017.05/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch
index 454295d..454295d 100644
--- a/patches/gcc/linaro-6.3-2017.05/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch
+++ b/packages/gcc-linaro/6.3-2017.05/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch b/packages/gcc-linaro/6.3-2017.05/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
index ce49de7..ce49de7 100644
--- a/patches/gcc/linaro-6.3-2017.05/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
+++ b/packages/gcc-linaro/6.3-2017.05/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/895-bfin-define-REENTRANT.patch b/packages/gcc-linaro/6.3-2017.05/895-bfin-define-REENTRANT.patch
index e2828a5..e2828a5 100644
--- a/patches/gcc/linaro-6.3-2017.05/895-bfin-define-REENTRANT.patch
+++ b/packages/gcc-linaro/6.3-2017.05/895-bfin-define-REENTRANT.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/900-libgfortran-missing-include.patch b/packages/gcc-linaro/6.3-2017.05/900-libgfortran-missing-include.patch
index 1f47469..1f47469 100644
--- a/patches/gcc/linaro-6.3-2017.05/900-libgfortran-missing-include.patch
+++ b/packages/gcc-linaro/6.3-2017.05/900-libgfortran-missing-include.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/910-nios2-bad-multilib-default.patch b/packages/gcc-linaro/6.3-2017.05/910-nios2-bad-multilib-default.patch
index 61989e5..61989e5 100644
--- a/patches/gcc/linaro-6.3-2017.05/910-nios2-bad-multilib-default.patch
+++ b/packages/gcc-linaro/6.3-2017.05/910-nios2-bad-multilib-default.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/930-libgcc-disable-split-stack-nothreads.patch b/packages/gcc-linaro/6.3-2017.05/930-libgcc-disable-split-stack-nothreads.patch
index 07f9a73..07f9a73 100644
--- a/patches/gcc/linaro-5.4-2017.05/930-libgcc-disable-split-stack-nothreads.patch
+++ b/packages/gcc-linaro/6.3-2017.05/930-libgcc-disable-split-stack-nothreads.patch
diff --git a/patches/gcc/linaro-5.4-2017.05/940-uclinux-enable-threads.patch b/packages/gcc-linaro/6.3-2017.05/940-uclinux-enable-threads.patch
index 490a55b..490a55b 100644
--- a/patches/gcc/linaro-5.4-2017.05/940-uclinux-enable-threads.patch
+++ b/packages/gcc-linaro/6.3-2017.05/940-uclinux-enable-threads.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/951-bionic-ndk.patch b/packages/gcc-linaro/6.3-2017.05/951-bionic-ndk.patch
index 59c50a8..59c50a8 100644
--- a/patches/gcc/linaro-6.3-2017.05/951-bionic-ndk.patch
+++ b/packages/gcc-linaro/6.3-2017.05/951-bionic-ndk.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/952-bionic-errno.patch b/packages/gcc-linaro/6.3-2017.05/952-bionic-errno.patch
index 91f6ca3..91f6ca3 100644
--- a/patches/gcc/linaro-6.3-2017.05/952-bionic-errno.patch
+++ b/packages/gcc-linaro/6.3-2017.05/952-bionic-errno.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/970-crystax.patch b/packages/gcc-linaro/6.3-2017.05/970-crystax.patch
index e3109cc..e3109cc 100644
--- a/patches/gcc/linaro-6.3-2017.05/970-crystax.patch
+++ b/packages/gcc-linaro/6.3-2017.05/970-crystax.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/971-crystax.patch b/packages/gcc-linaro/6.3-2017.05/971-crystax.patch
index 748a381..748a381 100644
--- a/patches/gcc/linaro-6.3-2017.05/971-crystax.patch
+++ b/packages/gcc-linaro/6.3-2017.05/971-crystax.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/972-crystax.patch b/packages/gcc-linaro/6.3-2017.05/972-crystax.patch
index b9077be..b9077be 100644
--- a/patches/gcc/linaro-6.3-2017.05/972-crystax.patch
+++ b/packages/gcc-linaro/6.3-2017.05/972-crystax.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/973-crystax.patch b/packages/gcc-linaro/6.3-2017.05/973-crystax.patch
index b96ece3..b96ece3 100644
--- a/patches/gcc/linaro-6.3-2017.05/973-crystax.patch
+++ b/packages/gcc-linaro/6.3-2017.05/973-crystax.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/974-crystax.patch b/packages/gcc-linaro/6.3-2017.05/974-crystax.patch
index 9db4f54..9db4f54 100644
--- a/patches/gcc/linaro-6.3-2017.05/974-crystax.patch
+++ b/packages/gcc-linaro/6.3-2017.05/974-crystax.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/975-crystax.patch b/packages/gcc-linaro/6.3-2017.05/975-crystax.patch
index 9efc2a4..9efc2a4 100644
--- a/patches/gcc/linaro-6.3-2017.05/975-crystax.patch
+++ b/packages/gcc-linaro/6.3-2017.05/975-crystax.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/976-crystax.patch b/packages/gcc-linaro/6.3-2017.05/976-crystax.patch
index 790d4a9..790d4a9 100644
--- a/patches/gcc/linaro-6.3-2017.05/976-crystax.patch
+++ b/packages/gcc-linaro/6.3-2017.05/976-crystax.patch
diff --git a/patches/gcc/linaro-6.3-2017.05/977-crystax.patch b/packages/gcc-linaro/6.3-2017.05/977-crystax.patch
index 0211d72..0211d72 100644
--- a/patches/gcc/linaro-6.3-2017.05/977-crystax.patch
+++ b/packages/gcc-linaro/6.3-2017.05/977-crystax.patch
diff --git a/packages/gcc-linaro/6.3-2017.05/version.desc b/packages/gcc-linaro/6.3-2017.05/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gcc-linaro/6.3-2017.05/version.desc
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/patches/gcc/7.1.0/100-uclibc-conf.patch b/packages/gcc-linaro/7.1-2017.05/100-uclibc-conf.patch
index 73d1f0d..73d1f0d 100644
--- a/patches/gcc/7.1.0/100-uclibc-conf.patch
+++ b/packages/gcc-linaro/7.1-2017.05/100-uclibc-conf.patch
diff --git a/patches/gcc/7.1.0/1000-libtool-leave-framework-alone.patch b/packages/gcc-linaro/7.1-2017.05/1000-libtool-leave-framework-alone.patch
index bce09eb..bce09eb 100644
--- a/patches/gcc/7.1.0/1000-libtool-leave-framework-alone.patch
+++ b/packages/gcc-linaro/7.1-2017.05/1000-libtool-leave-framework-alone.patch
diff --git a/patches/gcc/7.1.0/111-alpha-bad-eh_frame.patch b/packages/gcc-linaro/7.1-2017.05/111-alpha-bad-eh_frame.patch
index 93f6e94..93f6e94 100644
--- a/patches/gcc/7.1.0/111-alpha-bad-eh_frame.patch
+++ b/packages/gcc-linaro/7.1-2017.05/111-alpha-bad-eh_frame.patch
diff --git a/patches/gcc/7.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc-linaro/7.1-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index d8986d5..d8986d5 100644
--- a/patches/gcc/7.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc-linaro/7.1-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/patches/gcc/7.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc-linaro/7.1-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch
index 12ef48e..12ef48e 100644
--- a/patches/gcc/7.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
+++ b/packages/gcc-linaro/7.1-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch
diff --git a/patches/gcc/7.1.0/810-arm-softfloat-libgcc.patch b/packages/gcc-linaro/7.1-2017.05/810-arm-softfloat-libgcc.patch
index 5efa7fd..5efa7fd 100644
--- a/patches/gcc/7.1.0/810-arm-softfloat-libgcc.patch
+++ b/packages/gcc-linaro/7.1-2017.05/810-arm-softfloat-libgcc.patch
diff --git a/patches/gcc/7.1.0/860-cilk-wchar.patch b/packages/gcc-linaro/7.1-2017.05/860-cilk-wchar.patch
index 1d9916f..1d9916f 100644
--- a/patches/gcc/7.1.0/860-cilk-wchar.patch
+++ b/packages/gcc-linaro/7.1-2017.05/860-cilk-wchar.patch
diff --git a/patches/gcc/7.1.0/870-gcc-xtensa-fix-fprintf-format-specifiers.patch b/packages/gcc-linaro/7.1-2017.05/870-gcc-xtensa-fix-fprintf-format-specifiers.patch
index cf21584..cf21584 100644
--- a/patches/gcc/7.1.0/870-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ b/packages/gcc-linaro/7.1-2017.05/870-gcc-xtensa-fix-fprintf-format-specifiers.patch
diff --git a/patches/gcc/7.1.0/891-fix-m68k-uclinux.patch b/packages/gcc-linaro/7.1-2017.05/891-fix-m68k-uclinux.patch
index 4e186bd..4e186bd 100644
--- a/patches/gcc/7.1.0/891-fix-m68k-uclinux.patch
+++ b/packages/gcc-linaro/7.1-2017.05/891-fix-m68k-uclinux.patch
diff --git a/patches/gcc/7.1.0/900-libgfortran-missing-include.patch b/packages/gcc-linaro/7.1-2017.05/900-libgfortran-missing-include.patch
index 1f47469..1f47469 100644
--- a/patches/gcc/7.1.0/900-libgfortran-missing-include.patch
+++ b/packages/gcc-linaro/7.1-2017.05/900-libgfortran-missing-include.patch
diff --git a/patches/gcc/7.1.0/910-nios2-bad-multilib-default.patch b/packages/gcc-linaro/7.1-2017.05/910-nios2-bad-multilib-default.patch
index 61989e5..61989e5 100644
--- a/patches/gcc/7.1.0/910-nios2-bad-multilib-default.patch
+++ b/packages/gcc-linaro/7.1-2017.05/910-nios2-bad-multilib-default.patch
diff --git a/patches/gcc/7.1.0/930-libgcc-disable-split-stack-nothreads.patch b/packages/gcc-linaro/7.1-2017.05/930-libgcc-disable-split-stack-nothreads.patch
index 07f9a73..07f9a73 100644
--- a/patches/gcc/7.1.0/930-libgcc-disable-split-stack-nothreads.patch
+++ b/packages/gcc-linaro/7.1-2017.05/930-libgcc-disable-split-stack-nothreads.patch
diff --git a/patches/gcc/7.1.0/951-bionic-ndk.patch b/packages/gcc-linaro/7.1-2017.05/951-bionic-ndk.patch
index 59c50a8..59c50a8 100644
--- a/patches/gcc/7.1.0/951-bionic-ndk.patch
+++ b/packages/gcc-linaro/7.1-2017.05/951-bionic-ndk.patch
diff --git a/patches/gcc/7.1.0/952-bionic-errno.patch b/packages/gcc-linaro/7.1-2017.05/952-bionic-errno.patch
index 91f6ca3..91f6ca3 100644
--- a/patches/gcc/7.1.0/952-bionic-errno.patch
+++ b/packages/gcc-linaro/7.1-2017.05/952-bionic-errno.patch
diff --git a/patches/gcc/7.1.0/970-crystax.patch b/packages/gcc-linaro/7.1-2017.05/970-crystax.patch
index 7324d7f..7324d7f 100644
--- a/patches/gcc/7.1.0/970-crystax.patch
+++ b/packages/gcc-linaro/7.1-2017.05/970-crystax.patch
diff --git a/patches/gcc/7.1.0/971-crystax.patch b/packages/gcc-linaro/7.1-2017.05/971-crystax.patch
index 748a381..748a381 100644
--- a/patches/gcc/7.1.0/971-crystax.patch
+++ b/packages/gcc-linaro/7.1-2017.05/971-crystax.patch
diff --git a/patches/gcc/7.1.0/972-crystax.patch b/packages/gcc-linaro/7.1-2017.05/972-crystax.patch
index b9077be..b9077be 100644
--- a/patches/gcc/7.1.0/972-crystax.patch
+++ b/packages/gcc-linaro/7.1-2017.05/972-crystax.patch
diff --git a/patches/gcc/7.1.0/973-crystax.patch b/packages/gcc-linaro/7.1-2017.05/973-crystax.patch
index b96ece3..b96ece3 100644
--- a/patches/gcc/7.1.0/973-crystax.patch
+++ b/packages/gcc-linaro/7.1-2017.05/973-crystax.patch
diff --git a/patches/gcc/7.1.0/974-crystax.patch b/packages/gcc-linaro/7.1-2017.05/974-crystax.patch
index 9db4f54..9db4f54 100644
--- a/patches/gcc/7.1.0/974-crystax.patch
+++ b/packages/gcc-linaro/7.1-2017.05/974-crystax.patch
diff --git a/patches/gcc/7.1.0/975-crystax.patch b/packages/gcc-linaro/7.1-2017.05/975-crystax.patch
index 9efc2a4..9efc2a4 100644
--- a/patches/gcc/7.1.0/975-crystax.patch
+++ b/packages/gcc-linaro/7.1-2017.05/975-crystax.patch
diff --git a/patches/gcc/7.1.0/976-crystax.patch b/packages/gcc-linaro/7.1-2017.05/976-crystax.patch
index 790d4a9..790d4a9 100644
--- a/patches/gcc/7.1.0/976-crystax.patch
+++ b/packages/gcc-linaro/7.1-2017.05/976-crystax.patch
diff --git a/patches/gcc/7.1.0/977-crystax.patch b/packages/gcc-linaro/7.1-2017.05/977-crystax.patch
index 0211d72..0211d72 100644
--- a/patches/gcc/7.1.0/977-crystax.patch
+++ b/packages/gcc-linaro/7.1-2017.05/977-crystax.patch
diff --git a/packages/gcc-linaro/7.1-2017.05/version.desc b/packages/gcc-linaro/7.1-2017.05/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gcc-linaro/7.1-2017.05/version.desc
diff --git a/packages/gcc-linaro/package.desc b/packages/gcc-linaro/package.desc
new file mode 100644
index 0000000..fd475c1
--- /dev/null
+++ b/packages/gcc-linaro/package.desc
@@ -0,0 +1,6 @@
+master='gcc'
+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/patches/gcc/4.8.5/001_gcc_bug_62231.patch b/packages/gcc/4.8.5/001_gcc_bug_62231.patch
index e7c9cf9..e7c9cf9 100644
--- a/patches/gcc/4.8.5/001_gcc_bug_62231.patch
+++ b/packages/gcc/4.8.5/001_gcc_bug_62231.patch
diff --git a/patches/gcc/4.8.5/002_gcc_bug_62231.patch b/packages/gcc/4.8.5/002_gcc_bug_62231.patch
index b970ebc..b970ebc 100644
--- a/patches/gcc/4.8.5/002_gcc_bug_62231.patch
+++ b/packages/gcc/4.8.5/002_gcc_bug_62231.patch
diff --git a/patches/gcc/4.9.4/100-uclibc-conf.patch b/packages/gcc/4.8.5/100-uclibc-conf.patch
index d56bf0a..d56bf0a 100644
--- a/patches/gcc/4.9.4/100-uclibc-conf.patch
+++ b/packages/gcc/4.8.5/100-uclibc-conf.patch
diff --git a/patches/gcc/4.9.4/1000-libtool-leave-framework-alone.patch b/packages/gcc/4.8.5/1000-libtool-leave-framework-alone.patch
index 525592e..525592e 100644
--- a/patches/gcc/4.9.4/1000-libtool-leave-framework-alone.patch
+++ b/packages/gcc/4.8.5/1000-libtool-leave-framework-alone.patch
diff --git a/patches/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional b/packages/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional
index b7094fe..b7094fe 100644
--- a/patches/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional
+++ b/packages/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional
diff --git a/patches/gcc/6.3.0/111-alpha-bad-eh_frame.patch b/packages/gcc/4.8.5/111-alpha-bad-eh_frame.patch
index 93f6e94..93f6e94 100644
--- a/patches/gcc/6.3.0/111-alpha-bad-eh_frame.patch
+++ b/packages/gcc/4.8.5/111-alpha-bad-eh_frame.patch
diff --git a/patches/gcc/4.8.5/111-pr65730.patch b/packages/gcc/4.8.5/111-pr65730.patch
index f195e30..f195e30 100644
--- a/patches/gcc/4.8.5/111-pr65730.patch
+++ b/packages/gcc/4.8.5/111-pr65730.patch
diff --git a/patches/gcc/4.9.4/130-pr43538.patch b/packages/gcc/4.8.5/130-pr43538.patch
index 19e57bb..19e57bb 100644
--- a/patches/gcc/4.9.4/130-pr43538.patch
+++ b/packages/gcc/4.8.5/130-pr43538.patch
diff --git a/patches/gcc/4.9.4/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch b/packages/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
index 1c49fb0..1c49fb0 100644
--- a/patches/gcc/4.9.4/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
+++ b/packages/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
diff --git a/patches/gcc/4.8.5/132-build_gcc-5_with_gcc-6.patch b/packages/gcc/4.8.5/132-build_gcc-5_with_gcc-6.patch
index ac1d846..ac1d846 100644
--- a/patches/gcc/4.8.5/132-build_gcc-5_with_gcc-6.patch
+++ b/packages/gcc/4.8.5/132-build_gcc-5_with_gcc-6.patch
diff --git a/patches/gcc/4.9.4/301-missing-execinfo_h.patch b/packages/gcc/4.8.5/301-missing-execinfo_h.patch
index 00efda2..00efda2 100644
--- a/patches/gcc/4.9.4/301-missing-execinfo_h.patch
+++ b/packages/gcc/4.8.5/301-missing-execinfo_h.patch
diff --git a/patches/gcc/4.8.5/305-libmudflap-susv3-legacy.patch b/packages/gcc/4.8.5/305-libmudflap-susv3-legacy.patch
index 35d5f50..35d5f50 100644
--- a/patches/gcc/4.8.5/305-libmudflap-susv3-legacy.patch
+++ b/packages/gcc/4.8.5/305-libmudflap-susv3-legacy.patch
diff --git a/patches/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index 3cf66b2..3cf66b2 100644
--- a/patches/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/patches/gcc/4.8.5/810-arm-softfloat-libgcc.patch b/packages/gcc/4.8.5/810-arm-softfloat-libgcc.patch
index c8cb377..c8cb377 100644
--- a/patches/gcc/4.8.5/810-arm-softfloat-libgcc.patch
+++ b/packages/gcc/4.8.5/810-arm-softfloat-libgcc.patch
diff --git a/patches/gcc/4.9.4/830-arm_unbreak_armv4t.patch b/packages/gcc/4.8.5/830-arm_unbreak_armv4t.patch
index 37f8f2a..37f8f2a 100644
--- a/patches/gcc/4.9.4/830-arm_unbreak_armv4t.patch
+++ b/packages/gcc/4.8.5/830-arm_unbreak_armv4t.patch
diff --git a/patches/gcc/4.8.5/841-PR57717-E500v2.patch b/packages/gcc/4.8.5/841-PR57717-E500v2.patch
index a011e24..a011e24 100644
--- a/patches/gcc/4.8.5/841-PR57717-E500v2.patch
+++ b/packages/gcc/4.8.5/841-PR57717-E500v2.patch
diff --git a/patches/gcc/4.8.5/842-PR60155.patch b/packages/gcc/4.8.5/842-PR60155.patch
index 7bc2122..7bc2122 100644
--- a/patches/gcc/4.8.5/842-PR60155.patch
+++ b/packages/gcc/4.8.5/842-PR60155.patch
diff --git a/patches/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch b/packages/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch
index afa650c..afa650c 100644
--- a/patches/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch
+++ b/packages/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch
diff --git a/patches/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch b/packages/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch
index 792976f..792976f 100644
--- a/patches/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch
+++ b/packages/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch
diff --git a/patches/gcc/4.8.5/851-PR-other-56780.patch b/packages/gcc/4.8.5/851-PR-other-56780.patch
index feb4339..feb4339 100644
--- a/patches/gcc/4.8.5/851-PR-other-56780.patch
+++ b/packages/gcc/4.8.5/851-PR-other-56780.patch
diff --git a/patches/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch b/packages/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch
index aa1376c..aa1376c 100644
--- a/patches/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch
+++ b/packages/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch
diff --git a/patches/gcc/4.9.4/871-xtensa-reimplement-register-spilling.patch b/packages/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch
index abc7a08..abc7a08 100644
--- a/patches/gcc/4.9.4/871-xtensa-reimplement-register-spilling.patch
+++ b/packages/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch
diff --git a/patches/gcc/4.9.4/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/packages/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
index f23a5c0..f23a5c0 100644
--- a/patches/gcc/4.9.4/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
+++ b/packages/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
diff --git a/patches/gcc/4.9.4/873-xtensa-fix-_Unwind_GetCFA.patch b/packages/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch
index dc40513..dc40513 100644
--- a/patches/gcc/4.9.4/873-xtensa-fix-_Unwind_GetCFA.patch
+++ b/packages/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch
diff --git a/patches/gcc/4.8.5/874-gcc-xtensa-fix-fprintf-format-specifiers.patch b/packages/gcc/4.8.5/874-gcc-xtensa-fix-fprintf-format-specifiers.patch
index 6013fef..6013fef 100644
--- a/patches/gcc/4.8.5/874-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ b/packages/gcc/4.8.5/874-gcc-xtensa-fix-fprintf-format-specifiers.patch
diff --git a/packages/gcc/4.8.5/875-xtensa-fix-PR-target-82181.patch b/packages/gcc/4.8.5/875-xtensa-fix-PR-target-82181.patch
new file mode 100644
index 0000000..0a011a6
--- /dev/null
+++ b/packages/gcc/4.8.5/875-xtensa-fix-PR-target-82181.patch
@@ -0,0 +1,31 @@
+From 91f3a82de1e43362a0ab2cb2e1fd6b89c5a00525 Mon Sep 17 00:00:00 2001
+From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 11 Sep 2017 21:53:38 +0000
+Subject: [PATCH] xtensa: fix PR target/82181
+
+2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
+gcc/
+ Backport from mainline
+ * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
+ words of DImode object are reachable by xtensa_uimm8x4 access.
+
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ gcc/config/xtensa/xtensa.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
+index 466adb5103ca..3ba2965ecf5e 100644
+--- a/gcc/config/xtensa/xtensa.c
++++ b/gcc/config/xtensa/xtensa.c
+@@ -599,6 +599,7 @@ xtensa_mem_offset (unsigned v, enum machine_mode mode)
+ case HImode:
+ return xtensa_uimm8x2 (v);
+
++ case DImode:
+ case DFmode:
+ return (xtensa_uimm8x4 (v) && xtensa_uimm8x4 (v + 4));
+
+--
+2.1.4
+
diff --git a/patches/gcc/4.8.5/900-musl-support.patch b/packages/gcc/4.8.5/900-musl-support.patch
index 6743a88..6743a88 100644
--- a/patches/gcc/4.8.5/900-musl-support.patch
+++ b/packages/gcc/4.8.5/900-musl-support.patch
diff --git a/patches/gcc/4.8.5/950-cygwin64.patch b/packages/gcc/4.8.5/950-cygwin64.patch
index 67182ee..67182ee 100644
--- a/patches/gcc/4.8.5/950-cygwin64.patch
+++ b/packages/gcc/4.8.5/950-cygwin64.patch
diff --git a/packages/gcc/4.8.5/version.desc b/packages/gcc/4.8.5/version.desc
new file mode 100644
index 0000000..f26b5a2
--- /dev/null
+++ b/packages/gcc/4.8.5/version.desc
@@ -0,0 +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/patches/gcc/4.9.4/001-gcc_bug_62231.patch b/packages/gcc/4.9.4/001-gcc_bug_62231.patch
index e7c9cf9..e7c9cf9 100644
--- a/patches/gcc/4.9.4/001-gcc_bug_62231.patch
+++ b/packages/gcc/4.9.4/001-gcc_bug_62231.patch
diff --git a/patches/gcc/4.9.4/002-gcc_bug_62231.patch b/packages/gcc/4.9.4/002-gcc_bug_62231.patch
index b970ebc..b970ebc 100644
--- a/patches/gcc/4.9.4/002-gcc_bug_62231.patch
+++ b/packages/gcc/4.9.4/002-gcc_bug_62231.patch
diff --git a/patches/gcc/4.8.5/100-uclibc-conf.patch b/packages/gcc/4.9.4/100-uclibc-conf.patch
index d56bf0a..d56bf0a 100644
--- a/patches/gcc/4.8.5/100-uclibc-conf.patch
+++ b/packages/gcc/4.9.4/100-uclibc-conf.patch
diff --git a/patches/gcc/4.8.5/1000-libtool-leave-framework-alone.patch b/packages/gcc/4.9.4/1000-libtool-leave-framework-alone.patch
index 525592e..525592e 100644
--- a/patches/gcc/4.8.5/1000-libtool-leave-framework-alone.patch
+++ b/packages/gcc/4.9.4/1000-libtool-leave-framework-alone.patch
diff --git a/patches/gcc/4.9.4/1000-powerpc-link-with-math-lib.patch.conditional b/packages/gcc/4.9.4/1000-powerpc-link-with-math-lib.patch.conditional
index 5e0484f..5e0484f 100644
--- a/patches/gcc/4.9.4/1000-powerpc-link-with-math-lib.patch.conditional
+++ b/packages/gcc/4.9.4/1000-powerpc-link-with-math-lib.patch.conditional
diff --git a/patches/gcc/4.9.4/1100-msp430-string-literals.patch b/packages/gcc/4.9.4/1100-msp430-string-literals.patch
index 346842e..346842e 100644
--- a/patches/gcc/4.9.4/1100-msp430-string-literals.patch
+++ b/packages/gcc/4.9.4/1100-msp430-string-literals.patch
diff --git a/patches/gcc/5.4.0/111-alpha-bad-eh_frame.patch b/packages/gcc/4.9.4/111-alpha-bad-eh_frame.patch
index 93f6e94..93f6e94 100644
--- a/patches/gcc/5.4.0/111-alpha-bad-eh_frame.patch
+++ b/packages/gcc/4.9.4/111-alpha-bad-eh_frame.patch
diff --git a/patches/gcc/4.9.4/111-pr65730.patch b/packages/gcc/4.9.4/111-pr65730.patch
index 8a41fd2..8a41fd2 100644
--- a/patches/gcc/4.9.4/111-pr65730.patch
+++ b/packages/gcc/4.9.4/111-pr65730.patch
diff --git a/patches/gcc/4.9.4/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch b/packages/gcc/4.9.4/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
index bb77c4b..bb77c4b 100644
--- a/patches/gcc/4.9.4/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
+++ b/packages/gcc/4.9.4/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
diff --git a/patches/gcc/4.8.5/130-pr43538.patch b/packages/gcc/4.9.4/130-pr43538.patch
index 19e57bb..19e57bb 100644
--- a/patches/gcc/4.8.5/130-pr43538.patch
+++ b/packages/gcc/4.9.4/130-pr43538.patch
diff --git a/patches/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch b/packages/gcc/4.9.4/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
index 1c49fb0..1c49fb0 100644
--- a/patches/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
+++ b/packages/gcc/4.9.4/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
diff --git a/patches/gcc/4.9.4/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch b/packages/gcc/4.9.4/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch
index 55f3228..55f3228 100644
--- a/patches/gcc/4.9.4/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch
+++ b/packages/gcc/4.9.4/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch
diff --git a/patches/gcc/4.8.5/301-missing-execinfo_h.patch b/packages/gcc/4.9.4/301-missing-execinfo_h.patch
index 00efda2..00efda2 100644
--- a/patches/gcc/4.8.5/301-missing-execinfo_h.patch
+++ b/packages/gcc/4.9.4/301-missing-execinfo_h.patch
diff --git a/patches/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index c3bab15..c3bab15 100644
--- a/patches/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/patches/gcc/6.3.0/810-arm-softfloat-libgcc.patch b/packages/gcc/4.9.4/810-arm-softfloat-libgcc.patch
index 5efa7fd..5efa7fd 100644
--- a/patches/gcc/6.3.0/810-arm-softfloat-libgcc.patch
+++ b/packages/gcc/4.9.4/810-arm-softfloat-libgcc.patch
diff --git a/patches/gcc/4.8.5/830-arm_unbreak_armv4t.patch b/packages/gcc/4.9.4/830-arm_unbreak_armv4t.patch
index 37f8f2a..37f8f2a 100644
--- a/patches/gcc/4.8.5/830-arm_unbreak_armv4t.patch
+++ b/packages/gcc/4.9.4/830-arm_unbreak_armv4t.patch
diff --git a/patches/gcc/4.9.4/840-microblaze-enable-dwarf-eh-support.patch b/packages/gcc/4.9.4/840-microblaze-enable-dwarf-eh-support.patch
index 03fc47f..03fc47f 100644
--- a/patches/gcc/4.9.4/840-microblaze-enable-dwarf-eh-support.patch
+++ b/packages/gcc/4.9.4/840-microblaze-enable-dwarf-eh-support.patch
diff --git a/patches/gcc/4.9.4/850-libstdcxx-uclibc-c99.patch b/packages/gcc/4.9.4/850-libstdcxx-uclibc-c99.patch
index 533d01f..533d01f 100644
--- a/patches/gcc/4.9.4/850-libstdcxx-uclibc-c99.patch
+++ b/packages/gcc/4.9.4/850-libstdcxx-uclibc-c99.patch
diff --git a/patches/gcc/4.9.4/860-cilk-wchar.patch b/packages/gcc/4.9.4/860-cilk-wchar.patch
index 1837405..1837405 100644
--- a/patches/gcc/4.9.4/860-cilk-wchar.patch
+++ b/packages/gcc/4.9.4/860-cilk-wchar.patch
diff --git a/patches/gcc/4.9.4/870-xtensa-add-mauto-litpools-option.patch b/packages/gcc/4.9.4/870-xtensa-add-mauto-litpools-option.patch
index 98c7b3f..98c7b3f 100644
--- a/patches/gcc/4.9.4/870-xtensa-add-mauto-litpools-option.patch
+++ b/packages/gcc/4.9.4/870-xtensa-add-mauto-litpools-option.patch
diff --git a/patches/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch b/packages/gcc/4.9.4/871-xtensa-reimplement-register-spilling.patch
index abc7a08..abc7a08 100644
--- a/patches/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch
+++ b/packages/gcc/4.9.4/871-xtensa-reimplement-register-spilling.patch
diff --git a/patches/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/packages/gcc/4.9.4/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
index f23a5c0..f23a5c0 100644
--- a/patches/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
+++ b/packages/gcc/4.9.4/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
diff --git a/patches/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch b/packages/gcc/4.9.4/873-xtensa-fix-_Unwind_GetCFA.patch
index dc40513..dc40513 100644
--- a/patches/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch
+++ b/packages/gcc/4.9.4/873-xtensa-fix-_Unwind_GetCFA.patch
diff --git a/patches/gcc/4.9.4/874-xtensa-add-uclinux-support.patch b/packages/gcc/4.9.4/874-xtensa-add-uclinux-support.patch
index 881aec0..881aec0 100644
--- a/patches/gcc/4.9.4/874-xtensa-add-uclinux-support.patch
+++ b/packages/gcc/4.9.4/874-xtensa-add-uclinux-support.patch
diff --git a/patches/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch b/packages/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch
index 052ffc3..052ffc3 100644
--- a/patches/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ b/packages/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch
diff --git a/packages/gcc/4.9.4/876-xtensa-fix-PR-target-82181.patch b/packages/gcc/4.9.4/876-xtensa-fix-PR-target-82181.patch
new file mode 100644
index 0000000..a613bb3
--- /dev/null
+++ b/packages/gcc/4.9.4/876-xtensa-fix-PR-target-82181.patch
@@ -0,0 +1,31 @@
+From c8fad280eb4cbfe2711e6715aed5749ff400bb80 Mon Sep 17 00:00:00 2001
+From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 11 Sep 2017 21:53:38 +0000
+Subject: [PATCH] xtensa: fix PR target/82181
+
+2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
+gcc/
+ Backport from mainline
+ * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
+ words of DImode object are reachable by xtensa_uimm8x4 access.
+
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ gcc/config/xtensa/xtensa.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
+index 3c0096113775..3eb4db85b971 100644
+--- a/gcc/config/xtensa/xtensa.c
++++ b/gcc/config/xtensa/xtensa.c
+@@ -612,6 +612,7 @@ xtensa_mem_offset (unsigned v, enum machine_mode mode)
+ case HImode:
+ return xtensa_uimm8x2 (v);
+
++ case DImode:
+ case DFmode:
+ return (xtensa_uimm8x4 (v) && xtensa_uimm8x4 (v + 4));
+
+--
+2.1.4
+
diff --git a/patches/gcc/4.9.4/880-nios2_legitimize_address.patch b/packages/gcc/4.9.4/880-nios2_legitimize_address.patch
index 4623f29..4623f29 100644
--- a/patches/gcc/4.9.4/880-nios2_legitimize_address.patch
+++ b/packages/gcc/4.9.4/880-nios2_legitimize_address.patch
diff --git a/patches/gcc/4.9.4/890-fix-m68k-compile.patch b/packages/gcc/4.9.4/890-fix-m68k-compile.patch
index 140977b..140977b 100644
--- a/patches/gcc/4.9.4/890-fix-m68k-compile.patch
+++ b/packages/gcc/4.9.4/890-fix-m68k-compile.patch
diff --git a/patches/gcc/4.9.4/891-fix-m68k-uclinux.patch b/packages/gcc/4.9.4/891-fix-m68k-uclinux.patch
index 4347642..4347642 100644
--- a/patches/gcc/4.9.4/891-fix-m68k-uclinux.patch
+++ b/packages/gcc/4.9.4/891-fix-m68k-uclinux.patch
diff --git a/patches/gcc/4.9.4/900-musl-support.patch b/packages/gcc/4.9.4/900-musl-support.patch
index a862d01..a862d01 100644
--- a/patches/gcc/4.9.4/900-musl-support.patch
+++ b/packages/gcc/4.9.4/900-musl-support.patch
diff --git a/patches/gcc/4.9.4/901-microblaze-uclibc.patch b/packages/gcc/4.9.4/901-microblaze-uclibc.patch
index 82c44e1..82c44e1 100644
--- a/patches/gcc/4.9.4/901-microblaze-uclibc.patch
+++ b/packages/gcc/4.9.4/901-microblaze-uclibc.patch
diff --git a/patches/gcc/4.9.4/930-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/4.9.4/930-libgcc-disable-split-stack-nothreads.patch
index 670cf8d..670cf8d 100644
--- a/patches/gcc/4.9.4/930-libgcc-disable-split-stack-nothreads.patch
+++ b/packages/gcc/4.9.4/930-libgcc-disable-split-stack-nothreads.patch
diff --git a/patches/gcc/4.9.4/940-uclinux-enable-threads.patch b/packages/gcc/4.9.4/940-uclinux-enable-threads.patch
index 5108147..5108147 100644
--- a/patches/gcc/4.9.4/940-uclinux-enable-threads.patch
+++ b/packages/gcc/4.9.4/940-uclinux-enable-threads.patch
diff --git a/packages/gcc/4.9.4/version.desc b/packages/gcc/4.9.4/version.desc
new file mode 100644
index 0000000..d44e333
--- /dev/null
+++ 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/patches/gcc/6.3.0/100-uclibc-conf.patch b/packages/gcc/5.4.0/100-uclibc-conf.patch
index 73d1f0d..73d1f0d 100644
--- a/patches/gcc/6.3.0/100-uclibc-conf.patch
+++ b/packages/gcc/5.4.0/100-uclibc-conf.patch
diff --git a/patches/gcc/5.4.0/1000-libtool-leave-framework-alone.patch b/packages/gcc/5.4.0/1000-libtool-leave-framework-alone.patch
index 0f4912a..0f4912a 100644
--- a/patches/gcc/5.4.0/1000-libtool-leave-framework-alone.patch
+++ b/packages/gcc/5.4.0/1000-libtool-leave-framework-alone.patch
diff --git a/patches/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch b/packages/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch
index 3304532..3304532 100644
--- a/patches/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch
+++ b/packages/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch
diff --git a/patches/gcc/5.4.0/1100-msp430-string-literals.patch b/packages/gcc/5.4.0/1100-msp430-string-literals.patch
index 819d6d2..819d6d2 100644
--- a/patches/gcc/5.4.0/1100-msp430-string-literals.patch
+++ b/packages/gcc/5.4.0/1100-msp430-string-literals.patch
diff --git a/patches/gcc/4.9.4/111-alpha-bad-eh_frame.patch b/packages/gcc/5.4.0/111-alpha-bad-eh_frame.patch
index 93f6e94..93f6e94 100644
--- a/patches/gcc/4.9.4/111-alpha-bad-eh_frame.patch
+++ b/packages/gcc/5.4.0/111-alpha-bad-eh_frame.patch
diff --git a/patches/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch b/packages/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
index c11ad35..c11ad35 100644
--- a/patches/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
+++ b/packages/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
diff --git a/patches/gcc/6.3.0/301-missing-execinfo_h.patch b/packages/gcc/5.4.0/301-missing-execinfo_h.patch
index 2d0e7ba..2d0e7ba 100644
--- a/patches/gcc/6.3.0/301-missing-execinfo_h.patch
+++ b/packages/gcc/5.4.0/301-missing-execinfo_h.patch
diff --git a/patches/gcc/6.3.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index d8986d5..d8986d5 100644
--- a/patches/gcc/6.3.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/patches/gcc/6.3.0/380-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
index 12ef48e..12ef48e 100644
--- a/patches/gcc/6.3.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
+++ b/packages/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
diff --git a/patches/gcc/5.4.0/810-arm-softfloat-libgcc.patch b/packages/gcc/5.4.0/810-arm-softfloat-libgcc.patch
index 5efa7fd..5efa7fd 100644
--- a/patches/gcc/5.4.0/810-arm-softfloat-libgcc.patch
+++ b/packages/gcc/5.4.0/810-arm-softfloat-libgcc.patch
diff --git a/patches/gcc/6.3.0/830-arm_unbreak_armv4t.patch b/packages/gcc/5.4.0/830-arm_unbreak_armv4t.patch
index b730059..b730059 100644
--- a/patches/gcc/6.3.0/830-arm_unbreak_armv4t.patch
+++ b/packages/gcc/5.4.0/830-arm_unbreak_armv4t.patch
diff --git a/patches/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch b/packages/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch
index 9d29090..9d29090 100644
--- a/patches/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch
+++ b/packages/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch
diff --git a/patches/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch b/packages/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch
index 9e97d94..9e97d94 100644
--- a/patches/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch
+++ b/packages/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch
diff --git a/patches/gcc/6.3.0/860-cilk-wchar.patch b/packages/gcc/5.4.0/860-cilk-wchar.patch
index 1d9916f..1d9916f 100644
--- a/patches/gcc/6.3.0/860-cilk-wchar.patch
+++ b/packages/gcc/5.4.0/860-cilk-wchar.patch
diff --git a/patches/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch b/packages/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch
index aa1376c..aa1376c 100644
--- a/patches/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch
+++ b/packages/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch
diff --git a/patches/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch b/packages/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch
index 4056f8b..4056f8b 100644
--- a/patches/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch
+++ b/packages/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch
diff --git a/patches/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/packages/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
index 9707f68..9707f68 100644
--- a/patches/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
+++ b/packages/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
diff --git a/patches/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch b/packages/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch
index 2d8eb7c..2d8eb7c 100644
--- a/patches/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch
+++ b/packages/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch
diff --git a/patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch b/packages/gcc/5.4.0/874-xtensa-add-uclinux-support.patch
index 23db3d8..23db3d8 100644
--- a/patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch
+++ b/packages/gcc/5.4.0/874-xtensa-add-uclinux-support.patch
diff --git a/patches/gcc/5.4.0/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch b/packages/gcc/5.4.0/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch
index d128596..d128596 100644
--- a/patches/gcc/5.4.0/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch
+++ b/packages/gcc/5.4.0/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch
diff --git a/patches/gcc/5.4.0/876-xtensa-fix-libgcc-build-with-text-section-literals.patch b/packages/gcc/5.4.0/876-xtensa-fix-libgcc-build-with-text-section-literals.patch
index 4b2334a..4b2334a 100644
--- a/patches/gcc/5.4.0/876-xtensa-fix-libgcc-build-with-text-section-literals.patch
+++ b/packages/gcc/5.4.0/876-xtensa-fix-libgcc-build-with-text-section-literals.patch
diff --git a/patches/gcc/5.4.0/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch b/packages/gcc/5.4.0/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
index 6e0ce6e..6e0ce6e 100644
--- a/patches/gcc/5.4.0/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
+++ b/packages/gcc/5.4.0/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
diff --git a/patches/gcc/5.4.0/878-xtensa-Fix-PR-target-78603.patch b/packages/gcc/5.4.0/878-xtensa-Fix-PR-target-78603.patch
index 4646d3c..4646d3c 100644
--- a/patches/gcc/5.4.0/878-xtensa-Fix-PR-target-78603.patch
+++ b/packages/gcc/5.4.0/878-xtensa-Fix-PR-target-78603.patch
diff --git a/patches/gcc/5.4.0/879-gcc-xtensa-fix-fprintf-format-specifiers.patch b/packages/gcc/5.4.0/879-gcc-xtensa-fix-fprintf-format-specifiers.patch
index e75e258..e75e258 100644
--- a/patches/gcc/5.4.0/879-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ b/packages/gcc/5.4.0/879-gcc-xtensa-fix-fprintf-format-specifiers.patch
diff --git a/packages/gcc/5.4.0/880-xtensa-fix-PR-target-82181.patch b/packages/gcc/5.4.0/880-xtensa-fix-PR-target-82181.patch
new file mode 100644
index 0000000..b8c2263
--- /dev/null
+++ b/packages/gcc/5.4.0/880-xtensa-fix-PR-target-82181.patch
@@ -0,0 +1,31 @@
+From 82314225ca735a726d9e14dd69354814240419e1 Mon Sep 17 00:00:00 2001
+From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 11 Sep 2017 21:53:38 +0000
+Subject: [PATCH] xtensa: fix PR target/82181
+
+2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
+gcc/
+ Backport from mainline
+ * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
+ words of DImode object are reachable by xtensa_uimm8x4 access.
+
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ gcc/config/xtensa/xtensa.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
+index 8e62d631bce0..a30aa1bcfc33 100644
+--- a/gcc/config/xtensa/xtensa.c
++++ b/gcc/config/xtensa/xtensa.c
+@@ -637,6 +637,7 @@ xtensa_mem_offset (unsigned v, machine_mode mode)
+ case HImode:
+ return xtensa_uimm8x2 (v);
+
++ case DImode:
+ case DFmode:
+ return (xtensa_uimm8x4 (v) && xtensa_uimm8x4 (v + 4));
+
+--
+2.1.4
+
diff --git a/patches/gcc/6.3.0/890-fix-m68k-compile.patch b/packages/gcc/5.4.0/890-fix-m68k-compile.patch
index 6e63de0..6e63de0 100644
--- a/patches/gcc/6.3.0/890-fix-m68k-compile.patch
+++ b/packages/gcc/5.4.0/890-fix-m68k-compile.patch
diff --git a/patches/gcc/6.3.0/891-fix-m68k-uclinux.patch b/packages/gcc/5.4.0/891-fix-m68k-uclinux.patch
index 4e186bd..4e186bd 100644
--- a/patches/gcc/6.3.0/891-fix-m68k-uclinux.patch
+++ b/packages/gcc/5.4.0/891-fix-m68k-uclinux.patch
diff --git a/patches/gcc/5.4.0/892-microblaze-uclibc.patch b/packages/gcc/5.4.0/892-microblaze-uclibc.patch
index a8eb5a6..a8eb5a6 100644
--- a/patches/gcc/5.4.0/892-microblaze-uclibc.patch
+++ b/packages/gcc/5.4.0/892-microblaze-uclibc.patch
diff --git a/patches/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch b/packages/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch
index fdf4ee7..fdf4ee7 100644
--- a/patches/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch
+++ b/packages/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch
diff --git a/patches/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch b/packages/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch
index 13c08d6..13c08d6 100644
--- a/patches/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch
+++ b/packages/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch
diff --git a/patches/gcc/5.4.0/902-unwind-fix-for-musl.patch b/packages/gcc/5.4.0/902-unwind-fix-for-musl.patch
index ef47054..ef47054 100644
--- a/patches/gcc/5.4.0/902-unwind-fix-for-musl.patch
+++ b/packages/gcc/5.4.0/902-unwind-fix-for-musl.patch
diff --git a/patches/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch b/packages/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
index c852131..c852131 100644
--- a/patches/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
+++ b/packages/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
diff --git a/patches/gcc/5.4.0/904-musl-libc-config.patch b/packages/gcc/5.4.0/904-musl-libc-config.patch
index 8549140..8549140 100644
--- a/patches/gcc/5.4.0/904-musl-libc-config.patch
+++ b/packages/gcc/5.4.0/904-musl-libc-config.patch
diff --git a/patches/gcc/5.4.0/905-add-musl-support-to-gcc.patch b/packages/gcc/5.4.0/905-add-musl-support-to-gcc.patch
index 92e7436..92e7436 100644
--- a/patches/gcc/5.4.0/905-add-musl-support-to-gcc.patch
+++ b/packages/gcc/5.4.0/905-add-musl-support-to-gcc.patch
diff --git a/patches/gcc/5.4.0/906-mips-musl-support.patch b/packages/gcc/5.4.0/906-mips-musl-support.patch
index 6b473f9..6b473f9 100644
--- a/patches/gcc/5.4.0/906-mips-musl-support.patch
+++ b/packages/gcc/5.4.0/906-mips-musl-support.patch
diff --git a/patches/gcc/5.4.0/907-x86-musl-support.patch b/packages/gcc/5.4.0/907-x86-musl-support.patch
index 3f2fe5d..3f2fe5d 100644
--- a/patches/gcc/5.4.0/907-x86-musl-support.patch
+++ b/packages/gcc/5.4.0/907-x86-musl-support.patch
diff --git a/patches/gcc/5.4.0/908-arm-musl-support.patch b/packages/gcc/5.4.0/908-arm-musl-support.patch
index 906355a..906355a 100644
--- a/patches/gcc/5.4.0/908-arm-musl-support.patch
+++ b/packages/gcc/5.4.0/908-arm-musl-support.patch
diff --git a/patches/gcc/5.4.0/909-aarch64-musl-support.patch b/packages/gcc/5.4.0/909-aarch64-musl-support.patch
index 3d032f5..3d032f5 100644
--- a/patches/gcc/5.4.0/909-aarch64-musl-support.patch
+++ b/packages/gcc/5.4.0/909-aarch64-musl-support.patch
diff --git a/patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch b/packages/gcc/5.4.0/910-nios2-bad-multilib-default.patch
index d94697f..d94697f 100644
--- a/patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch
+++ b/packages/gcc/5.4.0/910-nios2-bad-multilib-default.patch
diff --git a/patches/gcc/6.3.0/930-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch
index 07f9a73..07f9a73 100644
--- a/patches/gcc/6.3.0/930-libgcc-disable-split-stack-nothreads.patch
+++ b/packages/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch
diff --git a/patches/gcc/6.3.0/940-uclinux-enable-threads.patch b/packages/gcc/5.4.0/940-uclinux-enable-threads.patch
index 490a55b..490a55b 100644
--- a/patches/gcc/6.3.0/940-uclinux-enable-threads.patch
+++ b/packages/gcc/5.4.0/940-uclinux-enable-threads.patch
diff --git a/packages/gcc/5.4.0/version.desc b/packages/gcc/5.4.0/version.desc
new file mode 100644
index 0000000..d44e333
--- /dev/null
+++ 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/patches/gcc/5.4.0/100-uclibc-conf.patch b/packages/gcc/6.4.0/100-uclibc-conf.patch
index 73d1f0d..73d1f0d 100644
--- a/patches/gcc/5.4.0/100-uclibc-conf.patch
+++ b/packages/gcc/6.4.0/100-uclibc-conf.patch
diff --git a/patches/gcc/6.3.0/1000-libtool-leave-framework-alone.patch b/packages/gcc/6.4.0/1000-libtool-leave-framework-alone.patch
index bce09eb..bce09eb 100644
--- a/patches/gcc/6.3.0/1000-libtool-leave-framework-alone.patch
+++ b/packages/gcc/6.4.0/1000-libtool-leave-framework-alone.patch
diff --git a/patches/gcc/5.4.0/301-missing-execinfo_h.patch b/packages/gcc/6.4.0/301-missing-execinfo_h.patch
index 2d0e7ba..2d0e7ba 100644
--- a/patches/gcc/5.4.0/301-missing-execinfo_h.patch
+++ b/packages/gcc/6.4.0/301-missing-execinfo_h.patch
diff --git a/patches/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc/6.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index d8986d5..d8986d5 100644
--- a/patches/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc/6.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/patches/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/6.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
index 12ef48e..12ef48e 100644
--- a/patches/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
+++ b/packages/gcc/6.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
diff --git a/patches/gcc/4.9.4/810-arm-softfloat-libgcc.patch b/packages/gcc/6.4.0/810-arm-softfloat-libgcc.patch
index 5efa7fd..5efa7fd 100644
--- a/patches/gcc/4.9.4/810-arm-softfloat-libgcc.patch
+++ b/packages/gcc/6.4.0/810-arm-softfloat-libgcc.patch
diff --git a/patches/gcc/5.4.0/830-arm_unbreak_armv4t.patch b/packages/gcc/6.4.0/830-arm_unbreak_armv4t.patch
index b730059..b730059 100644
--- a/patches/gcc/5.4.0/830-arm_unbreak_armv4t.patch
+++ b/packages/gcc/6.4.0/830-arm_unbreak_armv4t.patch
diff --git a/patches/gcc/6.3.0/831-ARM-PR-target-70473-Reduce-size-of-Cortex-A8-automat.patch b/packages/gcc/6.4.0/831-ARM-PR-target-70473-Reduce-size-of-Cortex-A8-automat.patch
index af9fb1d..af9fb1d 100644
--- a/patches/gcc/6.3.0/831-ARM-PR-target-70473-Reduce-size-of-Cortex-A8-automat.patch
+++ b/packages/gcc/6.4.0/831-ARM-PR-target-70473-Reduce-size-of-Cortex-A8-automat.patch
diff --git a/patches/gcc/5.4.0/860-cilk-wchar.patch b/packages/gcc/6.4.0/860-cilk-wchar.patch
index 1d9916f..1d9916f 100644
--- a/patches/gcc/5.4.0/860-cilk-wchar.patch
+++ b/packages/gcc/6.4.0/860-cilk-wchar.patch
diff --git a/packages/gcc/6.4.0/870-xtensa-fix-PR-target-82181.patch b/packages/gcc/6.4.0/870-xtensa-fix-PR-target-82181.patch
new file mode 100644
index 0000000..5fe3841
--- /dev/null
+++ b/packages/gcc/6.4.0/870-xtensa-fix-PR-target-82181.patch
@@ -0,0 +1,31 @@
+From 3bc2ee6886f1619bc6a2257a0775142526b1a57a Mon Sep 17 00:00:00 2001
+From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 11 Sep 2017 21:53:38 +0000
+Subject: [PATCH] xtensa: fix PR target/82181
+
+2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
+gcc/
+ Backport from mainline
+ * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
+ words of DImode object are reachable by xtensa_uimm8x4 access.
+
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ gcc/config/xtensa/xtensa.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
+index 2bdf5ccef979..92fdeb08046d 100644
+--- a/gcc/config/xtensa/xtensa.c
++++ b/gcc/config/xtensa/xtensa.c
+@@ -601,6 +601,7 @@ xtensa_mem_offset (unsigned v, machine_mode mode)
+ case HImode:
+ return xtensa_uimm8x2 (v);
+
++ case DImode:
+ case DFmode:
+ return (xtensa_uimm8x4 (v) && xtensa_uimm8x4 (v + 4));
+
+--
+2.1.4
+
diff --git a/patches/gcc/5.4.0/890-fix-m68k-compile.patch b/packages/gcc/6.4.0/890-fix-m68k-compile.patch
index 6e63de0..6e63de0 100644
--- a/patches/gcc/5.4.0/890-fix-m68k-compile.patch
+++ b/packages/gcc/6.4.0/890-fix-m68k-compile.patch
diff --git a/patches/gcc/5.4.0/891-fix-m68k-uclinux.patch b/packages/gcc/6.4.0/891-fix-m68k-uclinux.patch
index 4e186bd..4e186bd 100644
--- a/patches/gcc/5.4.0/891-fix-m68k-uclinux.patch
+++ b/packages/gcc/6.4.0/891-fix-m68k-uclinux.patch
diff --git a/patches/gcc/6.3.0/892-libgcc-mkmap-symver-support-skip_underscore.patch b/packages/gcc/6.4.0/892-libgcc-mkmap-symver-support-skip_underscore.patch
index 73ee6c5..73ee6c5 100644
--- a/patches/gcc/6.3.0/892-libgcc-mkmap-symver-support-skip_underscore.patch
+++ b/packages/gcc/6.4.0/892-libgcc-mkmap-symver-support-skip_underscore.patch
diff --git a/patches/gcc/6.3.0/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch b/packages/gcc/6.4.0/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch
index 454295d..454295d 100644
--- a/patches/gcc/6.3.0/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch
+++ b/packages/gcc/6.4.0/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch
diff --git a/patches/gcc/6.3.0/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch b/packages/gcc/6.4.0/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
index ce49de7..ce49de7 100644
--- a/patches/gcc/6.3.0/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
+++ b/packages/gcc/6.4.0/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
diff --git a/patches/gcc/6.3.0/895-bfin-define-REENTRANT.patch b/packages/gcc/6.4.0/895-bfin-define-REENTRANT.patch
index e2828a5..e2828a5 100644
--- a/patches/gcc/6.3.0/895-bfin-define-REENTRANT.patch
+++ b/packages/gcc/6.4.0/895-bfin-define-REENTRANT.patch
diff --git a/patches/gcc/6.3.0/900-libgfortran-missing-include.patch b/packages/gcc/6.4.0/900-libgfortran-missing-include.patch
index 1f47469..1f47469 100644
--- a/patches/gcc/6.3.0/900-libgfortran-missing-include.patch
+++ b/packages/gcc/6.4.0/900-libgfortran-missing-include.patch
diff --git a/patches/gcc/6.3.0/910-nios2-bad-multilib-default.patch b/packages/gcc/6.4.0/910-nios2-bad-multilib-default.patch
index 61989e5..61989e5 100644
--- a/patches/gcc/6.3.0/910-nios2-bad-multilib-default.patch
+++ b/packages/gcc/6.4.0/910-nios2-bad-multilib-default.patch
diff --git a/patches/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/6.4.0/930-libgcc-disable-split-stack-nothreads.patch
index 07f9a73..07f9a73 100644
--- a/patches/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch
+++ b/packages/gcc/6.4.0/930-libgcc-disable-split-stack-nothreads.patch
diff --git a/patches/gcc/5.4.0/940-uclinux-enable-threads.patch b/packages/gcc/6.4.0/940-uclinux-enable-threads.patch
index 490a55b..490a55b 100644
--- a/patches/gcc/5.4.0/940-uclinux-enable-threads.patch
+++ b/packages/gcc/6.4.0/940-uclinux-enable-threads.patch
diff --git a/patches/gcc/6.3.0/951-bionic-ndk.patch b/packages/gcc/6.4.0/951-bionic-ndk.patch
index 59c50a8..59c50a8 100644
--- a/patches/gcc/6.3.0/951-bionic-ndk.patch
+++ b/packages/gcc/6.4.0/951-bionic-ndk.patch
diff --git a/patches/gcc/6.3.0/952-bionic-errno.patch b/packages/gcc/6.4.0/952-bionic-errno.patch
index 91f6ca3..91f6ca3 100644
--- a/patches/gcc/6.3.0/952-bionic-errno.patch
+++ b/packages/gcc/6.4.0/952-bionic-errno.patch
diff --git a/patches/gcc/6.3.0/970-crystax.patch b/packages/gcc/6.4.0/970-crystax.patch
index e3109cc..e3109cc 100644
--- a/patches/gcc/6.3.0/970-crystax.patch
+++ b/packages/gcc/6.4.0/970-crystax.patch
diff --git a/patches/gcc/6.3.0/971-crystax.patch b/packages/gcc/6.4.0/971-crystax.patch
index 748a381..748a381 100644
--- a/patches/gcc/6.3.0/971-crystax.patch
+++ b/packages/gcc/6.4.0/971-crystax.patch
diff --git a/patches/gcc/6.3.0/972-crystax.patch b/packages/gcc/6.4.0/972-crystax.patch
index b9077be..b9077be 100644
--- a/patches/gcc/6.3.0/972-crystax.patch
+++ b/packages/gcc/6.4.0/972-crystax.patch
diff --git a/patches/gcc/6.3.0/973-crystax.patch b/packages/gcc/6.4.0/973-crystax.patch
index b96ece3..b96ece3 100644
--- a/patches/gcc/6.3.0/973-crystax.patch
+++ b/packages/gcc/6.4.0/973-crystax.patch
diff --git a/patches/gcc/6.3.0/974-crystax.patch b/packages/gcc/6.4.0/974-crystax.patch
index 9db4f54..9db4f54 100644
--- a/patches/gcc/6.3.0/974-crystax.patch
+++ b/packages/gcc/6.4.0/974-crystax.patch
diff --git a/patches/gcc/6.3.0/975-crystax.patch b/packages/gcc/6.4.0/975-crystax.patch
index 9efc2a4..9efc2a4 100644
--- a/patches/gcc/6.3.0/975-crystax.patch
+++ b/packages/gcc/6.4.0/975-crystax.patch
diff --git a/patches/gcc/6.3.0/976-crystax.patch b/packages/gcc/6.4.0/976-crystax.patch
index 790d4a9..790d4a9 100644
--- a/patches/gcc/6.3.0/976-crystax.patch
+++ b/packages/gcc/6.4.0/976-crystax.patch
diff --git a/patches/gcc/6.3.0/977-crystax.patch b/packages/gcc/6.4.0/977-crystax.patch
index 0211d72..0211d72 100644
--- a/patches/gcc/6.3.0/977-crystax.patch
+++ b/packages/gcc/6.4.0/977-crystax.patch
diff --git a/packages/gcc/6.4.0/version.desc b/packages/gcc/6.4.0/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gcc/6.4.0/version.desc
diff --git a/packages/gcc/7.2.0/100-uclibc-conf.patch b/packages/gcc/7.2.0/100-uclibc-conf.patch
new file mode 100644
index 0000000..73d1f0d
--- /dev/null
+++ b/packages/gcc/7.2.0/100-uclibc-conf.patch
@@ -0,0 +1,15 @@
+Index: b/contrib/regression/objs-gcc.sh
+===================================================================
+--- a/contrib/regression/objs-gcc.sh
++++ b/contrib/regression/objs-gcc.sh
+@@ -106,6 +106,10 @@
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++ make all-gdb all-dejagnu all-ld || exit 1
++ make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+ make bootstrap || exit 1
+ make install || exit 1
diff --git a/packages/gcc/7.2.0/1000-libtool-leave-framework-alone.patch b/packages/gcc/7.2.0/1000-libtool-leave-framework-alone.patch
new file mode 100644
index 0000000..bce09eb
--- /dev/null
+++ b/packages/gcc/7.2.0/1000-libtool-leave-framework-alone.patch
@@ -0,0 +1,14 @@
+--- gcc-6.2.0/libtool-ldflags 2016-12-20 11:13:12.669668125 -0800
++++ gcc-6.2.0/libtool-ldflags 2016-12-20 11:28:34.894826286 -0800
+@@ -36,6 +36,11 @@
+ for arg
+ do
+ case $arg in
++ -framework)
++ # libtool handles this option. It should not be prefixed with
++ # -Xcompiler, as that would split it from the argument that
++ # follows.
++ ;;
+ -f*|--*|-static-lib*|-shared-lib*|-B*)
+ # Libtool does not ascribe any special meaning options
+ # that begin with -f or with a double-dash. So, it will
diff --git a/packages/gcc/7.2.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
new file mode 100644
index 0000000..d8986d5
--- /dev/null
+++ b/packages/gcc/7.2.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
@@ -0,0 +1,160 @@
+diff -urN gcc-5.3.0.orig/config/gcc-plugin.m4 gcc-5.3.0/config/gcc-plugin.m4
+--- gcc-5.3.0.orig/config/gcc-plugin.m4 2015-12-19 14:39:04.120734900 +0000
++++ gcc-5.3.0/config/gcc-plugin.m4 2015-12-20 01:28:45.381965300 +0000
+@@ -20,6 +20,9 @@
+
+ pluginlibs=
+
++ PICFLAG="-fPIC"
++ UNDEFINEDPREAMBLE="extern int X;"
++ UNDEFINEDCODE="return X == 0;"
+ case "${host}" in
+ *-*-darwin*)
+ if test x$build = x$host; then
+@@ -30,6 +33,11 @@
+ export_sym_check=
+ fi
+ ;;
++ *-*-mingw*|*-*-cygwin*|*-*-msys*)
++ PICFLAG=""
++ UNDEFINEDPREAMBLE=""
++ UNDEFINEDCODE=""
++ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+@@ -81,17 +89,17 @@
+ case "${host}" in
+ *-*-darwin*)
+ CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
+- CFLAGS="$CFLAGS -fPIC"
++ CFLAGS="$CFLAGS ${PICFLAG}"
+ LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
+ ;;
+ *)
+- CFLAGS="$CFLAGS -fPIC"
+- LDFLAGS="$LDFLAGS -fPIC -shared"
++ CFLAGS="$CFLAGS ${PICFLAG}"
++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
+ ;;
+ esac
+- AC_MSG_CHECKING([for -fPIC -shared])
++ AC_MSG_CHECKING([for ${PICFLAG} -shared])
+ AC_TRY_LINK(
+- [extern int X;],[return X == 0;],
++ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}],
+ [AC_MSG_RESULT([yes]); have_pic_shared=yes],
+ [AC_MSG_RESULT([no]); have_pic_shared=no])
+ if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
+diff -urN gcc-5.3.0.orig/gcc/configure gcc-5.3.0/gcc/configure
+--- gcc-5.3.0.orig/gcc/configure 2015-12-19 14:40:16.893975900 +0000
++++ gcc-5.3.0/gcc/configure 2015-12-20 01:28:45.472476700 +0000
+@@ -28386,6 +28386,9 @@
+
+ pluginlibs=
+
++ PICFLAG="-fPIC"
++ UNDEFINEDPREAMBLE="extern int X;"
++ UNDEFINEDCODE="return X == 0;"
+ case "${host}" in
+ *-*-darwin*)
+ if test x$build = x$host; then
+@@ -28396,6 +28399,11 @@
+ export_sym_check=
+ fi
+ ;;
++ *-*-mingw*|*-*-cygwin*|*-*-msys*)
++ PICFLAG=""
++ UNDEFINEDPREAMBLE=""
++ UNDEFINEDCODE=""
++ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+@@ -28508,23 +28516,23 @@
+ case "${host}" in
+ *-*-darwin*)
+ CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
+- CFLAGS="$CFLAGS -fPIC"
++ CFLAGS="$CFLAGS ${PICFLAG}"
+ LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
+ ;;
+ *)
+- CFLAGS="$CFLAGS -fPIC"
+- LDFLAGS="$LDFLAGS -fPIC -shared"
++ CFLAGS="$CFLAGS ${PICFLAG}"
++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
+ ;;
+ esac
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
+-$as_echo_n "checking for -fPIC -shared... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
++$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-extern int X;
++${UNDEFINEDPREAMBLE}
+ int
+ main ()
+ {
+-return X == 0;
++${UNDEFINEDCODE}
+ ;
+ return 0;
+ }
+diff -urN gcc-5.3.0.orig/libcc1/configure gcc-5.3.0/libcc1/configure
+--- gcc-5.3.0.orig/libcc1/configure 2015-12-19 14:40:20.855979000 +0000
++++ gcc-5.3.0/libcc1/configure 2015-12-20 01:28:45.504980900 +0000
+@@ -14500,6 +14500,9 @@
+
+ pluginlibs=
+
++ PICFLAG="-fPIC"
++ UNDEFINEDPREAMBLE="extern int X;"
++ UNDEFINEDCODE="return X == 0;"
+ case "${host}" in
+ *-*-darwin*)
+ if test x$build = x$host; then
+@@ -14510,6 +14513,11 @@
+ export_sym_check=
+ fi
+ ;;
++ *-*-mingw*|*-*-cygwin*|*-*-msys*)
++ PICFLAG=""
++ UNDEFINEDPREAMBLE=""
++ UNDEFINEDCODE=""
++ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+@@ -14622,23 +14630,23 @@
+ case "${host}" in
+ *-*-darwin*)
+ CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
+- CFLAGS="$CFLAGS -fPIC"
++ CFLAGS="$CFLAGS ${PICFLAG}"
+ LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
+ ;;
+ *)
+- CFLAGS="$CFLAGS -fPIC"
+- LDFLAGS="$LDFLAGS -fPIC -shared"
++ CFLAGS="$CFLAGS ${PICFLAG}"
++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
+ ;;
+ esac
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
+-$as_echo_n "checking for -fPIC -shared... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
++$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-extern int X;
++${UNDEFINEDPREAMBLE}
+ int
+ main ()
+ {
+-return X == 0;
++${UNDEFINEDCODE}
+ ;
+ return 0;
+ }
diff --git a/packages/gcc/7.2.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
new file mode 100644
index 0000000..12ef48e
--- /dev/null
+++ b/packages/gcc/7.2.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
@@ -0,0 +1,11 @@
+diff -urN gcc-5.3.0.orig/libcc1/connection.cc gcc-5.3.0/libcc1/connection.cc
+--- gcc-5.3.0.orig/libcc1/connection.cc 2015-12-19 14:40:20.860479600 +0000
++++ gcc-5.3.0/libcc1/connection.cc 2015-12-20 01:31:04.346611500 +0000
+@@ -21,6 +21,7 @@
+ #include <string>
+ #include <unistd.h>
+ #include <sys/types.h>
++#include <sys/select.h>
+ #include <string.h>
+ #include <errno.h>
+ #include "marshall.hh"
diff --git a/packages/gcc/7.2.0/810-arm-softfloat-libgcc.patch b/packages/gcc/7.2.0/810-arm-softfloat-libgcc.patch
new file mode 100644
index 0000000..5efa7fd
--- /dev/null
+++ b/packages/gcc/7.2.0/810-arm-softfloat-libgcc.patch
@@ -0,0 +1,30 @@
+Index: b/gcc/config/arm/linux-elf.h
+===================================================================
+--- a/gcc/config/arm/linux-elf.h
++++ b/gcc/config/arm/linux-elf.h
+@@ -60,7 +60,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+
+Index: b/libgcc/config/arm/t-linux
+===================================================================
+--- a/libgcc/config/arm/t-linux
++++ b/libgcc/config/arm/t-linux
+@@ -1,6 +1,11 @@
+ LIB1ASMSRC = arm/lib1funcs.S
+ LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
+- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
++ _arm_addsubdf3 _arm_addsubsf3 \
++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
++ _arm_fixsfsi _arm_fixunssfsi
+
+ # Just for these, we omit the frame pointer since it makes such a big
+ # difference.
diff --git a/packages/gcc/7.2.0/860-cilk-wchar.patch b/packages/gcc/7.2.0/860-cilk-wchar.patch
new file mode 100644
index 0000000..1d9916f
--- /dev/null
+++ b/packages/gcc/7.2.0/860-cilk-wchar.patch
@@ -0,0 +1,56 @@
+[PATCH] cilk: fix build without wchar
+
+When building against uClibc with wchar support disabled, WCHAR_MIN and
+WCHAR_MAX are not defined leading to compilation errors.
+
+Fix it by only including the wchar code if available.
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+Index: b/libcilkrts/include/cilk/reducer_min_max.h
+===================================================================
+--- a/libcilkrts/include/cilk/reducer_min_max.h
++++ b/libcilkrts/include/cilk/reducer_min_max.h
+@@ -3154,7 +3154,9 @@
+ CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN)
+ CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0)
+ CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN)
++#ifdef WCHAR_MIN
+ CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
++#endif
+ CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN)
+ CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0)
+ CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN)
+@@ -3306,7 +3308,9 @@
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN)
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0)
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN)
++#ifdef WCHAR_MIN
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
++#endif
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN)
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0)
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN)
+@@ -3432,7 +3436,9 @@
+ CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX)
+ CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX)
+ CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX)
++#ifdef WCHAR_MAX
+ CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
++#endif
+ CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX)
+ CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX)
+ CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX)
+@@ -3584,7 +3590,9 @@
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX)
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX)
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX)
++#ifdef WCHAR_MAX
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
++#endif
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX)
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX)
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX)
diff --git a/packages/gcc/7.2.0/870-xtensa-fix-PR-target-82181.patch b/packages/gcc/7.2.0/870-xtensa-fix-PR-target-82181.patch
new file mode 100644
index 0000000..7ac7cd9
--- /dev/null
+++ b/packages/gcc/7.2.0/870-xtensa-fix-PR-target-82181.patch
@@ -0,0 +1,31 @@
+From 3ed0c49a8d52e88648c7bb9f21a204b23595a6a9 Mon Sep 17 00:00:00 2001
+From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 11 Sep 2017 21:53:38 +0000
+Subject: [PATCH] xtensa: fix PR target/82181
+
+2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
+gcc/
+ Backport from mainline
+ * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
+ words of DImode object are reachable by xtensa_uimm8x4 access.
+
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ gcc/config/xtensa/xtensa.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
+index 25e4a2894c3b..8c404187107b 100644
+--- a/gcc/config/xtensa/xtensa.c
++++ b/gcc/config/xtensa/xtensa.c
+@@ -605,6 +605,7 @@ xtensa_mem_offset (unsigned v, machine_mode mode)
+ case HImode:
+ return xtensa_uimm8x2 (v);
+
++ case DImode:
+ case DFmode:
+ return (xtensa_uimm8x4 (v) && xtensa_uimm8x4 (v + 4));
+
+--
+2.1.4
+
diff --git a/packages/gcc/7.2.0/891-fix-m68k-uclinux.patch b/packages/gcc/7.2.0/891-fix-m68k-uclinux.patch
new file mode 100644
index 0000000..4e186bd
--- /dev/null
+++ b/packages/gcc/7.2.0/891-fix-m68k-uclinux.patch
@@ -0,0 +1,18 @@
+avoids internal compiler error while compiling linux-atomic.c
+See here:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur gcc-5.3.0.orig/libgcc/config.host gcc-5.3.0/libgcc/config.host
+--- gcc-5.3.0.orig/libgcc/config.host 2015-10-01 14:01:18.000000000 +0200
++++ gcc-5.3.0/libgcc/config.host 2016-04-26 21:30:25.353691745 +0200
+@@ -794,7 +794,7 @@
+ m68k*-*-openbsd*)
+ ;;
+ m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
+- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
++ tmake_file="$tmake_file m68k/t-floatlib"
+ md_unwind_header=m68k/linux-unwind.h
+ ;;
+ m68k-*-linux*) # Motorola m68k's running GNU/Linux
diff --git a/packages/gcc/7.2.0/900-libgfortran-missing-include.patch b/packages/gcc/7.2.0/900-libgfortran-missing-include.patch
new file mode 100644
index 0000000..1f47469
--- /dev/null
+++ b/packages/gcc/7.2.0/900-libgfortran-missing-include.patch
@@ -0,0 +1,10 @@
+--- gcc-6.3.0/libgfortran/io/close.c.org 2017-01-17 09:43:48.395850000 +0100
++++ gcc-6.3.0/libgfortran/io/close.c 2017-01-17 09:21:05.000000000 +0100
+@@ -25,6 +25,7 @@
+ #include "io.h"
+ #include "unix.h"
+ #include <limits.h>
++#include <stdlib.h>
+
+ typedef enum
+ { CLOSE_DELETE, CLOSE_KEEP, CLOSE_UNSPECIFIED }
diff --git a/packages/gcc/7.2.0/910-nios2-bad-multilib-default.patch b/packages/gcc/7.2.0/910-nios2-bad-multilib-default.patch
new file mode 100644
index 0000000..61989e5
--- /dev/null
+++ b/packages/gcc/7.2.0/910-nios2-bad-multilib-default.patch
@@ -0,0 +1,28 @@
+diff -ur gcc-6.2.0.orig/gcc/config/nios2/nios2.h gcc-6.2.0/gcc/config/nios2/nios2.h
+--- gcc-6.2.0.orig/gcc/config/nios2/nios2.h 2016-11-29 10:27:50.364479625 -0800
++++ gcc-6.2.0/gcc/config/nios2/nios2.h 2016-11-29 10:29:55.069624746 -0800
+@@ -63,11 +63,11 @@
+ #if TARGET_ENDIAN_DEFAULT == 0
+ # define ASM_SPEC "%{!meb:-EL} %{meb:-EB} %{march=*:-march=%*}"
+ # define LINK_SPEC_ENDIAN "%{!meb:-EL} %{meb:-EB}"
+-# define MULTILIB_DEFAULTS { "EL" }
++# define MULTILIB_DEFAULTS { "mel" }
+ #else
+ # define ASM_SPEC "%{!mel:-EB} %{mel:-EL} %{march=*:-march=%*}"
+ # define LINK_SPEC_ENDIAN "%{!mel:-EB} %{mel:-EL}"
+-# define MULTILIB_DEFAULTS { "EB" }
++# define MULTILIB_DEFAULTS { "meb" }
+ #endif
+
+ #define LINK_SPEC LINK_SPEC_ENDIAN \
+diff -ur gcc-6.2.0.orig/gcc/config/nios2/t-nios2 gcc-6.2.0/gcc/config/nios2/t-nios2
+--- gcc-6.2.0.orig/gcc/config/nios2/t-nios2 2016-11-29 10:27:50.364479625 -0800
++++ gcc-6.2.0/gcc/config/nios2/t-nios2 2016-11-29 10:29:03.517151014 -0800
+@@ -22,6 +22,5 @@
+ # MULTILIB_DIRNAMES = nomul mulx fpu-60-1 fpu-60-2
+ # MULTILIB_EXCEPTIONS =
+
+-# MULTILIB_OPTIONS += EL/EB
++# MULTILIB_OPTIONS += mel/meb
+ # MULTILIB_DIRNAMES += le be
+-# MULTILIB_MATCHES += EL=mel EB=meb
diff --git a/packages/gcc/7.2.0/930-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/7.2.0/930-libgcc-disable-split-stack-nothreads.patch
new file mode 100644
index 0000000..07f9a73
--- /dev/null
+++ b/packages/gcc/7.2.0/930-libgcc-disable-split-stack-nothreads.patch
@@ -0,0 +1,14 @@
+disable split-stack for non-thread builds
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur gcc-5.3.0.orig/libgcc/config/t-stack gcc-5.3.0/libgcc/config/t-stack
+--- gcc-5.3.0.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200
++++ gcc-5.3.0/libgcc/config/t-stack 2016-03-07 03:25:32.000000000 +0100
+@@ -1,4 +1,6 @@
+ # Makefile fragment to provide generic support for -fsplit-stack.
+ # This should be used in config.host for any host which supports
+ # -fsplit-stack.
++ifeq ($(enable_threads),yes)
+ LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
++endif
diff --git a/packages/gcc/7.2.0/951-bionic-ndk.patch b/packages/gcc/7.2.0/951-bionic-ndk.patch
new file mode 100644
index 0000000..59c50a8
--- /dev/null
+++ b/packages/gcc/7.2.0/951-bionic-ndk.patch
@@ -0,0 +1,58 @@
+commit d38d37bdfe24b7ce1bdcb55642fb6b904718e68f
+Author: Howard Chu <hyc@symas.com>
+Date: Tue Apr 25 19:02:18 2017 -0700
+
+ Fix ctype for newer NDK headers
+
+diff --git a/libstdc++-v3/config/os/bionic/ctype_base.h b/libstdc++-v3/config/os/bionic/ctype_base.h
+index 33978f3..c36e63c 100644
+--- a/libstdc++-v3/config/os/bionic/ctype_base.h
++++ b/libstdc++-v3/config/os/bionic/ctype_base.h
+@@ -28,6 +28,18 @@
+
+ // Information as gleaned from /usr/include/ctype.h
+
++// _CTYPE prefix was added in NDK r14 unified headers
++#ifndef _CTYPE_U
++#define _CTYPE_U _U
++#define _CTYPE_L _L
++#define _CTYPE_D _N
++#define _CTYPE_S _S
++#define _CTYPE_P _P
++#define _CTYPE_C _C
++#define _CTYPE_X _X
++#define _CTYPE_B _B
++#endif
++
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+@@ -41,17 +53,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+ typedef char mask;
+- static const mask upper = _U;
+- static const mask lower = _L;
+- static const mask alpha = _U | _L;
+- static const mask digit = _N;
+- static const mask xdigit = _X | _N;
+- static const mask space = _S;
+- static const mask print = _P | _U | _L | _N | _B;
+- static const mask graph = _P | _U | _L | _N;
+- static const mask cntrl = _C;
+- static const mask punct = _P;
+- static const mask alnum = _U | _L | _N;
++ static const mask upper = _CTYPE_U;
++ static const mask lower = _CTYPE_L;
++ static const mask alpha = _CTYPE_U | _CTYPE_L;
++ static const mask digit = _CTYPE_D;
++ static const mask xdigit = _CTYPE_X | _CTYPE_D;
++ static const mask space = _CTYPE_S;
++ static const mask print = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_D | _CTYPE_B;
++ static const mask graph = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_D;
++ static const mask cntrl = _CTYPE_C;
++ static const mask punct = _CTYPE_P;
++ static const mask alnum = _CTYPE_U | _CTYPE_L | _CTYPE_D;
+ #if __cplusplus >= 201103L
+ static const mask blank = space;
+ #endif
diff --git a/packages/gcc/7.2.0/952-bionic-errno.patch b/packages/gcc/7.2.0/952-bionic-errno.patch
new file mode 100644
index 0000000..91f6ca3
--- /dev/null
+++ b/packages/gcc/7.2.0/952-bionic-errno.patch
@@ -0,0 +1,19 @@
+commit 6cd4ad106ef87a3c58b0c3478e78409b47000de0
+Author: Howard Chu <hyc@symas.com>
+Date: Tue Apr 25 20:17:03 2017 -0700
+
+ Fix, errno is volatile int
+
+diff --git a/libstdc++-v3/src/filesystem/dir.cc b/libstdc++-v3/src/filesystem/dir.cc
+index 6ff12d0..5bbd664 100644
+--- a/libstdc++-v3/src/filesystem/dir.cc
++++ b/libstdc++-v3/src/filesystem/dir.cc
+@@ -147,7 +147,7 @@ fs::_Dir::advance(error_code* ec, directory_options options)
+
+ int err = std::exchange(errno, 0);
+ const auto entp = readdir(dirp);
+- std::swap(errno, err);
++ std::swap((int&)errno, err);
+
+ if (entp)
+ {
diff --git a/packages/gcc/7.2.0/970-crystax.patch b/packages/gcc/7.2.0/970-crystax.patch
new file mode 100644
index 0000000..7324d7f
--- /dev/null
+++ b/packages/gcc/7.2.0/970-crystax.patch
@@ -0,0 +1,553 @@
+commit 080803512c8f6f87c2f1f711170d54033144d628
+Author: Dmitry Moskalchuk <dm@crystax.net>
+Date: Wed Jul 29 11:28:29 2015 +0300
+
+ [android] Apply Android-related modifications
+
+ Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
+
+[Edited: keep libstdc++, drop libcrystax-related modifications]
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index f66e48cd1..1c253496b 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -942,13 +942,17 @@ aarch64*-*-elf | aarch64*-*-rtems*)
+ TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
+ ;;
+ aarch64*-*-linux*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h"
+ tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
++ extra_options="${extra_options} linux-android.opt"
+ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
+ case $target in
+ aarch64_be-*)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+ ;;
++ aarch64*-*-linux-android*)
++ tm_file="${tm_file} aarch64/aarch64-linux-android.h"
++ ;;
+ esac
+ aarch64_multilibs="${with_multilib_list}"
+ if test "$aarch64_multilibs" = "default"; then
+@@ -2055,6 +2059,17 @@ mips*-*-linux*) # Linux MIPS, either endian.
+ tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
+ extra_options="${extra_options} linux-android.opt"
+ case ${target} in
++ mips64*android*)
++ default_mips_arch=mips64r6
++ default_mips_abi=64
++ tm_file="${tm_file} mips/android.h"
++ tmake_file="${tmake_file} mips/t-linux-android64"
++ ;;
++ mips*android*)
++ default_mips_arch=mips32
++ tm_file="${tm_file} mips/android.h"
++ tmake_file="$tmake_file mips/t-linux-android"
++ ;;
+ mipsisa32r6*)
+ default_mips_arch=mips32r6
+ ;;
+diff --git a/gcc/config/aarch64/aarch64-linux-android.h b/gcc/config/aarch64/aarch64-linux-android.h
+new file mode 100644
+index 000000000..db1288fd0
+--- /dev/null
++++ b/gcc/config/aarch64/aarch64-linux-android.h
+@@ -0,0 +1,59 @@
++/* Machine description for AArch64 architecture.
++ Copyright (C) 2014 Free Software Foundation, Inc.
++
++ This file is part of GCC.
++
++ GCC is free software; you can redistribute it and/or modify it
++ under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 3, or (at your option)
++ any later version.
++
++ GCC is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with GCC; see the file COPYING3. If not see
++ <http://www.gnu.org/licenses/>. */
++
++#ifndef GCC_AARCH64_LINUX_ANDROID_H
++#define GCC_AARCH64_LINUX_ANDROID_H
++
++
++#undef TARGET_OS_CPP_BUILTINS
++#define TARGET_OS_CPP_BUILTINS() \
++ do \
++ { \
++ GNU_USER_TARGET_OS_CPP_BUILTINS(); \
++ ANDROID_TARGET_OS_CPP_BUILTINS(); \
++ } \
++ while (0)
++
++#undef LINK_SPEC
++#define LINK_SPEC \
++ LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
++ LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
++
++#undef CC1_SPEC
++#define CC1_SPEC \
++ LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
++ GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC("-fpic"))
++
++#define CC1PLUS_SPEC \
++ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
++
++#undef LIB_SPEC
++#define LIB_SPEC \
++ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
++ GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC " " ANDROID_LIB_SPEC)
++
++#undef STARTFILE_SPEC
++#define STARTFILE_SPEC \
++ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC)
++
++#undef ENDFILE_SPEC
++#define ENDFILE_SPEC \
++ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
++
++#endif /* GCC_AARCH64_LINUX_ANDROID_H */
+diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
+index 5fcaa59a3..6864195ee 100644
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -21,7 +21,14 @@
+ #ifndef GCC_AARCH64_LINUX_H
+ #define GCC_AARCH64_LINUX_H
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++#ifndef RUNTIME_ROOT_PREFIX
++#define RUNTIME_ROOT_PREFIX ""
++#endif
++#define GLIBC_DYNAMIC_LINKER RUNTIME_ROOT_PREFIX "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++#ifdef BIONIC_DYNAMIC_LINKER
++#undef BIONIC_DYNAMIC_LINKER
++#endif
++#define BIONIC_DYNAMIC_LINKER RUNTIME_ROOT_PREFIX "/system/bin/linker64"
+
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
+index ad123dde9..97b059de6 100644
+--- a/gcc/config/arm/arm.h
++++ b/gcc/config/arm/arm.h
+@@ -1888,10 +1888,11 @@ enum arm_auto_incmodes
+
+ #define CASE_VECTOR_PC_RELATIVE (TARGET_THUMB2 \
+ || (TARGET_THUMB1 \
++ && !inline_thumb1_jump_table \
+ && (optimize_size || flag_pic)))
+
+ #define CASE_VECTOR_SHORTEN_MODE(min, max, body) \
+- (TARGET_THUMB1 \
++ (TARGET_THUMB1 && !inline_thumb1_jump_table \
+ ? (min >= 0 && max < 512 \
+ ? (ADDR_DIFF_VEC_FLAGS (body).offset_unsigned = 1, QImode) \
+ : min >= -256 && max < 256 \
+diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
+index 47171b996..eb22d1181 100644
+--- a/gcc/config/arm/arm.md
++++ b/gcc/config/arm/arm.md
+@@ -8179,7 +8179,7 @@
+ (match_operand:SI 2 "const_int_operand" "") ; total range
+ (match_operand:SI 3 "" "") ; table label
+ (match_operand:SI 4 "" "")] ; Out of range label
+- "(TARGET_32BIT || optimize_size || flag_pic) && !target_pure_code"
++ "(TARGET_32BIT || ((optimize_size || flag_pic) && !inline_thumb1_jump_table)) && !target_pure_code"
+ "
+ {
+ enum insn_code code;
+diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt
+index 0ebe01743..772453889 100644
+--- a/gcc/config/arm/arm.opt
++++ b/gcc/config/arm/arm.opt
+@@ -193,6 +193,10 @@ mthumb-interwork
+ Target Report Mask(INTERWORK)
+ Support calls between Thumb and ARM instruction sets.
+
++minline-thumb1-jumptable
++Target Report Var(inline_thumb1_jump_table)
++Inline Thumb1 Jump table code
++
+ mtls-dialect=
+ Target RejectNegative Joined Enum(tls_type) Var(target_tls_dialect) Init(TLS_GNU)
+ Specify thread local storage scheme.
+diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h
+index 77f30554d..32158ed65 100644
+--- a/gcc/config/arm/elf.h
++++ b/gcc/config/arm/elf.h
+@@ -56,8 +56,7 @@
+ #undef SUBSUBTARGET_EXTRA_SPECS
+ #define SUBSUBTARGET_EXTRA_SPECS
+
+-#ifndef ASM_SPEC
+-#define ASM_SPEC "\
++#define DEFAULT_ASM_SPEC "\
+ %{mbig-endian:-EB} \
+ %{mlittle-endian:-EL} \
+ %(asm_cpu_spec) \
+@@ -66,6 +65,9 @@
+ %{mthumb-interwork:-mthumb-interwork} \
+ %{mfloat-abi=*} %{mfpu=*} \
+ %(subtarget_extra_asm_spec)"
++
++#ifndef ASM_SPEC
++#define ASM_SPEC DEFAULT_ASM_SPEC
+ #endif
+
+ /* The ARM uses @ are a comment character so we need to redefine
+@@ -104,8 +106,9 @@
+ the code more efficient, but for Thumb-1 it's better to put them out of
+ band unless we are generating compressed tables. */
+ #define JUMP_TABLES_IN_TEXT_SECTION \
+- ((TARGET_32BIT || (TARGET_THUMB && (optimize_size || flag_pic))) \
+- && !target_pure_code)
++ ((TARGET_32BIT || (TARGET_THUMB && !inline_thumb1_jump_table \
++ && (optimize_size || flag_pic))) \
++ && !target_pure_code)
+
+ #ifndef LINK_SPEC
+ #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index ace84816e..8c8fa6553 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -108,11 +108,16 @@
+ #define CC1_SPEC \
+ LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC, \
+ GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC " " \
+- ANDROID_CC1_SPEC)
++ ANDROID_CC1_SPEC("-fpic"))
+
+ #define CC1PLUS_SPEC \
+ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
+
++#undef ASM_SPEC
++#define ASM_SPEC \
++ LINUX_OR_ANDROID_CC (DEFAULT_ASM_SPEC, \
++ DEFAULT_ASM_SPEC " " ANDROID_ASM_SPEC)
++
+ #undef LIB_SPEC
+ #define LIB_SPEC \
+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
+diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
+index fee33a3ef..22fb2ced9 100644
+--- a/gcc/config/i386/gnu-user.h
++++ b/gcc/config/i386/gnu-user.h
+@@ -65,9 +65,14 @@ along with GCC; see the file COPYING3. If not see
+ When the -shared link option is used a final link is not being
+ done. */
+
++#undef ANDROID_TARGET_CC1_SPEC
++#define ANDROID_TARGET_CC1_SPEC \
++ " -mssse3 -fno-short-enums " \
++
+ #undef ASM_SPEC
+ #define ASM_SPEC \
+- "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
++ "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}} " \
++ LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC)
+
+ #undef SUBTARGET_EXTRA_SPECS
+ #define SUBTARGET_EXTRA_SPECS \
+diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
+index 7a02a7eb4..cac4179bc 100644
+--- a/gcc/config/i386/gnu-user64.h
++++ b/gcc/config/i386/gnu-user64.h
+@@ -46,6 +46,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #define SPEC_X32 "mx32"
+ #endif
+
++#undef ANDROID_TARGET_CC1_SPEC
++#define ANDROID_TARGET_CC1_SPEC \
++ "%{m32:-mssse3 -fno-short-enums}" \
++ "%{!m32:-msse4.2 -mpopcnt}"
++
+ #undef ASM_SPEC
+ #define ASM_SPEC "%{" SPEC_32 ":--32} \
+ %{" SPEC_64 ":--64} \
+diff --git a/gcc/config/i386/linux-common.h b/gcc/config/i386/linux-common.h
+index 4b9910fa9..3b11ed086 100644
+--- a/gcc/config/i386/linux-common.h
++++ b/gcc/config/i386/linux-common.h
+@@ -30,7 +30,13 @@ along with GCC; see the file COPYING3. If not see
+ #undef CC1_SPEC
+ #define CC1_SPEC \
+ LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
+- GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
++ GNU_USER_TARGET_CC1_SPEC \
++ ANDROID_TARGET_CC1_SPEC \
++ " " \
++ ANDROID_CC1_SPEC("-fPIC"))
++
++#define CC1PLUS_SPEC \
++ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
+
+ #undef LINK_SPEC
+ #define LINK_SPEC \
+diff --git a/gcc/config/linux-android.h b/gcc/config/linux-android.h
+index 301a41ccd..9623c88d0 100644
+--- a/gcc/config/linux-android.h
++++ b/gcc/config/linux-android.h
+@@ -38,15 +39,18 @@
+ "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}"
+
+ #define ANDROID_LINK_SPEC \
+- "%{shared: -Bsymbolic}"
++ "%{shared: -Bsymbolic} -z noexecstack -z relro -z now"
+
+-#define ANDROID_CC1_SPEC \
++#define ANDROID_CC1_SPEC(ANDROID_PIC_DEFAULT) \
+ "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \
+- "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}"
++ "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: " ANDROID_PIC_DEFAULT "}}}}"
+
+ #define ANDROID_CC1PLUS_SPEC \
+- "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \
+- "%{!frtti:%{!fno-rtti: -fno-rtti}}"
++ "%{!fexceptions:%{!fno-exceptions: -fexceptions}} " \
++ "%{!frtti:%{!fno-rtti: -frtti}}"
++
++#define ANDROID_ASM_SPEC \
++ "--noexecstack"
+
+ #define ANDROID_LIB_SPEC \
+ "%{!static: -ldl}"
+diff --git a/gcc/config/mips/android.h b/gcc/config/mips/android.h
+new file mode 100644
+index 000000000..32c539c8d
+--- /dev/null
++++ b/gcc/config/mips/android.h
+@@ -0,0 +1,49 @@
++/* Target macros for mips*-*android* targets.
++ Copyright (C) 2014 Free Software Foundation, Inc.
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 3, or (at your option)
++any later version.
++
++GCC is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING3. If not see
++<http://www.gnu.org/licenses/>. */
++
++#undef DRIVER_SELF_SPECS
++#define DRIVER_SELF_SPECS \
++ /* Make sure a -mips option is present. This helps us to pick \
++ the right multilib, and also makes the later specs easier \
++ to write. */ \
++ MIPS_ISA_LEVEL_SPEC, \
++ \
++ /* Infer the default float setting from -march. */ \
++ MIPS_ARCH_FLOAT_SPEC, \
++ \
++ /* Infer the -msynci setting from -march if not explicitly set. */ \
++ MIPS_ISA_SYNCI_SPEC, \
++ \
++ /* If no ABI option is specified, infer one from the ISA level \
++ or -mgp setting. */ \
++ "%{!mabi=*: %{" MIPS_32BIT_OPTION_SPEC ": -mabi=32;: -mabi=64}}", \
++ \
++ /* If no FP ABI option is specified, infer one from the \
++ ABI/ISA level unless there is a conflicting option. */ \
++ "%{!msoft-float: %{!msingle-float: %{!mfp*: %{!mmsa: %{mabi=32: %{" \
++ MIPS_FPXX_OPTION_SPEC ": -mfpxx}}}}}}", \
++ \
++ /* If no odd-spreg option is specified, infer one from the ISA. */ \
++ "%{!modd-spreg: %{mabi=32: %{mips32r6: -mno-odd-spreg}}}", \
++ \
++ /* Base SPECs. */ \
++ BASE_DRIVER_SELF_SPECS, \
++ \
++ /* Use the standard linux specs for everything else. */ \
++ LINUX_DRIVER_SELF_SPECS
+diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
+index 15b549c08..4a2816014 100644
+--- a/gcc/config/mips/gnu-user.h
++++ b/gcc/config/mips/gnu-user.h
+@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see
+ /* The GNU C++ standard library requires this. */ \
+ if (c_dialect_cxx ()) \
+ builtin_define ("_GNU_SOURCE"); \
++ ANDROID_TARGET_OS_CPP_BUILTINS(); \
+ } while (0)
+
+ #undef SUBTARGET_CPP_SPEC
+@@ -71,7 +72,8 @@ along with GCC; see the file COPYING3. If not see
+
+ #undef SUBTARGET_ASM_SPEC
+ #define SUBTARGET_ASM_SPEC \
+- "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}}"
++ "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}} " \
++ LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC)
+
+ /* The MIPS assembler has different syntax for .set. We set it to
+ .dummy to trap any errors. */
+@@ -120,7 +122,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
+ #endif
+
+ #define LINUX_DRIVER_SELF_SPECS \
+- NO_SHARED_SPECS \
++ LINUX_OR_ANDROID_CC(NO_SHARED_SPECS, "") \
+ MARCH_MTUNE_NATIVE_SPECS, \
+ /* -mplt has no effect without -mno-shared. Simplify later \
+ specs handling by removing a redundant option. */ \
+diff --git a/gcc/config/mips/linux-common.h b/gcc/config/mips/linux-common.h
+index 8429a7ca2..8bfacf994 100644
+--- a/gcc/config/mips/linux-common.h
++++ b/gcc/config/mips/linux-common.h
+@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
+ #undef SUBTARGET_CC1_SPEC
+ #define SUBTARGET_CC1_SPEC \
+ LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
+- GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
++ GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC("-fpic"))
+
+ #undef CC1PLUS_SPEC
+ #define CC1PLUS_SPEC \
+diff --git a/gcc/config/mips/t-linux-android b/gcc/config/mips/t-linux-android
+new file mode 100644
+index 000000000..39f512c81
+--- /dev/null
++++ b/gcc/config/mips/t-linux-android
+@@ -0,0 +1,3 @@
++MULTILIB_OPTIONS = mips32r2/mips32r6
++MULTILIB_DIRNAMES = mips-r2 mips-r6
++MULTILIB_OSDIRNAMES = ../libr2 ../libr6
+diff --git a/gcc/config/mips/t-linux-android64 b/gcc/config/mips/t-linux-android64
+new file mode 100644
+index 000000000..55cab7d62
+--- /dev/null
++++ b/gcc/config/mips/t-linux-android64
+@@ -0,0 +1,4 @@
++MULTILIB_OPTIONS = mabi=32 mips32/mips32r2/mips32r6/mips64r2/mips64r6
++MULTILIB_DIRNAMES = 32 mips-r1 mips-r2 mips-r6 mips64-r2 mips64-r6
++MULTILIB_OSDIRNAMES = ../lib ../lib ../libr2 ../libr6 ../lib64r2 ../lib64
++MULTILIB_REQUIRED = mabi=32/mips32 mabi=32/mips32r2 mabi=32/mips32r6 mips64r2 mips64r6
+diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h
+index 555c0fe24..47c8655f9 100644
+--- a/libgcc/gthr-posix.h
++++ b/libgcc/gthr-posix.h
+@@ -32,6 +32,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #define __GTHREADS 1
+ #define __GTHREADS_CXX0X 1
+
++/* The following should normally be in a different header file,
++ * but I couldn't find the right location. The point of the macro
++ * definition below is to prevent libsupc++ and libstdc++ to reference
++ * weak symbols in their static C++ constructors. Such code crashes
++ * when a shared object linked statically to these libraries is
++ * loaded on Android 2.1 (Eclair) and older platform releases, due
++ * to a dynamic linker bug.
++ */
++#ifdef __ANDROID__
++#undef GTHREAD_USE_WEAK
++#define GTHREAD_USE_WEAK 0
++#endif
++
+ #include <pthread.h>
+
+ #if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index 41797a971..f746e8353 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -78319,6 +78341,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <sys/syscall.h>
+ int lk;
++#if !defined(SYS_gettid)
++#define SYS_gettid __NR_gettid
++#endif
++#if !defined(SYS_futex)
++#define SYS_futex __NR_futex
++#endif
+ int
+ main ()
+ {
+@@ -78377,6 +78405,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <sys/syscall.h>
+ int lk;
++#if !defined(SYS_gettid)
++#define SYS_gettid __NR_gettid
++#endif
++#if !defined(SYS_futex)
++#define SYS_futex __NR_futex
++#endif
+ int
+ main ()
+ {
+diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h
+index e3e206b7d..e85dc2c76 100644
+--- a/libstdc++-v3/include/bits/locale_facets.h
++++ b/libstdc++-v3/include/bits/locale_facets.h
+@@ -47,6 +47,20 @@
+ #include <ext/numeric_traits.h>
+ #include <bits/streambuf_iterator.h>
+
++#if !__clang__ && __GNUC__ == 4 && __GNUC_MINOR__ == 9 && __i386__
++// CrystaX: for some reason, x86 gcc-4.9 makes ctype<char>::do_widen() and
++// ctype<char>::_M_widen_init() methods working wrong if optimization enabled.
++// For ctype<char>::do_widen(), values of passed arguments (__lo, __hi and __to)
++// are completely messed up and don't correspond to passed values. In case if
++// we disable optimization for those methods, things become correct so we apply
++// this workaround here for a time.
++// TODO: figure out what exactly wrong here - is it bug in GCC optimization
++// algorithm or smth else?
++#define __CRYSTAX_X86_DONT_OPTIMIZE __attribute__((optimize(0)))
++#else
++#define __CRYSTAX_X86_DONT_OPTIMIZE
++#endif
++
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+@@ -1102,7 +1116,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ * @return @a __hi.
+ */
+ virtual const char*
+- do_widen(const char* __lo, const char* __hi, char_type* __to) const
++ do_widen(const char* __lo, const char* __hi, char_type* __to) const __CRYSTAX_X86_DONT_OPTIMIZE
+ {
+ __builtin_memcpy(__to, __lo, __hi - __lo);
+ return __hi;
+@@ -1163,7 +1177,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+ private:
+ void _M_narrow_init() const;
+- void _M_widen_init() const;
++ void _M_widen_init() const __CRYSTAX_X86_DONT_OPTIMIZE;
+ };
+
+ #ifdef _GLIBCXX_USE_WCHAR_T
+diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
+index 9b617998f..c149169bb 100644
+--- a/libstdc++-v3/libsupc++/guard.cc
++++ b/libstdc++-v3/libsupc++/guard.cc
+@@ -33,7 +33,12 @@
+ #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
+ && (ATOMIC_INT_LOCK_FREE > 1) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
+ # include <climits>
++#if defined(__ANDROID__)
++# include <sys/syscall.h>
++# define SYS_futex __NR_futex
++#else
+ # include <syscall.h>
++#endif
+ # include <unistd.h>
+ # define _GLIBCXX_USE_FUTEX
+ # define _GLIBCXX_FUTEX_WAIT 0
diff --git a/packages/gcc/7.2.0/971-crystax.patch b/packages/gcc/7.2.0/971-crystax.patch
new file mode 100644
index 0000000..748a381
--- /dev/null
+++ b/packages/gcc/7.2.0/971-crystax.patch
@@ -0,0 +1,25 @@
+commit 9f057b62caafe08c968103d39b5df82486a175c2
+Author: Dmitry Moskalchuk <dm@crystax.net>
+Date: Thu Aug 13 16:11:54 2015 +0300
+
+ [android] Add additional multilib option: mfloat-abi=hard
+
+ Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
+
+diff --git a/gcc/config/arm/t-linux-androideabi b/gcc/config/arm/t-linux-androideabi
+index 8f1307c55..cbbec5bd2 100644
+--- a/gcc/config/arm/t-linux-androideabi
++++ b/gcc/config/arm/t-linux-androideabi
+@@ -1,8 +1,9 @@
+-MULTILIB_OPTIONS = march=armv7-a mthumb
+-MULTILIB_DIRNAMES = armv7-a thumb
+-MULTILIB_EXCEPTIONS =
++MULTILIB_OPTIONS = march=armv7-a mthumb mfloat-abi=hard
++MULTILIB_DIRNAMES = armv7-a thumb hard
++MULTILIB_EXCEPTIONS = mfloat-abi=hard* mthumb/mfloat-abi=hard*
+ MULTILIB_MATCHES =
+ MULTILIB_OSDIRNAMES =
++MULTILIB_EXTRA_OPTS = Wl,--no-warn-mismatch
+
+ # The "special" multilib can be used to build native applications for Android,
+ # as opposed to native shared libraries that are then called via JNI.
diff --git a/packages/gcc/7.2.0/972-crystax.patch b/packages/gcc/7.2.0/972-crystax.patch
new file mode 100644
index 0000000..b9077be
--- /dev/null
+++ b/packages/gcc/7.2.0/972-crystax.patch
@@ -0,0 +1,302 @@
+commit 44a81ebb7698dac41ffa7acd5e0cc1578e5ab1fd
+Author: H.J. Lu <hongjiu.lu@intel.com>
+Date: Mon Apr 14 15:59:47 2014 -0700
+
+ [android] Always enable --eh-frame-hdr for static executable
+
+ See 5e6cdf76af295c9a39b695ca228cff675e8ff4ae and
+ 23e3137ee2897464b051599b85a09f130d3ad05d
+
+ Change-Id: Ibda473188e5a10f2a0592f2494ad00ad1f91e04b
+ Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
+
+diff --git a/gcc/config.in b/gcc/config.in
+index 115cb6163..933916833 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -2119,6 +2119,12 @@
+ #endif
+
+
++/* Define if your system supports PT_GNU_EH_FRAME for static executable. */
++#ifndef USED_FOR_TARGET
++#undef USE_EH_FRAME_HDR_FOR_STATIC
++#endif
++
++
+ /* Define to 1 if the 'long long' type is wider than 'long' but still
+ efficiently supported by the host hardware. */
+ #ifndef USED_FOR_TARGET
+diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h
+index 093c38bba..54b3e0c91 100644
+--- a/gcc/config/alpha/elf.h
++++ b/gcc/config/alpha/elf.h
+@@ -168,5 +168,9 @@ extern int alpha_this_gpdisp_sequence_number;
+ I imagine that other systems will catch up. In the meantime, it
+ doesn't harm to make sure that the data exists to be used later. */
+ #if defined(HAVE_LD_EH_FRAME_HDR)
++#ifdef USE_EH_FRAME_HDR_FOR_STATIC
++#define LINK_EH_SPEC "--eh-frame-hdr "
++#else
+ #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+ #endif
++#endif
+diff --git a/gcc/config/freebsd.h b/gcc/config/freebsd.h
+index 5ded869d2..5f51ac81d 100644
+--- a/gcc/config/freebsd.h
++++ b/gcc/config/freebsd.h
+@@ -45,8 +45,12 @@ along with GCC; see the file COPYING3. If not see
+ #define LIB_SPEC FBSD_LIB_SPEC
+
+ #if defined(HAVE_LD_EH_FRAME_HDR)
++#ifdef USE_EH_FRAME_HDR_FOR_STATIC
++#define LINK_EH_SPEC "--eh-frame-hdr "
++#else
+ #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+ #endif
++#endif
+
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
+index b0bf40a95..d1874bc29 100644
+--- a/gcc/config/gnu-user.h
++++ b/gcc/config/gnu-user.h
+@@ -118,8 +118,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
+
+ #if defined(HAVE_LD_EH_FRAME_HDR)
++#ifdef USE_EH_FRAME_HDR_FOR_STATIC
++#define LINK_EH_SPEC "--eh-frame-hdr "
++#else
+ #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+ #endif
++#endif
+
+ #undef LINK_GCC_C_SEQUENCE_SPEC
+ #define LINK_GCC_C_SEQUENCE_SPEC \
+diff --git a/gcc/config/openbsd.h b/gcc/config/openbsd.h
+index 37ecfc43f..a5f1b9955 100644
+--- a/gcc/config/openbsd.h
++++ b/gcc/config/openbsd.h
+@@ -136,8 +136,12 @@ while (0)
+ #define LIB_SPEC OBSD_LIB_SPEC
+
+ #if defined(HAVE_LD_EH_FRAME_HDR)
++#ifdef USE_EH_FRAME_HDR_FOR_STATIC
++#define LINK_EH_SPEC "--eh-frame-hdr "
++#else
+ #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+ #endif
++#endif
+
+ #undef LIB_SPEC
+ #define LIB_SPEC OBSD_LIB_SPEC
+diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
+index cbf909722..eb2217fad 100644
+--- a/gcc/config/rs6000/sysv4.h
++++ b/gcc/config/rs6000/sysv4.h
+@@ -789,7 +789,11 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
+ -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
+
+ #if defined(HAVE_LD_EH_FRAME_HDR)
+-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
++# ifdef USE_EH_FRAME_HDR_FOR_STATIC
++# define LINK_EH_SPEC "--eh-frame-hdr "
++# else
++# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
++# endif
+ #endif
+
+ #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
+diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
+index 5160e1fda..7632a5081 100644
+--- a/gcc/config/sol2.h
++++ b/gcc/config/sol2.h
+@@ -347,7 +347,11 @@ along with GCC; see the file COPYING3. If not see
+ /* Solaris 11 build 135+ implements dl_iterate_phdr. GNU ld needs
+ --eh-frame-hdr to create the required .eh_frame_hdr sections. */
+ #if defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
++#ifdef USE_EH_FRAME_HDR_FOR_STATIC
++#define LINK_EH_SPEC "--eh-frame-hdr "
++#else
+ #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
++#endif
+ #endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */
+ #endif
+
+diff --git a/gcc/configure b/gcc/configure
+index 1c6e3407c..28ad05004 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -934,6 +934,7 @@ enable_fix_cortex_a53_835769
+ enable_fix_cortex_a53_843419
+ with_glibc_version
+ enable_gnu_unique_object
++enable_eh_frame_hdr_for_static
+ enable_linker_build_id
+ enable_default_ssp
+ with_long_double_128
+@@ -1670,6 +1671,9 @@ Optional Features:
+ --enable-gnu-unique-object
+ enable the use of the @gnu_unique_object ELF
+ extension on glibc systems
++ --enable-eh-frame-hdr-for-static
++ enable linker PT_GNU_EH_FRAME support for static
++ executable
+ --enable-linker-build-id
+ compiler will always pass --build-id to linker
+ --enable-default-ssp enable Stack Smashing Protection as default
+@@ -27703,6 +27707,38 @@ if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
+
+ $as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h
+
++ # Check whether --enable-eh-frame-hdr-for-static was given.
++if test "${enable_eh_frame_hdr_for_static+set}" = set; then :
++ enableval=$enable_eh_frame_hdr_for_static; case $enable_eh_frame_hdr_for_static in
++ yes | no) ;;
++ *) as_fn_error "'$enable_eh_frame_hdr_for_static' is an invalid
++value for --enable-eh-frame-hdr-for-static.
++Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
++ esac
++else
++ # Only support for glibc 2.3.0 or higher with AT_PHDR/AT_PHNUM from
++# Linux kernel.
++ if test x$host = x$build -a x$host = x$target &&
++ ldd --version 2>&1 >/dev/null &&
++ glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
++ glibcmajor=`expr "$glibcver" : "\([0-9]*\)"`
++ glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"`
++ glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
++ if test "$glibcnum" -ge 2003 ; then
++ auvx=`LD_SHOW_AUXV=1 ldd 2>/dev/null`
++ if echo "$auvx" | grep AT_PHDR > /dev/null &&
++ echo "$auvx" | grep AT_PHNUM > /dev/null; then
++ enable_eh_frame_hdr_for_static=yes
++ fi
++ fi
++ fi
++fi
++
++ if test x$enable_eh_frame_hdr_for_static = xyes; then
++
++$as_echo "#define USE_EH_FRAME_HDR_FOR_STATIC 1" >>confdefs.h
++
++ fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_hdr" >&5
+ $as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; }
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 6c1dcd9ae..0cf7419e7 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -4828,6 +4828,35 @@ GCC_TARGET_TEMPLATE([HAVE_LD_EH_FRAME_HDR])
+ if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
+ AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1,
+ [Define if your linker supports .eh_frame_hdr.])
++ AC_ARG_ENABLE(eh-frame-hdr-for-static,
++ [AS_HELP_STRING([--enable-eh-frame-hdr-for-static],
++ [enable linker PT_GNU_EH_FRAME support for static executable])],
++ [case $enable_eh_frame_hdr_for_static in
++ yes | no) ;;
++ *) AC_MSG_ERROR(['$enable_eh_frame_hdr_for_static' is an invalid
++value for --enable-eh-frame-hdr-for-static.
++Valid choices are 'yes' and 'no'.]) ;;
++ esac],
++# Only support for glibc 2.3.0 or higher with AT_PHDR/AT_PHNUM from
++# Linux kernel.
++ [[if test x$host = x$build -a x$host = x$target &&
++ ldd --version 2>&1 >/dev/null &&
++ glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
++ glibcmajor=`expr "$glibcver" : "\([0-9]*\)"`
++ glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"`
++ glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
++ if test "$glibcnum" -ge 2003 ; then
++ auvx=`LD_SHOW_AUXV=1 ldd 2>/dev/null`
++ if echo "$auvx" | grep AT_PHDR > /dev/null &&
++ echo "$auvx" | grep AT_PHNUM > /dev/null; then
++ enable_eh_frame_hdr_for_static=yes
++ fi
++ fi
++ fi]])
++ if test x$enable_eh_frame_hdr_for_static = xyes; then
++ AC_DEFINE(USE_EH_FRAME_HDR_FOR_STATIC, 1,
++[Define if your system supports PT_GNU_EH_FRAME for static executable.])
++ fi
+ fi
+ AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr)
+
+diff --git a/gcc/testsuite/g++.dg/eh/spec3-static.C b/gcc/testsuite/g++.dg/eh/spec3-static.C
+new file mode 100644
+index 000000000..15408effa
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/eh/spec3-static.C
+@@ -0,0 +1,25 @@
++// PR c++/4381
++// Test that exception-specs work properly for classes with virtual bases.
++
++// { dg-do run }
++// { dg-options "-static" }
++
++class Base {};
++
++struct A : virtual public Base
++{
++ A() {}
++};
++
++struct B {};
++
++void func() throw (B,A)
++{
++ throw A();
++}
++
++int main(void)
++{
++ try { func(); }
++ catch (A& a) { }
++}
+diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
+index f3343fc4f..d42647779 100644
+--- a/libgcc/crtstuff.c
++++ b/libgcc/crtstuff.c
+@@ -88,7 +88,8 @@ call_ ## FUNC (void) \
+ #if defined(OBJECT_FORMAT_ELF) \
+ && !defined(OBJECT_FORMAT_FLAT) \
+ && defined(HAVE_LD_EH_FRAME_HDR) \
+- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
++ && !defined(inhibit_libc) \
++ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
+ && defined(BSD_DL_ITERATE_PHDR_AVAILABLE)
+ #include <link.h>
+ # define USE_PT_GNU_EH_FRAME
+@@ -97,7 +98,8 @@ call_ ## FUNC (void) \
+ #if defined(OBJECT_FORMAT_ELF) \
+ && !defined(OBJECT_FORMAT_FLAT) \
+ && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR) \
+- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
++ && !defined(inhibit_libc) \
++ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
+ && defined(__sun__) && defined(__svr4__)
+ #include <link.h>
+ # define USE_PT_GNU_EH_FRAME
+@@ -106,7 +108,8 @@ call_ ## FUNC (void) \
+ #if defined(OBJECT_FORMAT_ELF) \
+ && !defined(OBJECT_FORMAT_FLAT) \
+ && defined(HAVE_LD_EH_FRAME_HDR) \
+- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
++ && !defined(inhibit_libc) \
++ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
+ && defined(__GLIBC__) && __GLIBC__ >= 2
+ #include <link.h>
+ /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
+@@ -121,7 +124,7 @@ call_ ## FUNC (void) \
+ #if defined(OBJECT_FORMAT_ELF) \
+ && !defined(OBJECT_FORMAT_FLAT) \
+ && defined(HAVE_LD_EH_FRAME_HDR) \
+- && !defined(CRTSTUFFT_O) \
++ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
+ && defined(inhibit_libc) \
+ && (defined(__GLIBC__) || defined(__gnu_linux__) || defined(__GNU__))
+ /* On systems using glibc, an inhibit_libc build of libgcc is only
diff --git a/packages/gcc/7.2.0/973-crystax.patch b/packages/gcc/7.2.0/973-crystax.patch
new file mode 100644
index 0000000..b96ece3
--- /dev/null
+++ b/packages/gcc/7.2.0/973-crystax.patch
@@ -0,0 +1,20 @@
+commit 778a9ef107f51544d583f110e92b75f4d9d79117
+Author: Dmitry Moskalchuk <dm@crystax.net>
+Date: Thu Aug 20 19:11:07 2015 +0300
+
+ [android] Don't use PIE copyrelocs for x86/x86_64
+
+ Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 3d044e8bd..5c89fcab0 100644
+--- a/gcc/config/i386/i386.c
++++ b/gcc/config/i386/i386.c
+@@ -14631,6 +14631,7 @@ legitimate_pic_address_disp_p (rtx disp)
+ else if (!SYMBOL_REF_FAR_ADDR_P (op0)
+ && (SYMBOL_REF_LOCAL_P (op0)
+ || (HAVE_LD_PIE_COPYRELOC
++ && !TARGET_HAS_BIONIC
+ && flag_pie
+ && !SYMBOL_REF_WEAK (op0)
+ && !SYMBOL_REF_FUNCTION_P (op0)))
diff --git a/packages/gcc/7.2.0/974-crystax.patch b/packages/gcc/7.2.0/974-crystax.patch
new file mode 100644
index 0000000..9db4f54
--- /dev/null
+++ b/packages/gcc/7.2.0/974-crystax.patch
@@ -0,0 +1,24 @@
+commit dbeae1190cabad83999f2540523f045acc1bb4ec
+Author: Dmitry Moskalchuk <dm@crystax.net>
+Date: Fri Aug 21 17:41:59 2015 +0300
+
+ [android] Always use gthr-posix.h instead of gthr-default.h
+
+ Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
+
+diff --git a/libgcc/gthr.h b/libgcc/gthr.h
+index 47a7d061a..67a680f90 100644
+--- a/libgcc/gthr.h
++++ b/libgcc/gthr.h
+@@ -145,7 +145,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #define GTHREAD_USE_WEAK 1
+ #endif
+ #endif
++#if __ANDROID__
++#include "gthr-posix.h"
++#else
+ #include "gthr-default.h"
++#endif
+
+ #ifndef HIDE_EXPORTS
+ #pragma GCC visibility pop
diff --git a/packages/gcc/7.2.0/975-crystax.patch b/packages/gcc/7.2.0/975-crystax.patch
new file mode 100644
index 0000000..9efc2a4
--- /dev/null
+++ b/packages/gcc/7.2.0/975-crystax.patch
@@ -0,0 +1,31 @@
+commit 8a66d422721ae5999737d7825701ff22097d287b
+Author: Andrew Hsieh <andrewhsieh@google.com>
+Date: Mon Apr 14 21:05:51 2014 -0700
+
+ [android] Fix ARM generates insufficient alignment for NEON vst/vld
+
+ See d909af3e2469aad87d5c3e79b93c778fd26c03a9
+
+ Change-Id: Ie1de9f946f397196bb6f1623f5add86933739484
+ Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
+
+diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
+index 5974c65d3..71b2c7aa9 100644
+--- a/gcc/config/arm/arm.c
++++ b/gcc/config/arm/arm.c
+@@ -22403,9 +22403,13 @@ arm_print_operand (FILE *stream, rtx x, int code)
+ memsize = MEM_SIZE (x);
+
+ /* Only certain alignment specifiers are supported by the hardware. */
+- if (memsize == 32 && (align % 32) == 0)
++ /* Note that ARM EABI only guarentees 8-byte stack alignment. While GCC
++ honors stricter alignment of composite type in user code, it doesn't
++ observe the alignment of memory passed as an extra argument for function
++ returning large composite type. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57271 */
++ if (memsize == 32 && (align % 32) == 0 && !TARGET_AAPCS_BASED)
+ align_bits = 256;
+- else if ((memsize == 16 || memsize == 32) && (align % 16) == 0)
++ else if ((memsize == 16 || memsize == 32) && (align % 16) == 0 && !TARGET_AAPCS_BASED)
+ align_bits = 128;
+ else if (memsize >= 8 && (align % 8) == 0)
+ align_bits = 64;
diff --git a/packages/gcc/7.2.0/976-crystax.patch b/packages/gcc/7.2.0/976-crystax.patch
new file mode 100644
index 0000000..790d4a9
--- /dev/null
+++ b/packages/gcc/7.2.0/976-crystax.patch
@@ -0,0 +1,21 @@
+commit 89d27bc45ee7325dcfff6748da0f8b9c1dc1f234
+Author: Dmitry Moskalchuk <dm@crystax.net>
+Date: Sat Aug 22 09:55:55 2015 +0300
+
+ [android][i386] Remove throw() declaration from posix_memalign() proto
+
+ Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
+
+diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
+index a1f98d3d1..3725799be 100644
+--- a/gcc/config/i386/pmm_malloc.h
++++ b/gcc/config/i386/pmm_malloc.h
+@@ -31,7 +31,7 @@
+ #ifndef __cplusplus
+ extern int posix_memalign (void **, size_t, size_t);
+ #else
+-extern "C" int posix_memalign (void **, size_t, size_t) throw ();
++extern "C" int posix_memalign (void **, size_t, size_t);
+ #endif
+
+ static __inline void *
diff --git a/packages/gcc/7.2.0/977-crystax.patch b/packages/gcc/7.2.0/977-crystax.patch
new file mode 100644
index 0000000..0211d72
--- /dev/null
+++ b/packages/gcc/7.2.0/977-crystax.patch
@@ -0,0 +1,33 @@
+commit 9ae82f7cfc1073820092dd9f957559667e77db0d
+Author: Dmitry Moskalchuk <dm@crystax.net>
+Date: Tue Aug 25 09:36:42 2015 +0300
+
+ [android] Explicitly make _Unwind_Resume visible for arm64/mips64
+
+ Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
+
+diff --git a/gcc/config/aarch64/aarch64-linux-android.h b/gcc/config/aarch64/aarch64-linux-android.h
+index db1288fd0..38bc64d61 100644
+--- a/gcc/config/aarch64/aarch64-linux-android.h
++++ b/gcc/config/aarch64/aarch64-linux-android.h
+@@ -57,4 +57,8 @@
+ #define ENDFILE_SPEC \
+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
+
++#ifdef IN_LIBGCC2
++#define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((visibility("default")))
++#endif
++
+ #endif /* GCC_AARCH64_LINUX_ANDROID_H */
+diff --git a/gcc/config/mips/linux-common.h b/gcc/config/mips/linux-common.h
+index 8bfacf994..262a9a341 100644
+--- a/gcc/config/mips/linux-common.h
++++ b/gcc/config/mips/linux-common.h
+@@ -63,3 +63,7 @@ along with GCC; see the file COPYING3. If not see
+
+ /* The default value isn't sufficient in 64-bit mode. */
+ #define STACK_CHECK_PROTECT (TARGET_64BIT ? 16 * 1024 : 12 * 1024)
++
++#ifdef IN_LIBGCC2
++#define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((visibility("default")))
++#endif
diff --git a/packages/gcc/7.2.0/version.desc b/packages/gcc/7.2.0/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gcc/7.2.0/version.desc
diff --git a/packages/gcc/package.desc b/packages/gcc/package.desc
new file mode 100644
index 0000000..0bfc71b
--- /dev/null
+++ b/packages/gcc/package.desc
@@ -0,0 +1,5 @@
+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
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/gdb-linaro/7.3-2011.12/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/gdb-linaro/7.4-2012.06/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/gdb-linaro/7.5-2012.12/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/gdb-linaro/7.6.1-2013.10/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/gdb-linaro/7.7-2014.05/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/gdb-linaro/7.7.1-2014.06-1/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/gdb-linaro/7.8-2014.09/version.desc b/packages/gdb-linaro/7.8-2014.09/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/gdb-linaro/7.8-2014.09/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/gdb-linaro/package.desc b/packages/gdb-linaro/package.desc
new file mode 100644
index 0000000..bc11a17
--- /dev/null
+++ b/packages/gdb-linaro/package.desc
@@ -0,0 +1,6 @@
+master='gdb'
+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/patches/gdb/6.8a/100-dwarf-stack-overflow.patch b/packages/gdb/6.8a/100-dwarf-stack-overflow.patch
index 344d5a3..344d5a3 100644
--- a/patches/gdb/6.8a/100-dwarf-stack-overflow.patch
+++ b/packages/gdb/6.8a/100-dwarf-stack-overflow.patch
diff --git a/patches/gdb/6.8a/110-security-errata-20050610.patch b/packages/gdb/6.8a/110-security-errata-20050610.patch
index 27e8174..27e8174 100644
--- a/patches/gdb/6.8a/110-security-errata-20050610.patch
+++ b/packages/gdb/6.8a/110-security-errata-20050610.patch
diff --git a/patches/gdb/6.8a/120-tdep-opcode-include-workaround.patch b/packages/gdb/6.8a/120-tdep-opcode-include-workaround.patch
index 61fdef4..61fdef4 100644
--- a/patches/gdb/6.8a/120-tdep-opcode-include-workaround.patch
+++ b/packages/gdb/6.8a/120-tdep-opcode-include-workaround.patch
diff --git a/patches/gdb/6.8a/130-reg-no-longer-active.patch b/packages/gdb/6.8a/130-reg-no-longer-active.patch
index 1c7e7e0..1c7e7e0 100644
--- a/patches/gdb/6.8a/130-reg-no-longer-active.patch
+++ b/packages/gdb/6.8a/130-reg-no-longer-active.patch
diff --git a/patches/gdb/6.8a/140-sim-ppc-have-config-h.patch b/packages/gdb/6.8a/140-sim-ppc-have-config-h.patch
index f3723b5..f3723b5 100644
--- a/patches/gdb/6.8a/140-sim-ppc-have-config-h.patch
+++ b/packages/gdb/6.8a/140-sim-ppc-have-config-h.patch
diff --git a/patches/gdb/6.8a/150-handle-stpcpy-define.patch b/packages/gdb/6.8a/150-handle-stpcpy-define.patch
index 88d703f..88d703f 100644
--- a/patches/gdb/6.8a/150-handle-stpcpy-define.patch
+++ b/packages/gdb/6.8a/150-handle-stpcpy-define.patch
diff --git a/packages/gdb/6.8a/version.desc b/packages/gdb/6.8a/version.desc
new file mode 100644
index 0000000..f3953c8
--- /dev/null
+++ b/packages/gdb/6.8a/version.desc
@@ -0,0 +1,3 @@
+obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
+archive_dirname='gdb-6.8'
diff --git a/patches/gdb/7.0a/100-sim-ppc-have-config-h.patch b/packages/gdb/7.0.1a/100-sim-ppc-have-config-h.patch
index f3723b5..f3723b5 100644
--- a/patches/gdb/7.0a/100-sim-ppc-have-config-h.patch
+++ b/packages/gdb/7.0.1a/100-sim-ppc-have-config-h.patch
diff --git a/packages/gdb/7.0.1a/version.desc b/packages/gdb/7.0.1a/version.desc
new file mode 100644
index 0000000..f98f67c
--- /dev/null
+++ b/packages/gdb/7.0.1a/version.desc
@@ -0,0 +1,3 @@
+obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
+archive_dirname='gdb-7.0.1'
diff --git a/patches/gdb/7.0.1a/100-sim-ppc-have-config-h.patch b/packages/gdb/7.0a/100-sim-ppc-have-config-h.patch
index f3723b5..f3723b5 100644
--- a/patches/gdb/7.0.1a/100-sim-ppc-have-config-h.patch
+++ b/packages/gdb/7.0a/100-sim-ppc-have-config-h.patch
diff --git a/packages/gdb/7.0a/version.desc b/packages/gdb/7.0a/version.desc
new file mode 100644
index 0000000..10d8a67
--- /dev/null
+++ b/packages/gdb/7.0a/version.desc
@@ -0,0 +1,3 @@
+obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
+archive_dirname='gdb-7.0'
diff --git a/patches/gdb/8.0/100-musl_fix.patch b/packages/gdb/7.10.1/100-musl_fix.patch
index c0c1e0a..c0c1e0a 100644
--- a/patches/gdb/8.0/100-musl_fix.patch
+++ b/packages/gdb/7.10.1/100-musl_fix.patch
diff --git a/patches/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch b/packages/gdb/7.10.1/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch
index 1182a45..1182a45 100644
--- a/patches/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch
+++ b/packages/gdb/7.10.1/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch
diff --git a/patches/gdb/8.0/111-xtensa-make-sure-ar_base-is-initialized.patch b/packages/gdb/7.10.1/111-xtensa-make-sure-ar_base-is-initialized.patch
index 982bd7f..982bd7f 100644
--- a/patches/gdb/8.0/111-xtensa-make-sure-ar_base-is-initialized.patch
+++ b/packages/gdb/7.10.1/111-xtensa-make-sure-ar_base-is-initialized.patch
diff --git a/patches/gdb/8.0/112-WIP-end-of-prologue-detection-hack.patch b/packages/gdb/7.10.1/112-WIP-end-of-prologue-detection-hack.patch
index 506a57c..506a57c 100644
--- a/patches/gdb/8.0/112-WIP-end-of-prologue-detection-hack.patch
+++ b/packages/gdb/7.10.1/112-WIP-end-of-prologue-detection-hack.patch
diff --git a/packages/gdb/7.10.1/version.desc b/packages/gdb/7.10.1/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/gdb/7.10.1/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/gdb/7.12.1/100-musl_fix.patch b/packages/gdb/7.11.1/100-musl_fix.patch
index c0c1e0a..c0c1e0a 100644
--- a/patches/gdb/7.12.1/100-musl_fix.patch
+++ b/packages/gdb/7.11.1/100-musl_fix.patch
diff --git a/patches/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch b/packages/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch
index ff59907..ff59907 100644
--- a/patches/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch
+++ b/packages/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch
diff --git a/patches/gdb/7.12.1/111-xtensa-make-sure-ar_base-is-initialized.patch b/packages/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch
index 982bd7f..982bd7f 100644
--- a/patches/gdb/7.12.1/111-xtensa-make-sure-ar_base-is-initialized.patch
+++ b/packages/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch
diff --git a/patches/gdb/7.12.1/112-WIP-end-of-prologue-detection-hack.patch b/packages/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch
index 506a57c..506a57c 100644
--- a/patches/gdb/7.12.1/112-WIP-end-of-prologue-detection-hack.patch
+++ b/packages/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch
diff --git a/packages/gdb/7.11.1/version.desc b/packages/gdb/7.11.1/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gdb/7.11.1/version.desc
diff --git a/patches/gdb/7.11.1/100-musl_fix.patch b/packages/gdb/7.12.1/100-musl_fix.patch
index c0c1e0a..c0c1e0a 100644
--- a/patches/gdb/7.11.1/100-musl_fix.patch
+++ b/packages/gdb/7.12.1/100-musl_fix.patch
diff --git a/patches/gdb/8.0/101-uclibc-no-gettimeofday-clobber.patch b/packages/gdb/7.12.1/101-uclibc-no-gettimeofday-clobber.patch
index cd7a4c6..cd7a4c6 100644
--- a/patches/gdb/8.0/101-uclibc-no-gettimeofday-clobber.patch
+++ b/packages/gdb/7.12.1/101-uclibc-no-gettimeofday-clobber.patch
diff --git a/patches/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch b/packages/gdb/7.12.1/111-xtensa-make-sure-ar_base-is-initialized.patch
index 982bd7f..982bd7f 100644
--- a/patches/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch
+++ b/packages/gdb/7.12.1/111-xtensa-make-sure-ar_base-is-initialized.patch
diff --git a/patches/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch b/packages/gdb/7.12.1/112-WIP-end-of-prologue-detection-hack.patch
index 506a57c..506a57c 100644
--- a/patches/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch
+++ b/packages/gdb/7.12.1/112-WIP-end-of-prologue-detection-hack.patch
diff --git a/patches/gdb/8.0/200-allow-android.patch b/packages/gdb/7.12.1/200-allow-android.patch
index 7954477..7954477 100644
--- a/patches/gdb/8.0/200-allow-android.patch
+++ b/packages/gdb/7.12.1/200-allow-android.patch
diff --git a/packages/gdb/7.12.1/version.desc b/packages/gdb/7.12.1/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gdb/7.12.1/version.desc
diff --git a/packages/gdb/7.1a/version.desc b/packages/gdb/7.1a/version.desc
new file mode 100644
index 0000000..009fd5d
--- /dev/null
+++ b/packages/gdb/7.1a/version.desc
@@ -0,0 +1,3 @@
+obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
+archive_dirname='gdb-7.1'
diff --git a/patches/gdb/7.2a/100-sim-ppc-lz-fix.patch b/packages/gdb/7.2a/100-sim-ppc-lz-fix.patch
index 6f08ef8..6f08ef8 100644
--- a/patches/gdb/7.2a/100-sim-ppc-lz-fix.patch
+++ b/packages/gdb/7.2a/100-sim-ppc-lz-fix.patch
diff --git a/packages/gdb/7.2a/version.desc b/packages/gdb/7.2a/version.desc
new file mode 100644
index 0000000..094d937
--- /dev/null
+++ b/packages/gdb/7.2a/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..f26b5a2
--- /dev/null
+++ b/packages/gdb/7.3.1/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/patches/gdb/7.4.1/00_all_ptrace_setsiginfo.patch b/packages/gdb/7.4.1/00_all_ptrace_setsiginfo.patch
index 81a92db..81a92db 100644
--- a/patches/gdb/7.4.1/00_all_ptrace_setsiginfo.patch
+++ b/packages/gdb/7.4.1/00_all_ptrace_setsiginfo.patch
diff --git a/patches/gdb/7.4.1/05_all_readline-headers.patch b/packages/gdb/7.4.1/05_all_readline-headers.patch
index e65adf6..e65adf6 100644
--- a/patches/gdb/7.4.1/05_all_readline-headers.patch
+++ b/packages/gdb/7.4.1/05_all_readline-headers.patch
diff --git a/packages/gdb/7.4.1/version.desc b/packages/gdb/7.4.1/version.desc
new file mode 100644
index 0000000..f26b5a2
--- /dev/null
+++ b/packages/gdb/7.4.1/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/gdb/7.5.1/version.desc b/packages/gdb/7.5.1/version.desc
new file mode 100644
index 0000000..f26b5a2
--- /dev/null
+++ b/packages/gdb/7.5.1/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..f26b5a2
--- /dev/null
+++ b/packages/gdb/7.6.1/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..f26b5a2
--- /dev/null
+++ b/packages/gdb/7.7.1/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/gdb/7.8.1/version.desc b/packages/gdb/7.8.1/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/gdb/7.8.1/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/gdb/7.9.1/version.desc b/packages/gdb/7.9.1/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/gdb/7.9.1/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/gdb/7.10/100-musl_fix.patch b/packages/gdb/8.0/100-musl_fix.patch
index c0c1e0a..c0c1e0a 100644
--- a/patches/gdb/7.10/100-musl_fix.patch
+++ b/packages/gdb/8.0/100-musl_fix.patch
diff --git a/patches/gdb/7.12.1/101-uclibc-no-gettimeofday-clobber.patch b/packages/gdb/8.0/101-uclibc-no-gettimeofday-clobber.patch
index cd7a4c6..cd7a4c6 100644
--- a/patches/gdb/7.12.1/101-uclibc-no-gettimeofday-clobber.patch
+++ b/packages/gdb/8.0/101-uclibc-no-gettimeofday-clobber.patch
diff --git a/patches/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch b/packages/gdb/8.0/111-xtensa-make-sure-ar_base-is-initialized.patch
index 982bd7f..982bd7f 100644
--- a/patches/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch
+++ b/packages/gdb/8.0/111-xtensa-make-sure-ar_base-is-initialized.patch
diff --git a/patches/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch b/packages/gdb/8.0/112-WIP-end-of-prologue-detection-hack.patch
index 506a57c..506a57c 100644
--- a/patches/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch
+++ b/packages/gdb/8.0/112-WIP-end-of-prologue-detection-hack.patch
diff --git a/patches/gdb/7.12.1/200-allow-android.patch b/packages/gdb/8.0/200-allow-android.patch
index 7954477..7954477 100644
--- a/patches/gdb/7.12.1/200-allow-android.patch
+++ b/packages/gdb/8.0/200-allow-android.patch
diff --git a/packages/gdb/8.0/version.desc b/packages/gdb/8.0/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gdb/8.0/version.desc
diff --git a/packages/gdb/package.desc b/packages/gdb/package.desc
new file mode 100644
index 0000000..0ca1dc6
--- /dev/null
+++ b/packages/gdb/package.desc
@@ -0,0 +1,5 @@
+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/patches/gettext/0.19.8.1/110-Fix-linker-error-redefinition-of-vasprintf.patch b/packages/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch
index dacdfb1..dacdfb1 100644
--- a/patches/gettext/0.19.8.1/110-Fix-linker-error-redefinition-of-vasprintf.patch
+++ b/packages/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch
diff --git a/patches/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch b/packages/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch
index 4624cb5..4624cb5 100644
--- a/patches/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch
+++ b/packages/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch
diff --git a/patches/gettext/0.19.8.1/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch b/packages/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch
index 3487302..3487302 100644
--- a/patches/gettext/0.19.8.1/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch
+++ b/packages/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch
diff --git a/patches/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch b/packages/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch
index 7f980ac..7f980ac 100644
--- a/patches/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch
+++ b/packages/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch
diff --git a/patches/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch b/packages/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch
index caaf0a0..caaf0a0 100644
--- a/patches/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch
+++ b/packages/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch
diff --git a/packages/gettext/0.19.7/version.desc b/packages/gettext/0.19.7/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/gettext/0.19.7/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch b/packages/gettext/0.19.8.1/110-Fix-linker-error-redefinition-of-vasprintf.patch
index dacdfb1..dacdfb1 100644
--- a/patches/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch
+++ b/packages/gettext/0.19.8.1/110-Fix-linker-error-redefinition-of-vasprintf.patch
diff --git a/patches/gettext/0.19.8.1/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch b/packages/gettext/0.19.8.1/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch
index 8c6b94f..8c6b94f 100644
--- a/patches/gettext/0.19.8.1/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch
+++ b/packages/gettext/0.19.8.1/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch
diff --git a/patches/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch b/packages/gettext/0.19.8.1/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch
index 3487302..3487302 100644
--- a/patches/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch
+++ b/packages/gettext/0.19.8.1/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch
diff --git a/packages/gettext/0.19.8.1/version.desc b/packages/gettext/0.19.8.1/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gettext/0.19.8.1/version.desc
diff --git a/packages/gettext/package.desc b/packages/gettext/package.desc
new file mode 100644
index 0000000..ad23b16
--- /dev/null
+++ b/packages/gettext/package.desc
@@ -0,0 +1,6 @@
+repository='git https://git.savannah.gnu.org/git/gettext.git'
+# TBD autogen.sh will check out most recent gnulib - need to make gnulib
+# 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/patches/glibc/linaro-2.20-2014.11/100-sparc-nptl.patch b/packages/glibc-linaro/2.20-2014.11/100-sparc-nptl.patch
index 21f0337..21f0337 100644
--- a/patches/glibc/linaro-2.20-2014.11/100-sparc-nptl.patch
+++ b/packages/glibc-linaro/2.20-2014.11/100-sparc-nptl.patch
diff --git a/patches/glibc/linaro-2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc-linaro/2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/linaro-2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc-linaro/2.20-2014.11/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/linaro-2.20-2014.11/102-fix-signed-shift-overlow.patch b/packages/glibc-linaro/2.20-2014.11/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/linaro-2.20-2014.11/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc-linaro/2.20-2014.11/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/linaro-2.20-2014.11/103-dl-openat64-variadic.patch b/packages/glibc-linaro/2.20-2014.11/103-dl-openat64-variadic.patch
index fe94b96..fe94b96 100644
--- a/patches/glibc/linaro-2.20-2014.11/103-dl-openat64-variadic.patch
+++ b/packages/glibc-linaro/2.20-2014.11/103-dl-openat64-variadic.patch
diff --git a/patches/glibc/linaro-2.20-2014.11/104-unused-variables.patch b/packages/glibc-linaro/2.20-2014.11/104-unused-variables.patch
index 889c9bb..889c9bb 100644
--- a/patches/glibc/linaro-2.20-2014.11/104-unused-variables.patch
+++ b/packages/glibc-linaro/2.20-2014.11/104-unused-variables.patch
diff --git a/patches/glibc/linaro-2.20-2014.11/105-misleading-indentation.patch b/packages/glibc-linaro/2.20-2014.11/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/linaro-2.20-2014.11/105-misleading-indentation.patch
+++ b/packages/glibc-linaro/2.20-2014.11/105-misleading-indentation.patch
diff --git a/patches/glibc/linaro-2.20-2014.11/106-dl-open-array-bounds.patch b/packages/glibc-linaro/2.20-2014.11/106-dl-open-array-bounds.patch
index 08a9076..08a9076 100644
--- a/patches/glibc/linaro-2.20-2014.11/106-dl-open-array-bounds.patch
+++ b/packages/glibc-linaro/2.20-2014.11/106-dl-open-array-bounds.patch
diff --git a/patches/glibc/linaro-2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc-linaro/2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch
index fdc3a60..fdc3a60 100644
--- a/patches/glibc/linaro-2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc-linaro/2.20-2014.11/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/linaro-2.20-2014.11/920-fix-rpc_parse-format.patch b/packages/glibc-linaro/2.20-2014.11/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/linaro-2.20-2014.11/920-fix-rpc_parse-format.patch
+++ b/packages/glibc-linaro/2.20-2014.11/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/linaro-2.20-2014.11/930-explicit-boolean.patch b/packages/glibc-linaro/2.20-2014.11/930-explicit-boolean.patch
index 780fae6..780fae6 100644
--- a/patches/glibc/linaro-2.20-2014.11/930-explicit-boolean.patch
+++ b/packages/glibc-linaro/2.20-2014.11/930-explicit-boolean.patch
diff --git a/patches/glibc/linaro-2.20-2014.11/940-nis-bogus-conditional.patch b/packages/glibc-linaro/2.20-2014.11/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/linaro-2.20-2014.11/940-nis-bogus-conditional.patch
+++ b/packages/glibc-linaro/2.20-2014.11/940-nis-bogus-conditional.patch
diff --git a/packages/glibc-linaro/2.20-2014.11/version.desc b/packages/glibc-linaro/2.20-2014.11/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/glibc-linaro/2.20-2014.11/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/glibc-linaro/package.desc b/packages/glibc-linaro/package.desc
new file mode 100644
index 0000000..7c455d4
--- /dev/null
+++ b/packages/glibc-linaro/package.desc
@@ -0,0 +1,6 @@
+master='glibc'
+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
new file mode 100644
index 0000000..259b285
--- /dev/null
+++ b/packages/glibc-ports/2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch
@@ -0,0 +1,72 @@
+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/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>
+
+ 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/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>
+
+-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/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>
+
+ 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/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>
+
+-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.12.1/330-m68k-sys-user.patch b/packages/glibc-ports/2.12.1/330-m68k-sys-user.patch
new file mode 100644
index 0000000..c3a9c67
--- /dev/null
+++ b/packages/glibc-ports/2.12.1/330-m68k-sys-user.patch
@@ -0,0 +1,96 @@
+copied from kernel as it is sanitized now
+
+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
++
++/* 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 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
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
new file mode 100644
index 0000000..879f8db
--- /dev/null
+++ b/packages/glibc-ports/2.12.1/440-alpha-cache-shape.patch
@@ -0,0 +1,13 @@
+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-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
new file mode 100644
index 0000000..65781b4
--- /dev/null
+++ b/packages/glibc-ports/2.12.1/460-alpha-fix-gcc-4.1-warnings.patch
@@ -0,0 +1,55 @@
+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-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)
+ {
+- __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 --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
new file mode 100644
index 0000000..20b2e32
--- /dev/null
+++ b/packages/glibc-ports/2.12.1/530-alpha-fix-rtld-fPIC.patch
@@ -0,0 +1,20 @@
+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-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)
+ # 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 --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
new file mode 100644
index 0000000..7878ab4
--- /dev/null
+++ b/packages/glibc-ports/2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
@@ -0,0 +1,363 @@
+http://yann.poupet.free.fr/ep93xx/
+Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
+
+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
+ 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-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! */
+
++#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-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
+
++#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-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
+ saved. */
++#ifdef __MAVERICK__
++typedef int __jmp_buf[34];
++#else
+ typedef int __jmp_buf[22];
+ #endif
++#endif
+
+ #endif
+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. */
+
+ #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-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. */
+
+ #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-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.
++ 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-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. */
+
++#ifdef __MAVERICK__
++#define __JMP_BUF_SP 32
++#else
+ #define __JMP_BUF_SP 20
++#endif
+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)
+ /* 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-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. */
+
++#ifdef __MAVERICK__
++#define FIRST_PSEUDO_REGISTER 43
++#else
+ #define FIRST_PSEUDO_REGISTER 27
++#endif
+
+ #include <sysdeps/generic/gccframe.h>
+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
+ # 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 --git a/packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch
new file mode 100644
index 0000000..4d1a51a
--- /dev/null
+++ b/packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch
@@ -0,0 +1,22 @@
+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-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>
+ #include <kernel-features.h>
++#include <tls.h> /* Need THREAD_*, and header.*. */
+
+ #define FUTEX_WAIT 0
+ #define FUTEX_WAKE 1
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
new file mode 100644
index 0000000..deab419
--- /dev/null
+++ b/packages/glibc-ports/2.12.1/610-fpu-cw-mips.patch
@@ -0,0 +1,14 @@
+http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
+
+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
+
+-#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 --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
new file mode 100644
index 0000000..af5dd39
--- /dev/null
+++ b/packages/glibc-ports/2.12.1/670-support-hard-float-eabi.patch
@@ -0,0 +1,22 @@
+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
+ case $config_os in
+- linux-gnueabi)
++ linux-gnueabi*)
+ machine=arm/eabi/$machine
+ ;;
+ *)
+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
+
+-arm.*-.*-linux-gnueabi ld=ld-linux.so.3
++arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3
+ arm.*-.*-linux.* ld=ld-linux.so.2
diff --git a/packages/glibc-ports/2.12.1/version.desc b/packages/glibc-ports/2.12.1/version.desc
new file mode 100644
index 0000000..d44e333
--- /dev/null
+++ 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
new file mode 100644
index 0000000..259b285
--- /dev/null
+++ b/packages/glibc-ports/2.13/090-Fix-ARM-build-with-GCC-trunk.patch
@@ -0,0 +1,72 @@
+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/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>
+
+ 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/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>
+
+-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/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>
+
+ 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/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>
+
+-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.13/330-m68k-sys-user.patch b/packages/glibc-ports/2.13/330-m68k-sys-user.patch
new file mode 100644
index 0000000..a2b4528
--- /dev/null
+++ b/packages/glibc-ports/2.13/330-m68k-sys-user.patch
@@ -0,0 +1,96 @@
+copied from kernel as it is sanitized now
+
+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
++
++/* 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 --git a/packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch b/packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch
new file mode 100644
index 0000000..580c16d
--- /dev/null
+++ b/packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch
@@ -0,0 +1,19 @@
+2011-02-28 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETPIPE_SZ,
+ F_GETPIPE_SZ): Define.
+
+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-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. */
+ # define F_NOTIFY 1026 /* Request notfications on a directory. */
++# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
++# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
+ #endif
+ #ifdef __USE_XOPEN2K8
+ # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+
diff --git a/packages/glibc-ports/2.13/420-alpha-statfs.patch b/packages/glibc-ports/2.13/420-alpha-statfs.patch
new file mode 100644
index 0000000..accb5af
--- /dev/null
+++ b/packages/glibc-ports/2.13/420-alpha-statfs.patch
@@ -0,0 +1,29 @@
+2011-02-28 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/unix/sysv/linux/mips/bits/statfs.h (struct statfs,
+ struct statfs64): Add f_flags field.
+
+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-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;
+ int f_frsize;
+- int f_spare[5];
++ int f_flags;
++ int f_spare[4];
+ };
+
+ #ifdef __USE_LARGEFILE64
+@@ -58,7 +59,8 @@ struct statfs64
+ __fsid_t f_fsid;
+ int f_namelen;
+ int f_frsize;
+- int f_spare[5];
++ int f_flags;
++ int f_spare[4];
+ };
+ #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
new file mode 100644
index 0000000..602c80d
--- /dev/null
+++ b/packages/glibc-ports/2.13/440-alpha-cache-shape.patch
@@ -0,0 +1,13 @@
+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-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
new file mode 100644
index 0000000..0d85ce5
--- /dev/null
+++ b/packages/glibc-ports/2.13/450-alpha-DEFAULT_STACK_PERMS.patch
@@ -0,0 +1,23 @@
+2011-02-28 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/alpha/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X.
+
+diff --git glibc-ports-2.13/sysdeps/alpha/stackinfo.h glibc-ports-2.13/sysdeps/alpha/stackinfo.h
+index 0a281bd..d9dbc35 100644
+--- 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
+
++#include <elf.h>
++
+ /* On Alpha the stack grows down. */
+ #define _STACK_GROWS_DOWN 1
+
++/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is
++ * present, but it is presumed absent. */
++#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
++
+ #endif /* stackinfo.h */
+
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
new file mode 100644
index 0000000..d23ecf9
--- /dev/null
+++ b/packages/glibc-ports/2.13/460-alpha-fix-gcc-4.1-warnings.patch
@@ -0,0 +1,55 @@
+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-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)
+ {
+- __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 --git a/packages/glibc-ports/2.13/470-alpha-feupdateenv.patch b/packages/glibc-ports/2.13/470-alpha-feupdateenv.patch
new file mode 100644
index 0000000..ea1e056
--- /dev/null
+++ b/packages/glibc-ports/2.13/470-alpha-feupdateenv.patch
@@ -0,0 +1,26 @@
+2011-03-01 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/alpha/fpu/feupdateenv.c (feupdateenv): Add
+ libm_hidden_def.
+ * sysdeps/alpha/fpu/ftestexcept.c (fetestexcept): Likewise.
+
+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-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-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c
+index a4b3081..34d8113 100644
+--- 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;
+ }
++libm_hidden_def (fetestexcept)
+
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
new file mode 100644
index 0000000..38562b6
--- /dev/null
+++ b/packages/glibc-ports/2.13/530-alpha-fix-rtld-fPIC.patch
@@ -0,0 +1,20 @@
+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-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)
+ # 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 --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
new file mode 100644
index 0000000..b7d54ac
--- /dev/null
+++ b/packages/glibc-ports/2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
@@ -0,0 +1,363 @@
+http://yann.poupet.free.fr/ep93xx/
+Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
+
+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
+ 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-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! */
+
++#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-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
+
++#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-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
+ saved. */
++#ifdef __MAVERICK__
++typedef int __jmp_buf[34];
++#else
+ typedef int __jmp_buf[22];
+ #endif
++#endif
+
+ #endif
+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. */
+
+ #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-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. */
+
+ #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-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.
++ 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-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. */
+
++#ifdef __MAVERICK__
++#define __JMP_BUF_SP 32
++#else
+ #define __JMP_BUF_SP 20
++#endif
+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)
+ /* 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-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. */
+
++#ifdef __MAVERICK__
++#define FIRST_PSEUDO_REGISTER 43
++#else
+ #define FIRST_PSEUDO_REGISTER 27
++#endif
+
+ #include <sysdeps/generic/gccframe.h>
+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
+ # 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 --git a/packages/glibc-ports/2.13/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.13/580-nptl-lowlevellock.patch
new file mode 100644
index 0000000..9f3fb76
--- /dev/null
+++ b/packages/glibc-ports/2.13/580-nptl-lowlevellock.patch
@@ -0,0 +1,22 @@
+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-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>
+ #include <kernel-features.h>
++#include <tls.h> /* Need THREAD_*, and header.*. */
+
+ #define FUTEX_WAIT 0
+ #define FUTEX_WAKE 1
diff --git a/packages/glibc-ports/2.13/610-fpu-cw-mips.patch b/packages/glibc-ports/2.13/610-fpu-cw-mips.patch
new file mode 100644
index 0000000..c6345b3
--- /dev/null
+++ b/packages/glibc-ports/2.13/610-fpu-cw-mips.patch
@@ -0,0 +1,14 @@
+http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
+
+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
+
+-#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 --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
new file mode 100644
index 0000000..ec00405
--- /dev/null
+++ b/packages/glibc-ports/2.13/670-support-hard-float-eabi.patch
@@ -0,0 +1,22 @@
+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
+ case $config_os in
+- linux-gnueabi)
++ linux-gnueabi*)
+ machine=arm/eabi/$machine
+ if [ "${CFLAGS+set}" != "set" ]; then
+ CFLAGS="-g -O2"
+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
+
+-arm.*-.*-linux-gnueabi ld=ld-linux.so.3
++arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3
+ arm.*-.*-linux.* ld=ld-linux.so.2
diff --git a/packages/glibc-ports/2.13/version.desc b/packages/glibc-ports/2.13/version.desc
new file mode 100644
index 0000000..d44e333
--- /dev/null
+++ 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
new file mode 100644
index 0000000..259b285
--- /dev/null
+++ b/packages/glibc-ports/2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch
@@ -0,0 +1,72 @@
+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/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>
+
+ 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/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>
+
+-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/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>
+
+ 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/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>
+
+-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.1/330-m68k-sys-user.patch b/packages/glibc-ports/2.14.1/330-m68k-sys-user.patch
new file mode 100644
index 0000000..6476b5c
--- /dev/null
+++ b/packages/glibc-ports/2.14.1/330-m68k-sys-user.patch
@@ -0,0 +1,96 @@
+copied from kernel as it is sanitized now
+
+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
++
++/* 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 --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
new file mode 100644
index 0000000..989bfd7
--- /dev/null
+++ b/packages/glibc-ports/2.14.1/440-alpha-cache-shape.patch
@@ -0,0 +1,13 @@
+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-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
new file mode 100644
index 0000000..2ed4118
--- /dev/null
+++ b/packages/glibc-ports/2.14.1/460-alpha-fix-gcc-4.1-warnings.patch
@@ -0,0 +1,55 @@
+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-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)
+ {
+- __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 --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
new file mode 100644
index 0000000..56bc532
--- /dev/null
+++ b/packages/glibc-ports/2.14.1/530-alpha-fix-rtld-fPIC.patch
@@ -0,0 +1,20 @@
+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-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)
+ # 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 --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
new file mode 100644
index 0000000..80032ed
--- /dev/null
+++ b/packages/glibc-ports/2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
@@ -0,0 +1,363 @@
+http://yann.poupet.free.fr/ep93xx/
+Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
+
+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
+ 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-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! */
+
++#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-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
+
++#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-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
+ saved. */
++#ifdef __MAVERICK__
++typedef int __jmp_buf[34];
++#else
+ typedef int __jmp_buf[22];
+ #endif
++#endif
+
+ #endif
+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. */
+
+ #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-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. */
+
+ #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-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.
++ 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-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. */
+
++#ifdef __MAVERICK__
++#define __JMP_BUF_SP 32
++#else
+ #define __JMP_BUF_SP 20
++#endif
+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)
+ /* 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-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. */
+
++#ifdef __MAVERICK__
++#define FIRST_PSEUDO_REGISTER 43
++#else
+ #define FIRST_PSEUDO_REGISTER 27
++#endif
+
+ #include <sysdeps/generic/gccframe.h>
+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
+ # 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 --git a/packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch
new file mode 100644
index 0000000..62b74d8
--- /dev/null
+++ b/packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch
@@ -0,0 +1,22 @@
+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-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>
+ #include <kernel-features.h>
++#include <tls.h> /* Need THREAD_*, and header.*. */
+
+ #define FUTEX_WAIT 0
+ #define FUTEX_WAKE 1
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
new file mode 100644
index 0000000..4b8365a
--- /dev/null
+++ b/packages/glibc-ports/2.14.1/610-fpu-cw-mips.patch
@@ -0,0 +1,14 @@
+http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
+
+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
+
+-#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 --git a/packages/glibc-ports/2.14.1/version.desc b/packages/glibc-ports/2.14.1/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/glibc-ports/2.14.1/version.desc
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
new file mode 100644
index 0000000..259b285
--- /dev/null
+++ b/packages/glibc-ports/2.15/090-Fix-ARM-build-with-GCC-trunk.patch
@@ -0,0 +1,72 @@
+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/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>
+
+ 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/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>
+
+-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/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>
+
+ 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/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>
+
+-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.15/091-libmemusage-link-failure.patch b/packages/glibc-ports/2.15/091-libmemusage-link-failure.patch
new file mode 100644
index 0000000..23d8813
--- /dev/null
+++ b/packages/glibc-ports/2.15/091-libmemusage-link-failure.patch
@@ -0,0 +1,19 @@
+commit 2d80bda39073a35af4b904d27fa1511cd309b26f
+Author: Nathan Sidwell <nathan@codesourcery.com>
+Date: Fri Jan 6 20:14:44 2012 +0000
+
+ Add ARM dependency of libmemusage.so on libc_nonshared.a.
+
+diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
+index 5651161..1a88430 100644
+--- a/sysdeps/arm/Makefile
++++ b/sysdeps/arm/Makefile
+@@ -7,3 +7,8 @@ endif
+ ifeq ($(subdir),csu)
+ gen-as-const-headers += tlsdesc.sym
+ endif
++
++# to pull in __aeabi_read_tp, needed for tls
++ifeq ($(subdir),malloc)
++$(objpfx)libmemusage.so: $(common-objpfx)libc_nonshared.a
++endif
diff --git a/packages/glibc-ports/2.15/330-m68k-sys-user.patch b/packages/glibc-ports/2.15/330-m68k-sys-user.patch
new file mode 100644
index 0000000..388bc62
--- /dev/null
+++ b/packages/glibc-ports/2.15/330-m68k-sys-user.patch
@@ -0,0 +1,96 @@
+copied from kernel as it is sanitized now
+
+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
++
++/* 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 --git a/packages/glibc-ports/2.15/440-alpha-cache-shape.patch b/packages/glibc-ports/2.15/440-alpha-cache-shape.patch
new file mode 100644
index 0000000..a9c9db0
--- /dev/null
+++ b/packages/glibc-ports/2.15/440-alpha-cache-shape.patch
@@ -0,0 +1,13 @@
+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-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
new file mode 100644
index 0000000..05a197e
--- /dev/null
+++ b/packages/glibc-ports/2.15/460-alpha-fix-gcc-4.1-warnings.patch
@@ -0,0 +1,55 @@
+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-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)
+ {
+- __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 --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
new file mode 100644
index 0000000..8f9ce0d
--- /dev/null
+++ b/packages/glibc-ports/2.15/530-alpha-fix-rtld-fPIC.patch
@@ -0,0 +1,20 @@
+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-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)
+ # 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 --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
new file mode 100644
index 0000000..427fb03
--- /dev/null
+++ b/packages/glibc-ports/2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
@@ -0,0 +1,363 @@
+http://yann.poupet.free.fr/ep93xx/
+Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
+
+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
+ 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-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! */
+
++#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-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
+
++#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-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
+ saved. */
++#ifdef __MAVERICK__
++typedef int __jmp_buf[34];
++#else
+ typedef int __jmp_buf[22];
+ #endif
++#endif
+
+ #endif
+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. */
+
+ #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-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. */
+
+ #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-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.
++ 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-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. */
+
++#ifdef __MAVERICK__
++#define __JMP_BUF_SP 32
++#else
+ #define __JMP_BUF_SP 20
++#endif
+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)
+ /* 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-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. */
+
++#ifdef __MAVERICK__
++#define FIRST_PSEUDO_REGISTER 43
++#else
+ #define FIRST_PSEUDO_REGISTER 27
++#endif
+
+ #include <sysdeps/generic/gccframe.h>
+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
+ # 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 --git a/packages/glibc-ports/2.15/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.15/580-nptl-lowlevellock.patch
new file mode 100644
index 0000000..8a841be
--- /dev/null
+++ b/packages/glibc-ports/2.15/580-nptl-lowlevellock.patch
@@ -0,0 +1,22 @@
+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-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>
+ #include <kernel-features.h>
++#include <tls.h> /* Need THREAD_*, and header.*. */
+
+ #define FUTEX_WAIT 0
+ #define FUTEX_WAKE 1
diff --git a/packages/glibc-ports/2.15/610-fpu-cw-mips.patch b/packages/glibc-ports/2.15/610-fpu-cw-mips.patch
new file mode 100644
index 0000000..388e4d6
--- /dev/null
+++ b/packages/glibc-ports/2.15/610-fpu-cw-mips.patch
@@ -0,0 +1,14 @@
+http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
+
+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
+
+-#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 --git a/packages/glibc-ports/2.15/version.desc b/packages/glibc-ports/2.15/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/glibc-ports/2.15/version.desc
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
new file mode 100644
index 0000000..1f08ba1
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch
@@ -0,0 +1,54 @@
+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(-)
+
+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/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>
+
+ 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)
+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/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>
+
+-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 *);
+
+--
+1.9.4
+
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
new file mode 100644
index 0000000..932d917
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch
@@ -0,0 +1,96 @@
+copied from kernel as it is sanitized now
+
+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
++
++/* 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 --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
new file mode 100644
index 0000000..7612872
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch
@@ -0,0 +1,13 @@
+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.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
new file mode 100644
index 0000000..96f1646
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch
@@ -0,0 +1,55 @@
+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-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)
+ {
+- __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 --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
new file mode 100644
index 0000000..db9c890
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch
@@ -0,0 +1,20 @@
+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-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)
+ # 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 --git a/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch
new file mode 100644
index 0000000..a1c6c7a
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch
@@ -0,0 +1,22 @@
+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-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>
+ #include <kernel-features.h>
++#include <tls.h> /* Need THREAD_*, and header.*. */
+
+ #define FUTEX_WAIT 0
+ #define FUTEX_WAKE 1
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
new file mode 100644
index 0000000..ef42c8f
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch
@@ -0,0 +1,14 @@
+http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
+
+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
+
+-#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 --git a/packages/glibc-ports/2.16.0/version.desc b/packages/glibc-ports/2.16.0/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/version.desc
diff --git a/packages/glibc-ports/package.desc b/packages/glibc-ports/package.desc
new file mode 100644
index 0000000..f273120
--- /dev/null
+++ b/packages/glibc-ports/package.desc
@@ -0,0 +1,10 @@
+# This is not a true package, but rather a part of glibc. When
+# 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)'
+
+# 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/patches/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/patches/glibc/ports-2.12.1/100-respect-env-CPPFLAGS.patch
+++ b/packages/glibc/2.12.1/100-respect-env-CPPFLAGS.patch
diff --git a/patches/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.22/102-fix-signed-shift-overlow.patch b/packages/glibc/2.12.1/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/2.22/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc/2.12.1/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/2.14/104-unused-variables.patch b/packages/glibc/2.12.1/104-unused-variables.patch
index e063675..e063675 100644
--- a/patches/glibc/2.14/104-unused-variables.patch
+++ b/packages/glibc/2.12.1/104-unused-variables.patch
diff --git a/patches/glibc/2.22/105-misleading-indentation.patch b/packages/glibc/2.12.1/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/2.22/105-misleading-indentation.patch
+++ b/packages/glibc/2.12.1/105-misleading-indentation.patch
diff --git a/patches/glibc/2.15/106-dl-open-array-bounds.patch b/packages/glibc/2.12.1/106-dl-open-array-bounds.patch
index bdb5c19..bdb5c19 100644
--- a/patches/glibc/2.15/106-dl-open-array-bounds.patch
+++ b/packages/glibc/2.12.1/106-dl-open-array-bounds.patch
diff --git a/patches/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/patches/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/patches/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch
index 530d4ff..530d4ff 100644
--- a/patches/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/ports-2.12.1/140-disable-ldconfig.patch b/packages/glibc/2.12.1/140-disable-ldconfig.patch
index 43330b8..43330b8 100644
--- a/patches/glibc/ports-2.12.1/140-disable-ldconfig.patch
+++ b/packages/glibc/2.12.1/140-disable-ldconfig.patch
diff --git a/patches/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/patches/glibc/ports-2.12.1/150-queue-header-updates.patch
+++ b/packages/glibc/2.12.1/150-queue-header-updates.patch
diff --git a/patches/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/patches/glibc/ports-2.12.1/160-manual-no-perl.patch
+++ b/packages/glibc/2.12.1/160-manual-no-perl.patch
diff --git a/patches/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/patches/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch
+++ b/packages/glibc/2.12.1/170-localedef-fix-trampoline.patch
diff --git a/patches/glibc/ports-2.12.1/180-resolv-dynamic.patch b/packages/glibc/2.12.1/180-resolv-dynamic.patch
index 8f74a53..8f74a53 100644
--- a/patches/glibc/ports-2.12.1/180-resolv-dynamic.patch
+++ b/packages/glibc/2.12.1/180-resolv-dynamic.patch
diff --git a/patches/glibc/ports-2.12.1/190-localedef-mmap.patch b/packages/glibc/2.12.1/190-localedef-mmap.patch
index b24ed80..b24ed80 100644
--- a/patches/glibc/ports-2.12.1/190-localedef-mmap.patch
+++ b/packages/glibc/2.12.1/190-localedef-mmap.patch
diff --git a/patches/glibc/ports-2.12.1/200-fadvise64_64.patch b/packages/glibc/2.12.1/200-fadvise64_64.patch
index a9f10cd..a9f10cd 100644
--- a/patches/glibc/ports-2.12.1/200-fadvise64_64.patch
+++ b/packages/glibc/2.12.1/200-fadvise64_64.patch
diff --git a/patches/glibc/ports-2.12.1/220-section-comments.patch b/packages/glibc/2.12.1/220-section-comments.patch
index 4d35535..4d35535 100644
--- a/patches/glibc/ports-2.12.1/220-section-comments.patch
+++ b/packages/glibc/2.12.1/220-section-comments.patch
diff --git a/patches/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/patches/glibc/ports-2.12.1/230-no-inline-gmon.patch
+++ b/packages/glibc/2.12.1/230-no-inline-gmon.patch
diff --git a/patches/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/patches/glibc/ports-2.12.1/240-check_native-headers.patch
+++ b/packages/glibc/2.12.1/240-check_native-headers.patch
diff --git a/patches/glibc/ports-2.12.1/250-fix-pr631.patch b/packages/glibc/2.12.1/250-fix-pr631.patch
index af5b347..af5b347 100644
--- a/patches/glibc/ports-2.12.1/250-fix-pr631.patch
+++ b/packages/glibc/2.12.1/250-fix-pr631.patch
diff --git a/patches/glibc/ports-2.12.1/260-assume-pipe2.patch b/packages/glibc/2.12.1/260-assume-pipe2.patch
index b84f882..b84f882 100644
--- a/patches/glibc/ports-2.12.1/260-assume-pipe2.patch
+++ b/packages/glibc/2.12.1/260-assume-pipe2.patch
diff --git a/patches/glibc/ports-2.12.1/270-china.patch b/packages/glibc/2.12.1/270-china.patch
index 4cde1cf..4cde1cf 100644
--- a/patches/glibc/ports-2.12.1/270-china.patch
+++ b/packages/glibc/2.12.1/270-china.patch
diff --git a/patches/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/patches/glibc/ports-2.12.1/280-new-valencian-locale.patch
+++ b/packages/glibc/2.12.1/280-new-valencian-locale.patch
diff --git a/patches/glibc/2.18/300-macos-cross-rpcgen.patch b/packages/glibc/2.12.1/300-macos-cross-rpcgen.patch
index e654644..e654644 100644
--- a/patches/glibc/2.18/300-macos-cross-rpcgen.patch
+++ b/packages/glibc/2.12.1/300-macos-cross-rpcgen.patch
diff --git a/patches/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/patches/glibc/ports-2.12.1/300-nscd-one-fork.patch
+++ b/packages/glibc/2.12.1/300-nscd-one-fork.patch
diff --git a/patches/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/patches/glibc/ports-2.12.1/310-hppa-nptl-carlos.patch
+++ b/packages/glibc/2.12.1/310-hppa-nptl-carlos.patch
diff --git a/patches/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/patches/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/patches/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/patches/glibc/ports-2.12.1/350-pre20040117-pt_pax.patch
+++ b/packages/glibc/2.12.1/350-pre20040117-pt_pax.patch
diff --git a/patches/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/patches/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/patches/glibc/ports-2.12.1/370-fnmatch.patch b/packages/glibc/2.12.1/370-fnmatch.patch
index f345b35..f345b35 100644
--- a/patches/glibc/ports-2.12.1/370-fnmatch.patch
+++ b/packages/glibc/2.12.1/370-fnmatch.patch
diff --git a/patches/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/patches/glibc/ports-2.12.1/380-dont-build-timezone.patch
+++ b/packages/glibc/2.12.1/380-dont-build-timezone.patch
diff --git a/patches/glibc/ports-2.12.1/400-alpha-xstat.patch b/packages/glibc/2.12.1/400-alpha-xstat.patch
index 97bea98..97bea98 100644
--- a/patches/glibc/ports-2.12.1/400-alpha-xstat.patch
+++ b/packages/glibc/2.12.1/400-alpha-xstat.patch
diff --git a/patches/glibc/ports-2.12.1/430-alpha-creat.patch b/packages/glibc/2.12.1/430-alpha-creat.patch
index bfb72d0..bfb72d0 100644
--- a/patches/glibc/ports-2.12.1/430-alpha-creat.patch
+++ b/packages/glibc/2.12.1/430-alpha-creat.patch
diff --git a/patches/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/patches/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/patches/glibc/ports-2.12.1/560-ppc-atomic.patch b/packages/glibc/2.12.1/560-ppc-atomic.patch
index 679ef18..679ef18 100644
--- a/patches/glibc/ports-2.12.1/560-ppc-atomic.patch
+++ b/packages/glibc/2.12.1/560-ppc-atomic.patch
diff --git a/patches/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/patches/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/patches/glibc/ports-2.12.1/640-alpha-atfcts.patch b/packages/glibc/2.12.1/640-alpha-atfcts.patch
index 90a9d0d..90a9d0d 100644
--- a/patches/glibc/ports-2.12.1/640-alpha-atfcts.patch
+++ b/packages/glibc/2.12.1/640-alpha-atfcts.patch
diff --git a/patches/glibc/ports-2.16.0/650-syslog.patch b/packages/glibc/2.12.1/650-syslog.patch
index c20cafc..c20cafc 100644
--- a/patches/glibc/ports-2.16.0/650-syslog.patch
+++ b/packages/glibc/2.12.1/650-syslog.patch
diff --git a/patches/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/patches/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/patches/glibc/2.13/900-march-i686.patch b/packages/glibc/2.12.1/900-march-i686.patch
index 7f5b1ce..7f5b1ce 100644
--- a/patches/glibc/2.13/900-march-i686.patch
+++ b/packages/glibc/2.12.1/900-march-i686.patch
diff --git a/patches/glibc/2.19/910-typedef-caddr.patch b/packages/glibc/2.12.1/910-typedef-caddr.patch
index e29e810..e29e810 100644
--- a/patches/glibc/2.19/910-typedef-caddr.patch
+++ b/packages/glibc/2.12.1/910-typedef-caddr.patch
diff --git a/patches/glibc/2.24/920-fix-rpc_parse-format.patch b/packages/glibc/2.12.1/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.24/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.12.1/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.12.1/920-make-382.patch b/packages/glibc/2.12.1/920-make-382.patch
index 28be2fe..28be2fe 100644
--- a/patches/glibc/2.12.1/920-make-382.patch
+++ b/packages/glibc/2.12.1/920-make-382.patch
diff --git a/patches/glibc/2.24/940-nis-bogus-conditional.patch b/packages/glibc/2.12.1/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.24/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.12.1/940-nis-bogus-conditional.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/patches/glibc/2.12.1/999-new-tools.patch b/packages/glibc/2.12.1/999-new-tools.patch
index d600b58..d600b58 100644
--- a/patches/glibc/2.12.1/999-new-tools.patch
+++ b/packages/glibc/2.12.1/999-new-tools.patch
diff --git a/packages/glibc/2.12.1/version.desc b/packages/glibc/2.12.1/version.desc
new file mode 100644
index 0000000..fb988b5
--- /dev/null
+++ b/packages/glibc/2.12.1/version.desc
@@ -0,0 +1 @@
+# Not obsolete (CentOS 6, EOL 11/2020)
diff --git a/patches/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch
index 530d4ff..530d4ff 100644
--- a/patches/glibc/2.12.1/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.12.2/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/2.17/300-macos-cross-rpcgen.patch b/packages/glibc/2.12.2/300-macos-cross-rpcgen.patch
index e654644..e654644 100644
--- a/patches/glibc/2.17/300-macos-cross-rpcgen.patch
+++ b/packages/glibc/2.12.2/300-macos-cross-rpcgen.patch
diff --git a/patches/glibc/2.12.2/900-march-i686.patch b/packages/glibc/2.12.2/900-march-i686.patch
index 6030de9..6030de9 100644
--- a/patches/glibc/2.12.2/900-march-i686.patch
+++ b/packages/glibc/2.12.2/900-march-i686.patch
diff --git a/patches/glibc/2.12.2/910-typedef-caddr.patch b/packages/glibc/2.12.2/910-typedef-caddr.patch
index 4bc75cb..4bc75cb 100644
--- a/patches/glibc/2.12.2/910-typedef-caddr.patch
+++ b/packages/glibc/2.12.2/910-typedef-caddr.patch
diff --git a/patches/glibc/2.23/920-fix-rpc_parse-format.patch b/packages/glibc/2.12.2/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.23/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.12.2/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.23/940-nis-bogus-conditional.patch b/packages/glibc/2.12.2/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.23/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.12.2/940-nis-bogus-conditional.patch
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/patches/glibc/2.12.2/999-new-tools.patch b/packages/glibc/2.12.2/999-new-tools.patch
index e2f7b1d..e2f7b1d 100644
--- a/patches/glibc/2.12.2/999-new-tools.patch
+++ b/packages/glibc/2.12.2/999-new-tools.patch
diff --git a/packages/glibc/2.12.2/version.desc b/packages/glibc/2.12.2/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/glibc/2.12.2/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/glibc/ports-2.15/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.13/100-respect-env-CPPFLAGS.patch
index 3798cb2..3798cb2 100644
--- a/patches/glibc/ports-2.15/100-respect-env-CPPFLAGS.patch
+++ b/packages/glibc/2.13/100-respect-env-CPPFLAGS.patch
diff --git a/patches/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.21/102-fix-signed-shift-overlow.patch b/packages/glibc/2.13/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/2.21/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc/2.13/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/2.14.1/104-unused-variables.patch b/packages/glibc/2.13/104-unused-variables.patch
index e063675..e063675 100644
--- a/patches/glibc/2.14.1/104-unused-variables.patch
+++ b/packages/glibc/2.13/104-unused-variables.patch
diff --git a/patches/glibc/2.21/105-misleading-indentation.patch b/packages/glibc/2.13/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/2.21/105-misleading-indentation.patch
+++ b/packages/glibc/2.13/105-misleading-indentation.patch
diff --git a/patches/glibc/2.14/106-dl-open-array-bounds.patch b/packages/glibc/2.13/106-dl-open-array-bounds.patch
index bdb5c19..bdb5c19 100644
--- a/patches/glibc/2.14/106-dl-open-array-bounds.patch
+++ b/packages/glibc/2.13/106-dl-open-array-bounds.patch
diff --git a/patches/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/patches/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/patches/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch
index da21d9e..da21d9e 100644
--- a/patches/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.13/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/ports-2.16.0/140-disable-ldconfig.patch b/packages/glibc/2.13/140-disable-ldconfig.patch
index 378e1df..378e1df 100644
--- a/patches/glibc/ports-2.16.0/140-disable-ldconfig.patch
+++ b/packages/glibc/2.13/140-disable-ldconfig.patch
diff --git a/patches/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/patches/glibc/ports-2.16.0/150-queue-header-updates.patch
+++ b/packages/glibc/2.13/150-queue-header-updates.patch
diff --git a/patches/glibc/ports-2.15/160-manual-no-perl.patch b/packages/glibc/2.13/160-manual-no-perl.patch
index 5e2b807..5e2b807 100644
--- a/patches/glibc/ports-2.15/160-manual-no-perl.patch
+++ b/packages/glibc/2.13/160-manual-no-perl.patch
diff --git a/patches/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/patches/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch
+++ b/packages/glibc/2.13/170-localedef-fix-trampoline.patch
diff --git a/patches/glibc/ports-2.16.0/180-resolv-dynamic.patch b/packages/glibc/2.13/180-resolv-dynamic.patch
index e916bce..e916bce 100644
--- a/patches/glibc/ports-2.16.0/180-resolv-dynamic.patch
+++ b/packages/glibc/2.13/180-resolv-dynamic.patch
diff --git a/patches/glibc/ports-2.14/190-localedef-mmap.patch b/packages/glibc/2.13/190-localedef-mmap.patch
index f3914cd..f3914cd 100644
--- a/patches/glibc/ports-2.14/190-localedef-mmap.patch
+++ b/packages/glibc/2.13/190-localedef-mmap.patch
diff --git a/patches/glibc/ports-2.16.0/200-fadvise64_64.patch b/packages/glibc/2.13/200-fadvise64_64.patch
index 71bca38..71bca38 100644
--- a/patches/glibc/ports-2.16.0/200-fadvise64_64.patch
+++ b/packages/glibc/2.13/200-fadvise64_64.patch
diff --git a/patches/glibc/ports-2.15/220-section-comments.patch b/packages/glibc/2.13/220-section-comments.patch
index d717829..d717829 100644
--- a/patches/glibc/ports-2.15/220-section-comments.patch
+++ b/packages/glibc/2.13/220-section-comments.patch
diff --git a/patches/glibc/ports-2.15/230-no-inline-gmon.patch b/packages/glibc/2.13/230-no-inline-gmon.patch
index fa33c2b..fa33c2b 100644
--- a/patches/glibc/ports-2.15/230-no-inline-gmon.patch
+++ b/packages/glibc/2.13/230-no-inline-gmon.patch
diff --git a/patches/glibc/ports-2.14/240-check_native-headers.patch b/packages/glibc/2.13/240-check_native-headers.patch
index c936f71..c936f71 100644
--- a/patches/glibc/ports-2.14/240-check_native-headers.patch
+++ b/packages/glibc/2.13/240-check_native-headers.patch
diff --git a/patches/glibc/ports-2.13/250-fix-pr631.patch b/packages/glibc/2.13/250-fix-pr631.patch
index a48912e..a48912e 100644
--- a/patches/glibc/ports-2.13/250-fix-pr631.patch
+++ b/packages/glibc/2.13/250-fix-pr631.patch
diff --git a/patches/glibc/ports-2.15/260-assume-pipe2.patch b/packages/glibc/2.13/260-assume-pipe2.patch
index 42e8f4e..42e8f4e 100644
--- a/patches/glibc/ports-2.15/260-assume-pipe2.patch
+++ b/packages/glibc/2.13/260-assume-pipe2.patch
diff --git a/patches/glibc/ports-2.16.0/270-china.patch b/packages/glibc/2.13/270-china.patch
index 41d7759..41d7759 100644
--- a/patches/glibc/ports-2.16.0/270-china.patch
+++ b/packages/glibc/2.13/270-china.patch
diff --git a/patches/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/patches/glibc/ports-2.16.0/280-new-valencian-locale.patch
+++ b/packages/glibc/2.13/280-new-valencian-locale.patch
diff --git a/patches/glibc/2.16.0/300-macos-cross-rpcgen.patch b/packages/glibc/2.13/300-macos-cross-rpcgen.patch
index e654644..e654644 100644
--- a/patches/glibc/2.16.0/300-macos-cross-rpcgen.patch
+++ b/packages/glibc/2.13/300-macos-cross-rpcgen.patch
diff --git a/patches/glibc/ports-2.15/300-nscd-one-fork.patch b/packages/glibc/2.13/300-nscd-one-fork.patch
index adc9b3f..adc9b3f 100644
--- a/patches/glibc/ports-2.15/300-nscd-one-fork.patch
+++ b/packages/glibc/2.13/300-nscd-one-fork.patch
diff --git a/patches/glibc/ports-2.15/310-hppa-nptl-carlos.patch b/packages/glibc/2.13/310-hppa-nptl-carlos.patch
index 4c028b2..4c028b2 100644
--- a/patches/glibc/ports-2.15/310-hppa-nptl-carlos.patch
+++ b/packages/glibc/2.13/310-hppa-nptl-carlos.patch
diff --git a/patches/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/patches/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/patches/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/patches/glibc/ports-2.16.0/350-pre20040117-pt_pax.patch
+++ b/packages/glibc/2.13/350-pre20040117-pt_pax.patch
diff --git a/patches/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/patches/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/patches/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/patches/glibc/ports-2.16.0/380-dont-build-timezone.patch
+++ b/packages/glibc/2.13/380-dont-build-timezone.patch
diff --git a/patches/glibc/ports-2.16.0/400-alpha-xstat.patch b/packages/glibc/2.13/400-alpha-xstat.patch
index 6e4ab8f..6e4ab8f 100644
--- a/patches/glibc/ports-2.16.0/400-alpha-xstat.patch
+++ b/packages/glibc/2.13/400-alpha-xstat.patch
diff --git a/patches/glibc/ports-2.16.0/430-alpha-creat.patch b/packages/glibc/2.13/430-alpha-creat.patch
index da6ddda..da6ddda 100644
--- a/patches/glibc/ports-2.16.0/430-alpha-creat.patch
+++ b/packages/glibc/2.13/430-alpha-creat.patch
diff --git a/patches/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/patches/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/patches/glibc/ports-2.16.0/560-ppc-atomic.patch b/packages/glibc/2.13/560-ppc-atomic.patch
index ee1cb90..ee1cb90 100644
--- a/patches/glibc/ports-2.16.0/560-ppc-atomic.patch
+++ b/packages/glibc/2.13/560-ppc-atomic.patch
diff --git a/patches/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/patches/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/patches/glibc/ports-2.16.0/640-alpha-atfcts.patch b/packages/glibc/2.13/640-alpha-atfcts.patch
index 7a8a94a..7a8a94a 100644
--- a/patches/glibc/ports-2.16.0/640-alpha-atfcts.patch
+++ b/packages/glibc/2.13/640-alpha-atfcts.patch
diff --git a/patches/glibc/ports-2.15/650-syslog.patch b/packages/glibc/2.13/650-syslog.patch
index c20cafc..c20cafc 100644
--- a/patches/glibc/ports-2.15/650-syslog.patch
+++ b/packages/glibc/2.13/650-syslog.patch
diff --git a/patches/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/patches/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/patches/glibc/2.12.1/900-march-i686.patch b/packages/glibc/2.13/900-march-i686.patch
index 7f5b1ce..7f5b1ce 100644
--- a/patches/glibc/2.12.1/900-march-i686.patch
+++ b/packages/glibc/2.13/900-march-i686.patch
diff --git a/patches/glibc/2.13/910-typedef-caddr.patch b/packages/glibc/2.13/910-typedef-caddr.patch
index e29e810..e29e810 100644
--- a/patches/glibc/2.13/910-typedef-caddr.patch
+++ b/packages/glibc/2.13/910-typedef-caddr.patch
diff --git a/patches/glibc/2.22/920-fix-rpc_parse-format.patch b/packages/glibc/2.13/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.22/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.13/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.22/940-nis-bogus-conditional.patch b/packages/glibc/2.13/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.22/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.13/940-nis-bogus-conditional.patch
diff --git a/patches/glibc/2.14/950-initfini-ppc64.patch b/packages/glibc/2.13/950-initfini-ppc64.patch
index 87f8d23..87f8d23 100644
--- a/patches/glibc/2.14/950-initfini-ppc64.patch
+++ b/packages/glibc/2.13/950-initfini-ppc64.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/patches/glibc/2.13/999-new-tools.patch b/packages/glibc/2.13/999-new-tools.patch
index d2d498a..d2d498a 100644
--- a/patches/glibc/2.13/999-new-tools.patch
+++ b/packages/glibc/2.13/999-new-tools.patch
diff --git a/packages/glibc/2.13/version.desc b/packages/glibc/2.13/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/glibc/2.13/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/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/patches/glibc/ports-2.14/100-respect-env-CPPFLAGS.patch
+++ b/packages/glibc/2.14.1/100-respect-env-CPPFLAGS.patch
diff --git a/patches/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.20/102-fix-signed-shift-overlow.patch b/packages/glibc/2.14.1/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/2.20/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc/2.14.1/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/2.21/103-dl-openat64-variadic.patch b/packages/glibc/2.14.1/103-dl-openat64-variadic.patch
index fe94b96..fe94b96 100644
--- a/patches/glibc/2.21/103-dl-openat64-variadic.patch
+++ b/packages/glibc/2.14.1/103-dl-openat64-variadic.patch
diff --git a/patches/glibc/2.13/104-unused-variables.patch b/packages/glibc/2.14.1/104-unused-variables.patch
index e063675..e063675 100644
--- a/patches/glibc/2.13/104-unused-variables.patch
+++ b/packages/glibc/2.14.1/104-unused-variables.patch
diff --git a/patches/glibc/2.20/105-misleading-indentation.patch b/packages/glibc/2.14.1/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/2.20/105-misleading-indentation.patch
+++ b/packages/glibc/2.14.1/105-misleading-indentation.patch
diff --git a/patches/glibc/2.14.1/106-dl-open-array-bounds.patch b/packages/glibc/2.14.1/106-dl-open-array-bounds.patch
index bdb5c19..bdb5c19 100644
--- a/patches/glibc/2.14.1/106-dl-open-array-bounds.patch
+++ b/packages/glibc/2.14.1/106-dl-open-array-bounds.patch
diff --git a/patches/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/patches/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/patches/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch
index d720d39..d720d39 100644
--- a/patches/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/ports-2.15/140-disable-ldconfig.patch b/packages/glibc/2.14.1/140-disable-ldconfig.patch
index 378e1df..378e1df 100644
--- a/patches/glibc/ports-2.15/140-disable-ldconfig.patch
+++ b/packages/glibc/2.14.1/140-disable-ldconfig.patch
diff --git a/patches/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/patches/glibc/ports-2.15/150-queue-header-updates.patch
+++ b/packages/glibc/2.14.1/150-queue-header-updates.patch
diff --git a/patches/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/patches/glibc/ports-2.14/160-manual-no-perl.patch
+++ b/packages/glibc/2.14.1/160-manual-no-perl.patch
diff --git a/patches/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/patches/glibc/ports-2.15/170-localedef-fix-trampoline.patch
+++ b/packages/glibc/2.14.1/170-localedef-fix-trampoline.patch
diff --git a/patches/glibc/ports-2.15/180-resolv-dynamic.patch b/packages/glibc/2.14.1/180-resolv-dynamic.patch
index e916bce..e916bce 100644
--- a/patches/glibc/ports-2.15/180-resolv-dynamic.patch
+++ b/packages/glibc/2.14.1/180-resolv-dynamic.patch
diff --git a/patches/glibc/ports-2.14.1/190-localedef-mmap.patch b/packages/glibc/2.14.1/190-localedef-mmap.patch
index f3914cd..f3914cd 100644
--- a/patches/glibc/ports-2.14.1/190-localedef-mmap.patch
+++ b/packages/glibc/2.14.1/190-localedef-mmap.patch
diff --git a/patches/glibc/ports-2.15/200-fadvise64_64.patch b/packages/glibc/2.14.1/200-fadvise64_64.patch
index 71bca38..71bca38 100644
--- a/patches/glibc/ports-2.15/200-fadvise64_64.patch
+++ b/packages/glibc/2.14.1/200-fadvise64_64.patch
diff --git a/patches/glibc/ports-2.14/220-section-comments.patch b/packages/glibc/2.14.1/220-section-comments.patch
index d717829..d717829 100644
--- a/patches/glibc/ports-2.14/220-section-comments.patch
+++ b/packages/glibc/2.14.1/220-section-comments.patch
diff --git a/patches/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/patches/glibc/ports-2.14/230-no-inline-gmon.patch
+++ b/packages/glibc/2.14.1/230-no-inline-gmon.patch
diff --git a/patches/glibc/ports-2.14/260-assume-pipe2.patch b/packages/glibc/2.14.1/260-assume-pipe2.patch
index 42e8f4e..42e8f4e 100644
--- a/patches/glibc/ports-2.14/260-assume-pipe2.patch
+++ b/packages/glibc/2.14.1/260-assume-pipe2.patch
diff --git a/patches/glibc/ports-2.15/270-china.patch b/packages/glibc/2.14.1/270-china.patch
index 41d7759..41d7759 100644
--- a/patches/glibc/ports-2.15/270-china.patch
+++ b/packages/glibc/2.14.1/270-china.patch
diff --git a/patches/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/patches/glibc/ports-2.15/280-new-valencian-locale.patch
+++ b/packages/glibc/2.14.1/280-new-valencian-locale.patch
diff --git a/patches/glibc/2.15/300-macos-cross-rpcgen.patch b/packages/glibc/2.14.1/300-macos-cross-rpcgen.patch
index e654644..e654644 100644
--- a/patches/glibc/2.15/300-macos-cross-rpcgen.patch
+++ b/packages/glibc/2.14.1/300-macos-cross-rpcgen.patch
diff --git a/patches/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/patches/glibc/ports-2.14/300-nscd-one-fork.patch
+++ b/packages/glibc/2.14.1/300-nscd-one-fork.patch
diff --git a/patches/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/patches/glibc/ports-2.14/310-hppa-nptl-carlos.patch
+++ b/packages/glibc/2.14.1/310-hppa-nptl-carlos.patch
diff --git a/patches/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/patches/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/patches/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/patches/glibc/ports-2.15/350-pre20040117-pt_pax.patch
+++ b/packages/glibc/2.14.1/350-pre20040117-pt_pax.patch
diff --git a/patches/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/patches/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/patches/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/patches/glibc/ports-2.15/380-dont-build-timezone.patch
+++ b/packages/glibc/2.14.1/380-dont-build-timezone.patch
diff --git a/patches/glibc/ports-2.15/400-alpha-xstat.patch b/packages/glibc/2.14.1/400-alpha-xstat.patch
index 6e4ab8f..6e4ab8f 100644
--- a/patches/glibc/ports-2.15/400-alpha-xstat.patch
+++ b/packages/glibc/2.14.1/400-alpha-xstat.patch
diff --git a/patches/glibc/ports-2.15/430-alpha-creat.patch b/packages/glibc/2.14.1/430-alpha-creat.patch
index da6ddda..da6ddda 100644
--- a/patches/glibc/ports-2.15/430-alpha-creat.patch
+++ b/packages/glibc/2.14.1/430-alpha-creat.patch
diff --git a/patches/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/patches/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/patches/glibc/ports-2.15/560-ppc-atomic.patch b/packages/glibc/2.14.1/560-ppc-atomic.patch
index ee1cb90..ee1cb90 100644
--- a/patches/glibc/ports-2.15/560-ppc-atomic.patch
+++ b/packages/glibc/2.14.1/560-ppc-atomic.patch
diff --git a/patches/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/patches/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/patches/glibc/ports-2.15/640-alpha-atfcts.patch b/packages/glibc/2.14.1/640-alpha-atfcts.patch
index 7a8a94a..7a8a94a 100644
--- a/patches/glibc/ports-2.15/640-alpha-atfcts.patch
+++ b/packages/glibc/2.14.1/640-alpha-atfcts.patch
diff --git a/patches/glibc/ports-2.14/650-syslog.patch b/packages/glibc/2.14.1/650-syslog.patch
index c20cafc..c20cafc 100644
--- a/patches/glibc/ports-2.14/650-syslog.patch
+++ b/packages/glibc/2.14.1/650-syslog.patch
diff --git a/patches/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/patches/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/patches/glibc/2.14/900-cpuid-include.patch b/packages/glibc/2.14.1/900-cpuid-include.patch
index 0b8db71..0b8db71 100644
--- a/patches/glibc/2.14/900-cpuid-include.patch
+++ b/packages/glibc/2.14.1/900-cpuid-include.patch
diff --git a/patches/glibc/2.15/910-asm-i686.patch b/packages/glibc/2.14.1/910-asm-i686.patch
index b049887..b049887 100644
--- a/patches/glibc/2.15/910-asm-i686.patch
+++ b/packages/glibc/2.14.1/910-asm-i686.patch
diff --git a/patches/glibc/2.21/920-fix-rpc_parse-format.patch b/packages/glibc/2.14.1/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.21/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.14.1/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.21/940-nis-bogus-conditional.patch b/packages/glibc/2.14.1/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.21/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.14.1/940-nis-bogus-conditional.patch
diff --git a/patches/glibc/2.14.1/950-initfini-ppc64.patch b/packages/glibc/2.14.1/950-initfini-ppc64.patch
index 87f8d23..87f8d23 100644
--- a/patches/glibc/2.14.1/950-initfini-ppc64.patch
+++ b/packages/glibc/2.14.1/950-initfini-ppc64.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/patches/glibc/2.14.1/999-new-tools.patch b/packages/glibc/2.14.1/999-new-tools.patch
index f335a54..f335a54 100644
--- a/patches/glibc/2.14.1/999-new-tools.patch
+++ b/packages/glibc/2.14.1/999-new-tools.patch
diff --git a/packages/glibc/2.14.1/version.desc b/packages/glibc/2.14.1/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/glibc/2.14.1/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
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/patches/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/patches/glibc/ports-2.14.1/100-respect-env-CPPFLAGS.patch
+++ b/packages/glibc/2.15/100-respect-env-CPPFLAGS.patch
diff --git a/patches/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.19/102-fix-signed-shift-overlow.patch b/packages/glibc/2.15/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/2.19/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc/2.15/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/2.20/103-dl-openat64-variadic.patch b/packages/glibc/2.15/103-dl-openat64-variadic.patch
index fe94b96..fe94b96 100644
--- a/patches/glibc/2.20/103-dl-openat64-variadic.patch
+++ b/packages/glibc/2.15/103-dl-openat64-variadic.patch
diff --git a/patches/glibc/2.15/104-unused-variables.patch b/packages/glibc/2.15/104-unused-variables.patch
index 63e4a40..63e4a40 100644
--- a/patches/glibc/2.15/104-unused-variables.patch
+++ b/packages/glibc/2.15/104-unused-variables.patch
diff --git a/patches/glibc/2.19/105-misleading-indentation.patch b/packages/glibc/2.15/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/2.19/105-misleading-indentation.patch
+++ b/packages/glibc/2.15/105-misleading-indentation.patch
diff --git a/patches/glibc/2.13/106-dl-open-array-bounds.patch b/packages/glibc/2.15/106-dl-open-array-bounds.patch
index bdb5c19..bdb5c19 100644
--- a/patches/glibc/2.13/106-dl-open-array-bounds.patch
+++ b/packages/glibc/2.15/106-dl-open-array-bounds.patch
diff --git a/patches/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/patches/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/patches/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch
index c36cdf4..c36cdf4 100644
--- a/patches/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.15/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/ports-2.14/140-disable-ldconfig.patch b/packages/glibc/2.15/140-disable-ldconfig.patch
index 378e1df..378e1df 100644
--- a/patches/glibc/ports-2.14/140-disable-ldconfig.patch
+++ b/packages/glibc/2.15/140-disable-ldconfig.patch
diff --git a/patches/glibc/ports-2.14/150-queue-header-updates.patch b/packages/glibc/2.15/150-queue-header-updates.patch
index 7cbe70e..7cbe70e 100644
--- a/patches/glibc/ports-2.14/150-queue-header-updates.patch
+++ b/packages/glibc/2.15/150-queue-header-updates.patch
diff --git a/patches/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/patches/glibc/ports-2.14.1/160-manual-no-perl.patch
+++ b/packages/glibc/2.15/160-manual-no-perl.patch
diff --git a/patches/glibc/ports-2.14/170-localedef-fix-trampoline.patch b/packages/glibc/2.15/170-localedef-fix-trampoline.patch
index 3cc6559..3cc6559 100644
--- a/patches/glibc/ports-2.14/170-localedef-fix-trampoline.patch
+++ b/packages/glibc/2.15/170-localedef-fix-trampoline.patch
diff --git a/patches/glibc/ports-2.14/180-resolv-dynamic.patch b/packages/glibc/2.15/180-resolv-dynamic.patch
index e916bce..e916bce 100644
--- a/patches/glibc/ports-2.14/180-resolv-dynamic.patch
+++ b/packages/glibc/2.15/180-resolv-dynamic.patch
diff --git a/patches/glibc/ports-2.14/200-fadvise64_64.patch b/packages/glibc/2.15/200-fadvise64_64.patch
index 71bca38..71bca38 100644
--- a/patches/glibc/ports-2.14/200-fadvise64_64.patch
+++ b/packages/glibc/2.15/200-fadvise64_64.patch
diff --git a/patches/glibc/ports-2.14.1/220-section-comments.patch b/packages/glibc/2.15/220-section-comments.patch
index d717829..d717829 100644
--- a/patches/glibc/ports-2.14.1/220-section-comments.patch
+++ b/packages/glibc/2.15/220-section-comments.patch
diff --git a/patches/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/patches/glibc/ports-2.14.1/230-no-inline-gmon.patch
+++ b/packages/glibc/2.15/230-no-inline-gmon.patch
diff --git a/patches/glibc/ports-2.14.1/260-assume-pipe2.patch b/packages/glibc/2.15/260-assume-pipe2.patch
index 42e8f4e..42e8f4e 100644
--- a/patches/glibc/ports-2.14.1/260-assume-pipe2.patch
+++ b/packages/glibc/2.15/260-assume-pipe2.patch
diff --git a/patches/glibc/ports-2.14/270-china.patch b/packages/glibc/2.15/270-china.patch
index 41d7759..41d7759 100644
--- a/patches/glibc/ports-2.14/270-china.patch
+++ b/packages/glibc/2.15/270-china.patch
diff --git a/patches/glibc/ports-2.14/280-new-valencian-locale.patch b/packages/glibc/2.15/280-new-valencian-locale.patch
index 4cdd108..4cdd108 100644
--- a/patches/glibc/ports-2.14/280-new-valencian-locale.patch
+++ b/packages/glibc/2.15/280-new-valencian-locale.patch
diff --git a/patches/glibc/2.14/300-macos-cross-rpcgen.patch b/packages/glibc/2.15/300-macos-cross-rpcgen.patch
index e654644..e654644 100644
--- a/patches/glibc/2.14/300-macos-cross-rpcgen.patch
+++ b/packages/glibc/2.15/300-macos-cross-rpcgen.patch
diff --git a/patches/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/patches/glibc/ports-2.14.1/300-nscd-one-fork.patch
+++ b/packages/glibc/2.15/300-nscd-one-fork.patch
diff --git a/patches/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/patches/glibc/ports-2.14.1/310-hppa-nptl-carlos.patch
+++ b/packages/glibc/2.15/310-hppa-nptl-carlos.patch
diff --git a/patches/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/patches/glibc/ports-2.14/340-dl_execstack-PaX-support.patch
+++ b/packages/glibc/2.15/340-dl_execstack-PaX-support.patch
diff --git a/patches/glibc/ports-2.14/350-pre20040117-pt_pax.patch b/packages/glibc/2.15/350-pre20040117-pt_pax.patch
index f8f6b83..f8f6b83 100644
--- a/patches/glibc/ports-2.14/350-pre20040117-pt_pax.patch
+++ b/packages/glibc/2.15/350-pre20040117-pt_pax.patch
diff --git a/patches/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/patches/glibc/ports-2.14/360-tests-sandbox-libdl-paths.patch
+++ b/packages/glibc/2.15/360-tests-sandbox-libdl-paths.patch
diff --git a/patches/glibc/ports-2.14/380-dont-build-timezone.patch b/packages/glibc/2.15/380-dont-build-timezone.patch
index 11c358e..11c358e 100644
--- a/patches/glibc/ports-2.14/380-dont-build-timezone.patch
+++ b/packages/glibc/2.15/380-dont-build-timezone.patch
diff --git a/patches/glibc/ports-2.14/400-alpha-xstat.patch b/packages/glibc/2.15/400-alpha-xstat.patch
index 6e4ab8f..6e4ab8f 100644
--- a/patches/glibc/ports-2.14/400-alpha-xstat.patch
+++ b/packages/glibc/2.15/400-alpha-xstat.patch
diff --git a/patches/glibc/ports-2.14/430-alpha-creat.patch b/packages/glibc/2.15/430-alpha-creat.patch
index da6ddda..da6ddda 100644
--- a/patches/glibc/ports-2.14/430-alpha-creat.patch
+++ b/packages/glibc/2.15/430-alpha-creat.patch
diff --git a/patches/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/patches/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/patches/glibc/ports-2.14/560-ppc-atomic.patch b/packages/glibc/2.15/560-ppc-atomic.patch
index ee1cb90..ee1cb90 100644
--- a/patches/glibc/ports-2.14/560-ppc-atomic.patch
+++ b/packages/glibc/2.15/560-ppc-atomic.patch
diff --git a/patches/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/patches/glibc/ports-2.14/630-mips_shn_undef-hack.patch
+++ b/packages/glibc/2.15/630-mips_shn_undef-hack.patch
diff --git a/patches/glibc/ports-2.14/640-alpha-atfcts.patch b/packages/glibc/2.15/640-alpha-atfcts.patch
index 7a8a94a..7a8a94a 100644
--- a/patches/glibc/ports-2.14/640-alpha-atfcts.patch
+++ b/packages/glibc/2.15/640-alpha-atfcts.patch
diff --git a/patches/glibc/ports-2.14.1/650-syslog.patch b/packages/glibc/2.15/650-syslog.patch
index c20cafc..c20cafc 100644
--- a/patches/glibc/ports-2.14.1/650-syslog.patch
+++ b/packages/glibc/2.15/650-syslog.patch
diff --git a/patches/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/patches/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/patches/glibc/2.15/900-cpuid-include.patch b/packages/glibc/2.15/900-cpuid-include.patch
index 29edf7b..29edf7b 100644
--- a/patches/glibc/2.15/900-cpuid-include.patch
+++ b/packages/glibc/2.15/900-cpuid-include.patch
diff --git a/patches/glibc/2.14.1/910-asm-i686.patch b/packages/glibc/2.15/910-asm-i686.patch
index b049887..b049887 100644
--- a/patches/glibc/2.14.1/910-asm-i686.patch
+++ b/packages/glibc/2.15/910-asm-i686.patch
diff --git a/patches/glibc/2.20/920-fix-rpc_parse-format.patch b/packages/glibc/2.15/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.20/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.15/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.20/940-nis-bogus-conditional.patch b/packages/glibc/2.15/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.20/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.15/940-nis-bogus-conditional.patch
diff --git a/patches/glibc/2.15/990-try-link-static.patch b/packages/glibc/2.15/990-try-link-static.patch
index a0ffadd..a0ffadd 100644
--- a/patches/glibc/2.15/990-try-link-static.patch
+++ b/packages/glibc/2.15/990-try-link-static.patch
diff --git a/patches/glibc/2.15/991-builtin_expect.patch b/packages/glibc/2.15/991-builtin_expect.patch
index 8a327fa..8a327fa 100644
--- a/patches/glibc/2.15/991-builtin_expect.patch
+++ b/packages/glibc/2.15/991-builtin_expect.patch
diff --git a/patches/glibc/2.15/992-gcc_s-suffix.patch b/packages/glibc/2.15/992-gcc_s-suffix.patch
index 6dbc70f..6dbc70f 100644
--- a/patches/glibc/2.15/992-gcc_s-suffix.patch
+++ b/packages/glibc/2.15/992-gcc_s-suffix.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/patches/glibc/2.15/999-new-tools.patch b/packages/glibc/2.15/999-new-tools.patch
index e0632a3..e0632a3 100644
--- a/patches/glibc/2.15/999-new-tools.patch
+++ b/packages/glibc/2.15/999-new-tools.patch
diff --git a/packages/glibc/2.15/version.desc b/packages/glibc/2.15/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/glibc/2.15/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/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/patches/glibc/ports-2.16.0/100-respect-env-CPPFLAGS.patch
+++ b/packages/glibc/2.16.0/100-respect-env-CPPFLAGS.patch
diff --git a/patches/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.18/102-fix-signed-shift-overlow.patch b/packages/glibc/2.16.0/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/2.18/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc/2.16.0/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/2.19/103-dl-openat64-variadic.patch b/packages/glibc/2.16.0/103-dl-openat64-variadic.patch
index fe94b96..fe94b96 100644
--- a/patches/glibc/2.19/103-dl-openat64-variadic.patch
+++ b/packages/glibc/2.16.0/103-dl-openat64-variadic.patch
diff --git a/patches/glibc/2.16.0/104-unused-variables.patch b/packages/glibc/2.16.0/104-unused-variables.patch
index 2a85a0c..2a85a0c 100644
--- a/patches/glibc/2.16.0/104-unused-variables.patch
+++ b/packages/glibc/2.16.0/104-unused-variables.patch
diff --git a/patches/glibc/2.18/105-misleading-indentation.patch b/packages/glibc/2.16.0/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/2.18/105-misleading-indentation.patch
+++ b/packages/glibc/2.16.0/105-misleading-indentation.patch
diff --git a/patches/glibc/2.17/106-dl-open-array-bounds.patch b/packages/glibc/2.16.0/106-dl-open-array-bounds.patch
index a8efe9a..a8efe9a 100644
--- a/patches/glibc/2.17/106-dl-open-array-bounds.patch
+++ b/packages/glibc/2.16.0/106-dl-open-array-bounds.patch
diff --git a/patches/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/patches/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/patches/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch
index 3c34e01..3c34e01 100644
--- a/patches/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/ports-2.14.1/140-disable-ldconfig.patch b/packages/glibc/2.16.0/140-disable-ldconfig.patch
index 378e1df..378e1df 100644
--- a/patches/glibc/ports-2.14.1/140-disable-ldconfig.patch
+++ b/packages/glibc/2.16.0/140-disable-ldconfig.patch
diff --git a/patches/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/patches/glibc/ports-2.14.1/150-queue-header-updates.patch
+++ b/packages/glibc/2.16.0/150-queue-header-updates.patch
diff --git a/patches/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/patches/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch
+++ b/packages/glibc/2.16.0/170-localedef-fix-trampoline.patch
diff --git a/patches/glibc/ports-2.14.1/180-resolv-dynamic.patch b/packages/glibc/2.16.0/180-resolv-dynamic.patch
index e916bce..e916bce 100644
--- a/patches/glibc/ports-2.14.1/180-resolv-dynamic.patch
+++ b/packages/glibc/2.16.0/180-resolv-dynamic.patch
diff --git a/patches/glibc/ports-2.14.1/200-fadvise64_64.patch b/packages/glibc/2.16.0/200-fadvise64_64.patch
index 71bca38..71bca38 100644
--- a/patches/glibc/ports-2.14.1/200-fadvise64_64.patch
+++ b/packages/glibc/2.16.0/200-fadvise64_64.patch
diff --git a/patches/glibc/ports-2.16.0/260-assume-pipe2.patch b/packages/glibc/2.16.0/260-assume-pipe2.patch
index 54f0382..54f0382 100644
--- a/patches/glibc/ports-2.16.0/260-assume-pipe2.patch
+++ b/packages/glibc/2.16.0/260-assume-pipe2.patch
diff --git a/patches/glibc/ports-2.14.1/270-china.patch b/packages/glibc/2.16.0/270-china.patch
index 41d7759..41d7759 100644
--- a/patches/glibc/ports-2.14.1/270-china.patch
+++ b/packages/glibc/2.16.0/270-china.patch
diff --git a/patches/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/patches/glibc/ports-2.14.1/280-new-valencian-locale.patch
+++ b/packages/glibc/2.16.0/280-new-valencian-locale.patch
diff --git a/patches/glibc/2.14.1/300-macos-cross-rpcgen.patch b/packages/glibc/2.16.0/300-macos-cross-rpcgen.patch
index e654644..e654644 100644
--- a/patches/glibc/2.14.1/300-macos-cross-rpcgen.patch
+++ b/packages/glibc/2.16.0/300-macos-cross-rpcgen.patch
diff --git a/patches/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/patches/glibc/ports-2.16.0/300-nscd-one-fork.patch
+++ b/packages/glibc/2.16.0/300-nscd-one-fork.patch
diff --git a/patches/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/patches/glibc/ports-2.16.0/310-hppa-nptl-carlos.patch
+++ b/packages/glibc/2.16.0/310-hppa-nptl-carlos.patch
diff --git a/patches/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/patches/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/patches/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/patches/glibc/ports-2.14.1/350-pre20040117-pt_pax.patch
+++ b/packages/glibc/2.16.0/350-pre20040117-pt_pax.patch
diff --git a/patches/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/patches/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/patches/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/patches/glibc/ports-2.14.1/380-dont-build-timezone.patch
+++ b/packages/glibc/2.16.0/380-dont-build-timezone.patch
diff --git a/patches/glibc/ports-2.14.1/400-alpha-xstat.patch b/packages/glibc/2.16.0/400-alpha-xstat.patch
index 6e4ab8f..6e4ab8f 100644
--- a/patches/glibc/ports-2.14.1/400-alpha-xstat.patch
+++ b/packages/glibc/2.16.0/400-alpha-xstat.patch
diff --git a/patches/glibc/ports-2.14.1/430-alpha-creat.patch b/packages/glibc/2.16.0/430-alpha-creat.patch
index da6ddda..da6ddda 100644
--- a/patches/glibc/ports-2.14.1/430-alpha-creat.patch
+++ b/packages/glibc/2.16.0/430-alpha-creat.patch
diff --git a/patches/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/patches/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/patches/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch b/packages/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch
index 803ac6f..803ac6f 100644
--- a/patches/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch
+++ b/packages/glibc/2.16.0/500-fix-parsing-of-numeric-hosts-in-gethostbyname_r.patch
diff --git a/patches/glibc/ports-2.14.1/560-ppc-atomic.patch b/packages/glibc/2.16.0/560-ppc-atomic.patch
index ee1cb90..ee1cb90 100644
--- a/patches/glibc/ports-2.14.1/560-ppc-atomic.patch
+++ b/packages/glibc/2.16.0/560-ppc-atomic.patch
diff --git a/patches/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/patches/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/patches/glibc/ports-2.14.1/640-alpha-atfcts.patch b/packages/glibc/2.16.0/640-alpha-atfcts.patch
index 7a8a94a..7a8a94a 100644
--- a/patches/glibc/ports-2.14.1/640-alpha-atfcts.patch
+++ b/packages/glibc/2.16.0/640-alpha-atfcts.patch
diff --git a/patches/glibc/ports-2.13/650-syslog.patch b/packages/glibc/2.16.0/650-syslog.patch
index c20cafc..c20cafc 100644
--- a/patches/glibc/ports-2.13/650-syslog.patch
+++ b/packages/glibc/2.16.0/650-syslog.patch
diff --git a/patches/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/patches/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/patches/glibc/2.19/920-fix-rpc_parse-format.patch b/packages/glibc/2.16.0/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.19/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.16.0/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.19/940-nis-bogus-conditional.patch b/packages/glibc/2.16.0/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.19/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.16.0/940-nis-bogus-conditional.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/patches/glibc/2.16.0/999-new-tools.patch b/packages/glibc/2.16.0/999-new-tools.patch
index e753365..e753365 100644
--- a/patches/glibc/2.16.0/999-new-tools.patch
+++ b/packages/glibc/2.16.0/999-new-tools.patch
diff --git a/packages/glibc/2.16.0/version.desc b/packages/glibc/2.16.0/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/glibc/2.16.0/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch
index 59f95aa..59f95aa 100644
--- a/patches/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch
+++ b/packages/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch
diff --git a/patches/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.17/102-fix-signed-shift-overlow.patch b/packages/glibc/2.17/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/2.17/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc/2.17/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/2.18/103-dl-openat64-variadic.patch b/packages/glibc/2.17/103-dl-openat64-variadic.patch
index fe94b96..fe94b96 100644
--- a/patches/glibc/2.18/103-dl-openat64-variadic.patch
+++ b/packages/glibc/2.17/103-dl-openat64-variadic.patch
diff --git a/patches/glibc/2.17/104-unused-variables.patch b/packages/glibc/2.17/104-unused-variables.patch
index 80e0ff2..80e0ff2 100644
--- a/patches/glibc/2.17/104-unused-variables.patch
+++ b/packages/glibc/2.17/104-unused-variables.patch
diff --git a/patches/glibc/2.17/105-misleading-indentation.patch b/packages/glibc/2.17/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/2.17/105-misleading-indentation.patch
+++ b/packages/glibc/2.17/105-misleading-indentation.patch
diff --git a/patches/glibc/2.16.0/106-dl-open-array-bounds.patch b/packages/glibc/2.17/106-dl-open-array-bounds.patch
index a8efe9a..a8efe9a 100644
--- a/patches/glibc/2.16.0/106-dl-open-array-bounds.patch
+++ b/packages/glibc/2.17/106-dl-open-array-bounds.patch
diff --git a/patches/glibc/2.18/120-support-make4.patch b/packages/glibc/2.17/120-support-make4.patch
index ca2bae0..ca2bae0 100644
--- a/patches/glibc/2.18/120-support-make4.patch
+++ b/packages/glibc/2.17/120-support-make4.patch
diff --git a/patches/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch
index 3c34e01..3c34e01 100644
--- a/patches/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.17/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/2.13/300-macos-cross-rpcgen.patch b/packages/glibc/2.17/300-macos-cross-rpcgen.patch
index e654644..e654644 100644
--- a/patches/glibc/2.13/300-macos-cross-rpcgen.patch
+++ b/packages/glibc/2.17/300-macos-cross-rpcgen.patch
diff --git a/patches/glibc/2.18/920-fix-rpc_parse-format.patch b/packages/glibc/2.17/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.18/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.17/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.18/940-nis-bogus-conditional.patch b/packages/glibc/2.17/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.18/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.17/940-nis-bogus-conditional.patch
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.17/version.desc b/packages/glibc/2.17/version.desc
new file mode 100644
index 0000000..9ac7dc2
--- /dev/null
+++ b/packages/glibc/2.17/version.desc
@@ -0,0 +1 @@
+# Not obsolete (CentOS 7, EOL 06/2024)
diff --git a/patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch b/packages/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch
index 40e3632..40e3632 100644
--- a/patches/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch
+++ b/packages/glibc/2.18/100-4f2bcda-ARM-Fix-clone-code-when-built-for-Thumb.patch
diff --git a/patches/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.17/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.18/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.16.0/102-fix-signed-shift-overlow.patch b/packages/glibc/2.18/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/2.16.0/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc/2.18/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/2.17/103-dl-openat64-variadic.patch b/packages/glibc/2.18/103-dl-openat64-variadic.patch
index fe94b96..fe94b96 100644
--- a/patches/glibc/2.17/103-dl-openat64-variadic.patch
+++ b/packages/glibc/2.18/103-dl-openat64-variadic.patch
diff --git a/patches/glibc/2.18/104-unused-variables.patch b/packages/glibc/2.18/104-unused-variables.patch
index 642edb1..642edb1 100644
--- a/patches/glibc/2.18/104-unused-variables.patch
+++ b/packages/glibc/2.18/104-unused-variables.patch
diff --git a/patches/glibc/2.16.0/105-misleading-indentation.patch b/packages/glibc/2.18/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/2.16.0/105-misleading-indentation.patch
+++ b/packages/glibc/2.18/105-misleading-indentation.patch
diff --git a/patches/glibc/2.21/106-dl-open-array-bounds.patch b/packages/glibc/2.18/106-dl-open-array-bounds.patch
index 08a9076..08a9076 100644
--- a/patches/glibc/2.21/106-dl-open-array-bounds.patch
+++ b/packages/glibc/2.18/106-dl-open-array-bounds.patch
diff --git a/patches/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch b/packages/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch
index 7ad9fdf..7ad9fdf 100644
--- a/patches/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch
+++ b/packages/glibc/2.18/110-2770d15-Fix-PI-mutex-check-in-pthread_cond_broadcast-and-pthread_cond_signal.patch
diff --git a/patches/glibc/2.17/120-support-make4.patch b/packages/glibc/2.18/120-support-make4.patch
index ca2bae0..ca2bae0 100644
--- a/patches/glibc/2.17/120-support-make4.patch
+++ b/packages/glibc/2.18/120-support-make4.patch
diff --git a/patches/glibc/2.19/130-arm-unwind.patch b/packages/glibc/2.18/130-arm-unwind.patch
index 69cc07a..69cc07a 100644
--- a/patches/glibc/2.19/130-arm-unwind.patch
+++ b/packages/glibc/2.18/130-arm-unwind.patch
diff --git a/patches/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch
index 3c34e01..3c34e01 100644
--- a/patches/glibc/2.16.0/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.18/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/2.12.2/300-macos-cross-rpcgen.patch b/packages/glibc/2.18/300-macos-cross-rpcgen.patch
index e654644..e654644 100644
--- a/patches/glibc/2.12.2/300-macos-cross-rpcgen.patch
+++ b/packages/glibc/2.18/300-macos-cross-rpcgen.patch
diff --git a/patches/glibc/2.17/920-fix-rpc_parse-format.patch b/packages/glibc/2.18/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.17/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.18/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.17/940-nis-bogus-conditional.patch b/packages/glibc/2.18/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.17/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.18/940-nis-bogus-conditional.patch
diff --git a/packages/glibc/2.18/version.desc b/packages/glibc/2.18/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/glibc/2.18/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.16.0/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.19/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.15/102-fix-signed-shift-overlow.patch b/packages/glibc/2.19/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/2.15/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc/2.19/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/2.16.0/103-dl-openat64-variadic.patch b/packages/glibc/2.19/103-dl-openat64-variadic.patch
index fe94b96..fe94b96 100644
--- a/patches/glibc/2.16.0/103-dl-openat64-variadic.patch
+++ b/packages/glibc/2.19/103-dl-openat64-variadic.patch
diff --git a/patches/glibc/2.20/104-unused-variables.patch b/packages/glibc/2.19/104-unused-variables.patch
index 889c9bb..889c9bb 100644
--- a/patches/glibc/2.20/104-unused-variables.patch
+++ b/packages/glibc/2.19/104-unused-variables.patch
diff --git a/patches/glibc/2.15/105-misleading-indentation.patch b/packages/glibc/2.19/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/2.15/105-misleading-indentation.patch
+++ b/packages/glibc/2.19/105-misleading-indentation.patch
diff --git a/patches/glibc/2.20/106-dl-open-array-bounds.patch b/packages/glibc/2.19/106-dl-open-array-bounds.patch
index 08a9076..08a9076 100644
--- a/patches/glibc/2.20/106-dl-open-array-bounds.patch
+++ b/packages/glibc/2.19/106-dl-open-array-bounds.patch
diff --git a/patches/glibc/2.18/130-arm-unwind.patch b/packages/glibc/2.19/130-arm-unwind.patch
index 69cc07a..69cc07a 100644
--- a/patches/glibc/2.18/130-arm-unwind.patch
+++ b/packages/glibc/2.19/130-arm-unwind.patch
diff --git a/patches/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch
index fdc3a60..fdc3a60 100644
--- a/patches/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/2.12.1/910-typedef-caddr.patch b/packages/glibc/2.19/910-typedef-caddr.patch
index e29e810..e29e810 100644
--- a/patches/glibc/2.12.1/910-typedef-caddr.patch
+++ b/packages/glibc/2.19/910-typedef-caddr.patch
diff --git a/patches/glibc/2.16.0/920-fix-rpc_parse-format.patch b/packages/glibc/2.19/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.16.0/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.19/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.24/930-explicit-boolean.patch b/packages/glibc/2.19/930-explicit-boolean.patch
index 780fae6..780fae6 100644
--- a/patches/glibc/2.24/930-explicit-boolean.patch
+++ b/packages/glibc/2.19/930-explicit-boolean.patch
diff --git a/patches/glibc/2.16.0/940-nis-bogus-conditional.patch b/packages/glibc/2.19/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.16.0/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.19/940-nis-bogus-conditional.patch
diff --git a/packages/glibc/2.19/version.desc b/packages/glibc/2.19/version.desc
new file mode 100644
index 0000000..f261ea8
--- /dev/null
+++ b/packages/glibc/2.19/version.desc
@@ -0,0 +1 @@
+# Not obsolete (Ubuntu 14.04, EOL 04/2019)
diff --git a/patches/glibc/2.20/100-sparc-nptl.patch b/packages/glibc/2.20/100-sparc-nptl.patch
index 21f0337..21f0337 100644
--- a/patches/glibc/2.20/100-sparc-nptl.patch
+++ b/packages/glibc/2.20/100-sparc-nptl.patch
diff --git a/patches/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.15/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.20/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.14/102-fix-signed-shift-overlow.patch b/packages/glibc/2.20/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/2.14/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc/2.20/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/2.15/103-dl-openat64-variadic.patch b/packages/glibc/2.20/103-dl-openat64-variadic.patch
index fe94b96..fe94b96 100644
--- a/patches/glibc/2.15/103-dl-openat64-variadic.patch
+++ b/packages/glibc/2.20/103-dl-openat64-variadic.patch
diff --git a/patches/glibc/2.19/104-unused-variables.patch b/packages/glibc/2.20/104-unused-variables.patch
index 889c9bb..889c9bb 100644
--- a/patches/glibc/2.19/104-unused-variables.patch
+++ b/packages/glibc/2.20/104-unused-variables.patch
diff --git a/patches/glibc/2.14/105-misleading-indentation.patch b/packages/glibc/2.20/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/2.14/105-misleading-indentation.patch
+++ b/packages/glibc/2.20/105-misleading-indentation.patch
diff --git a/patches/glibc/2.19/106-dl-open-array-bounds.patch b/packages/glibc/2.20/106-dl-open-array-bounds.patch
index 08a9076..08a9076 100644
--- a/patches/glibc/2.19/106-dl-open-array-bounds.patch
+++ b/packages/glibc/2.20/106-dl-open-array-bounds.patch
diff --git a/patches/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch
index fdc3a60..fdc3a60 100644
--- a/patches/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/2.25/910-typedef-caddr.patch b/packages/glibc/2.20/910-typedef-caddr.patch
index fc7979b..fc7979b 100644
--- a/patches/glibc/2.25/910-typedef-caddr.patch
+++ b/packages/glibc/2.20/910-typedef-caddr.patch
diff --git a/patches/glibc/2.15/920-fix-rpc_parse-format.patch b/packages/glibc/2.20/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.15/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.20/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.23/930-explicit-boolean.patch b/packages/glibc/2.20/930-explicit-boolean.patch
index 780fae6..780fae6 100644
--- a/patches/glibc/2.23/930-explicit-boolean.patch
+++ b/packages/glibc/2.20/930-explicit-boolean.patch
diff --git a/patches/glibc/2.15/940-nis-bogus-conditional.patch b/packages/glibc/2.20/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.15/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.20/940-nis-bogus-conditional.patch
diff --git a/packages/glibc/2.20/version.desc b/packages/glibc/2.20/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/glibc/2.20/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.21/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.14.1/102-fix-signed-shift-overlow.patch b/packages/glibc/2.21/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/2.14.1/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc/2.21/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/2.14/103-dl-openat64-variadic.patch b/packages/glibc/2.21/103-dl-openat64-variadic.patch
index fe94b96..fe94b96 100644
--- a/patches/glibc/2.14/103-dl-openat64-variadic.patch
+++ b/packages/glibc/2.21/103-dl-openat64-variadic.patch
diff --git a/patches/glibc/2.22/104-unused-variables.patch b/packages/glibc/2.21/104-unused-variables.patch
index fd4def0..fd4def0 100644
--- a/patches/glibc/2.22/104-unused-variables.patch
+++ b/packages/glibc/2.21/104-unused-variables.patch
diff --git a/patches/glibc/2.14.1/105-misleading-indentation.patch b/packages/glibc/2.21/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/2.14.1/105-misleading-indentation.patch
+++ b/packages/glibc/2.21/105-misleading-indentation.patch
diff --git a/patches/glibc/2.18/106-dl-open-array-bounds.patch b/packages/glibc/2.21/106-dl-open-array-bounds.patch
index 08a9076..08a9076 100644
--- a/patches/glibc/2.18/106-dl-open-array-bounds.patch
+++ b/packages/glibc/2.21/106-dl-open-array-bounds.patch
diff --git a/patches/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch
index fdc3a60..fdc3a60 100644
--- a/patches/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/2.24/910-typedef-caddr.patch b/packages/glibc/2.21/910-typedef-caddr.patch
index fc7979b..fc7979b 100644
--- a/patches/glibc/2.24/910-typedef-caddr.patch
+++ b/packages/glibc/2.21/910-typedef-caddr.patch
diff --git a/patches/glibc/2.14/920-fix-rpc_parse-format.patch b/packages/glibc/2.21/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.14/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.21/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.22/930-explicit-boolean.patch b/packages/glibc/2.21/930-explicit-boolean.patch
index 780fae6..780fae6 100644
--- a/patches/glibc/2.22/930-explicit-boolean.patch
+++ b/packages/glibc/2.21/930-explicit-boolean.patch
diff --git a/patches/glibc/2.14/940-nis-bogus-conditional.patch b/packages/glibc/2.21/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.14/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.21/940-nis-bogus-conditional.patch
diff --git a/patches/glibc/2.21/950-dlclose-assert.patch b/packages/glibc/2.21/950-dlclose-assert.patch
index 6e2fcff..6e2fcff 100644
--- a/patches/glibc/2.21/950-dlclose-assert.patch
+++ b/packages/glibc/2.21/950-dlclose-assert.patch
diff --git a/packages/glibc/2.21/version.desc b/packages/glibc/2.21/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/glibc/2.21/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/glibc/2.22/100-sparc32-sem_open-missing-include.patch b/packages/glibc/2.22/100-sparc32-sem_open-missing-include.patch
index b481046..b481046 100644
--- a/patches/glibc/2.22/100-sparc32-sem_open-missing-include.patch
+++ b/packages/glibc/2.22/100-sparc32-sem_open-missing-include.patch
diff --git a/patches/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.14.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.22/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.13/102-fix-signed-shift-overlow.patch b/packages/glibc/2.22/102-fix-signed-shift-overlow.patch
index ef49f83..ef49f83 100644
--- a/patches/glibc/2.13/102-fix-signed-shift-overlow.patch
+++ b/packages/glibc/2.22/102-fix-signed-shift-overlow.patch
diff --git a/patches/glibc/2.22/103-dl-openat64-variadic.patch b/packages/glibc/2.22/103-dl-openat64-variadic.patch
index 302088e..302088e 100644
--- a/patches/glibc/2.22/103-dl-openat64-variadic.patch
+++ b/packages/glibc/2.22/103-dl-openat64-variadic.patch
diff --git a/patches/glibc/2.21/104-unused-variables.patch b/packages/glibc/2.22/104-unused-variables.patch
index fd4def0..fd4def0 100644
--- a/patches/glibc/2.21/104-unused-variables.patch
+++ b/packages/glibc/2.22/104-unused-variables.patch
diff --git a/patches/glibc/2.13/105-misleading-indentation.patch b/packages/glibc/2.22/105-misleading-indentation.patch
index 1dd8d85..1dd8d85 100644
--- a/patches/glibc/2.13/105-misleading-indentation.patch
+++ b/packages/glibc/2.22/105-misleading-indentation.patch
diff --git a/patches/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch b/packages/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch
index 257c5f2..257c5f2 100644
--- a/patches/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch
+++ b/packages/glibc/2.22/120-cve-2105-7547-getaddrinfo-stack.patch
diff --git a/patches/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch
index fdc3a60..fdc3a60 100644
--- a/patches/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.22/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/2.23/910-typedef-caddr.patch b/packages/glibc/2.22/910-typedef-caddr.patch
index fc7979b..fc7979b 100644
--- a/patches/glibc/2.23/910-typedef-caddr.patch
+++ b/packages/glibc/2.22/910-typedef-caddr.patch
diff --git a/patches/glibc/2.14.1/920-fix-rpc_parse-format.patch b/packages/glibc/2.22/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.14.1/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.22/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.21/930-explicit-boolean.patch b/packages/glibc/2.22/930-explicit-boolean.patch
index 780fae6..780fae6 100644
--- a/patches/glibc/2.21/930-explicit-boolean.patch
+++ b/packages/glibc/2.22/930-explicit-boolean.patch
diff --git a/patches/glibc/2.14.1/940-nis-bogus-conditional.patch b/packages/glibc/2.22/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.14.1/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.22/940-nis-bogus-conditional.patch
diff --git a/packages/glibc/2.22/version.desc b/packages/glibc/2.22/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/glibc/2.22/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
index 6fd663a..6fd663a 100644
--- a/patches/glibc/2.13/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ b/packages/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
diff --git a/patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch b/packages/glibc/2.23/120-Fix-build-with-enable-static-nss.patch
index 59ab087..59ab087 100644
--- a/patches/glibc/2.25/120-Fix-build-with-enable-static-nss.patch
+++ b/packages/glibc/2.23/120-Fix-build-with-enable-static-nss.patch
diff --git a/patches/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch
index fdc3a60..fdc3a60 100644
--- a/patches/glibc/2.21/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.23/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/2.22/910-typedef-caddr.patch b/packages/glibc/2.23/910-typedef-caddr.patch
index fc7979b..fc7979b 100644
--- a/patches/glibc/2.22/910-typedef-caddr.patch
+++ b/packages/glibc/2.23/910-typedef-caddr.patch
diff --git a/patches/glibc/2.13/920-fix-rpc_parse-format.patch b/packages/glibc/2.23/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.13/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.23/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.20/930-explicit-boolean.patch b/packages/glibc/2.23/930-explicit-boolean.patch
index 780fae6..780fae6 100644
--- a/patches/glibc/2.20/930-explicit-boolean.patch
+++ b/packages/glibc/2.23/930-explicit-boolean.patch
diff --git a/patches/glibc/2.13/940-nis-bogus-conditional.patch b/packages/glibc/2.23/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.13/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.23/940-nis-bogus-conditional.patch
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.23/version.desc b/packages/glibc/2.23/version.desc
new file mode 100644
index 0000000..4bec49f
--- /dev/null
+++ b/packages/glibc/2.23/version.desc
@@ -0,0 +1 @@
+# Not obsolete (Ubuntu 16.04, EOL 04/21)
diff --git a/patches/glibc/2.25/110-sh-fix-gcc6.patch b/packages/glibc/2.24/110-sh-fix-gcc6.patch
index cacf390..cacf390 100644
--- a/patches/glibc/2.25/110-sh-fix-gcc6.patch
+++ b/packages/glibc/2.24/110-sh-fix-gcc6.patch
diff --git a/patches/glibc/2.24/120-Fix-build-with-enable-static-nss.patch b/packages/glibc/2.24/120-Fix-build-with-enable-static-nss.patch
index 59ab087..59ab087 100644
--- a/patches/glibc/2.24/120-Fix-build-with-enable-static-nss.patch
+++ b/packages/glibc/2.24/120-Fix-build-with-enable-static-nss.patch
diff --git a/patches/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch
index fdc3a60..fdc3a60 100644
--- a/patches/glibc/2.20/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.24/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/2.21/910-typedef-caddr.patch b/packages/glibc/2.24/910-typedef-caddr.patch
index fc7979b..fc7979b 100644
--- a/patches/glibc/2.21/910-typedef-caddr.patch
+++ b/packages/glibc/2.24/910-typedef-caddr.patch
diff --git a/patches/glibc/2.12.2/920-fix-rpc_parse-format.patch b/packages/glibc/2.24/920-fix-rpc_parse-format.patch
index 37e58da..37e58da 100644
--- a/patches/glibc/2.12.2/920-fix-rpc_parse-format.patch
+++ b/packages/glibc/2.24/920-fix-rpc_parse-format.patch
diff --git a/patches/glibc/2.19/930-explicit-boolean.patch b/packages/glibc/2.24/930-explicit-boolean.patch
index 780fae6..780fae6 100644
--- a/patches/glibc/2.19/930-explicit-boolean.patch
+++ b/packages/glibc/2.24/930-explicit-boolean.patch
diff --git a/patches/glibc/2.12.2/940-nis-bogus-conditional.patch b/packages/glibc/2.24/940-nis-bogus-conditional.patch
index 09b38cf..09b38cf 100644
--- a/patches/glibc/2.12.2/940-nis-bogus-conditional.patch
+++ b/packages/glibc/2.24/940-nis-bogus-conditional.patch
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.24/version.desc b/packages/glibc/2.24/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/glibc/2.24/version.desc
diff --git a/patches/glibc/2.24/110-sh-fix-gcc6.patch b/packages/glibc/2.25/110-sh-fix-gcc6.patch
index cacf390..cacf390 100644
--- a/patches/glibc/2.24/110-sh-fix-gcc6.patch
+++ b/packages/glibc/2.25/110-sh-fix-gcc6.patch
diff --git a/patches/glibc/2.23/120-Fix-build-with-enable-static-nss.patch b/packages/glibc/2.25/120-Fix-build-with-enable-static-nss.patch
index 59ab087..59ab087 100644
--- a/patches/glibc/2.23/120-Fix-build-with-enable-static-nss.patch
+++ b/packages/glibc/2.25/120-Fix-build-with-enable-static-nss.patch
diff --git a/patches/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch
index fdc3a60..fdc3a60 100644
--- a/patches/glibc/2.19/140-Fix-combreloc-test-BSD-grep.patch
+++ b/packages/glibc/2.25/140-Fix-combreloc-test-BSD-grep.patch
diff --git a/patches/glibc/2.20/910-typedef-caddr.patch b/packages/glibc/2.25/910-typedef-caddr.patch
index fc7979b..fc7979b 100644
--- a/patches/glibc/2.20/910-typedef-caddr.patch
+++ b/packages/glibc/2.25/910-typedef-caddr.patch
diff --git a/patches/glibc/2.25/960-sh4-trap-divdi3.patch b/packages/glibc/2.25/960-sh4-trap-divdi3.patch
index 99fad46..99fad46 100644
--- a/patches/glibc/2.25/960-sh4-trap-divdi3.patch
+++ b/packages/glibc/2.25/960-sh4-trap-divdi3.patch
diff --git a/patches/glibc/2.25/961-sparc-extra-plt-call.patch b/packages/glibc/2.25/961-sparc-extra-plt-call.patch
index 3781cf0..3781cf0 100644
--- a/patches/glibc/2.25/961-sparc-extra-plt-call.patch
+++ b/packages/glibc/2.25/961-sparc-extra-plt-call.patch
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.25/version.desc b/packages/glibc/2.25/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/glibc/2.25/version.desc
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/glibc/2.26/version.desc b/packages/glibc/2.26/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/glibc/2.26/version.desc
diff --git a/packages/glibc/package.desc b/packages/glibc/package.desc
new file mode 100644
index 0000000..675b113
--- /dev/null
+++ b/packages/glibc/package.desc
@@ -0,0 +1,5 @@
+origin='GNU'
+repository='git git://sourceware.org/git/glibc.git'
+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.2/version.desc b/packages/gmp/4.3.2/version.desc
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/gmp/4.3.2/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/patches/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/patches/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.3/version.desc b/packages/gmp/5.1.3/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/gmp/5.1.3/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/gmp/6.0.0a/version.desc b/packages/gmp/6.0.0a/version.desc
new file mode 100644
index 0000000..71fe2fa
--- /dev/null
+++ b/packages/gmp/6.0.0a/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_dirname='gmp-6.0.0'
diff --git a/packages/gmp/6.1.2/version.desc b/packages/gmp/6.1.2/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gmp/6.1.2/version.desc
diff --git a/packages/gmp/package.desc b/packages/gmp/package.desc
new file mode 100644
index 0000000..bb97cb5
--- /dev/null
+++ b/packages/gmp/package.desc
@@ -0,0 +1,5 @@
+repository='hg https://gmplib.org/repo/gmp/'
+bootstrap='./.bootstrap'
+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.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
new file mode 100644
index 0000000..f96c492
--- /dev/null
+++ b/packages/isl/0.12.2/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.lzma .tar.bz2 .tar.gz'
diff --git a/packages/isl/0.14.1/version.desc b/packages/isl/0.14.1/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/isl/0.14.1/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/isl/0.15/version.desc b/packages/isl/0.15/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/isl/0.15/version.desc
diff --git a/packages/isl/0.16.1/version.desc b/packages/isl/0.16.1/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/isl/0.16.1/version.desc
diff --git a/packages/isl/0.17.1/version.desc b/packages/isl/0.17.1/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/isl/0.17.1/version.desc
diff --git a/packages/isl/0.18/version.desc b/packages/isl/0.18/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/isl/0.18/version.desc
diff --git a/packages/isl/package.desc b/packages/isl/package.desc
new file mode 100644
index 0000000..727bd30
--- /dev/null
+++ b/packages/isl/package.desc
@@ -0,0 +1,5 @@
+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/patches/libelf/0.8.13/100-fix-64-bit-detection.patch b/packages/libelf/0.8.13/100-fix-64-bit-detection.patch
index 7995443..7995443 100644
--- a/patches/libelf/0.8.13/100-fix-64-bit-detection.patch
+++ b/packages/libelf/0.8.13/100-fix-64-bit-detection.patch
diff --git a/packages/libelf/0.8.13/version.desc b/packages/libelf/0.8.13/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/libelf/0.8.13/version.desc
diff --git a/packages/libelf/package.desc b/packages/libelf/package.desc
new file mode 100644
index 0000000..e809220
--- /dev/null
+++ b/packages/libelf/package.desc
@@ -0,0 +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/patches/libiconv/1.14/100-srclib_stdio.in.h-remove-gets-declarations.patch b/packages/libiconv/1.14/100-srclib_stdio.in.h-remove-gets-declarations.patch
index 382c841..382c841 100644
--- a/patches/libiconv/1.14/100-srclib_stdio.in.h-remove-gets-declarations.patch
+++ b/packages/libiconv/1.14/100-srclib_stdio.in.h-remove-gets-declarations.patch
diff --git a/packages/libiconv/1.14/version.desc b/packages/libiconv/1.14/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/libiconv/1.14/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/libiconv/1.15/version.desc b/packages/libiconv/1.15/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/libiconv/1.15/version.desc
diff --git a/packages/libiconv/package.desc b/packages/libiconv/package.desc
new file mode 100644
index 0000000..c80182d
--- /dev/null
+++ b/packages/libiconv/package.desc
@@ -0,0 +1,6 @@
+repository='git https://git.savannah.gnu.org/git/libiconv.git'
+# TBD autogen.sh will check out most recent gnulib - need to make gnulib
+# 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/patches/libtool/2.4.6/2.4.5-pass-ldflags.patch b/packages/libtool/2.4.6/2.4.5-pass-ldflags.patch
index d35e343..d35e343 100644
--- a/patches/libtool/2.4.6/2.4.5-pass-ldflags.patch
+++ b/packages/libtool/2.4.6/2.4.5-pass-ldflags.patch
diff --git a/packages/libtool/2.4.6/version.desc b/packages/libtool/2.4.6/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/libtool/2.4.6/version.desc
diff --git a/packages/libtool/package.desc b/packages/libtool/package.desc
new file mode 100644
index 0000000..ad15cfd
--- /dev/null
+++ b/packages/libtool/package.desc
@@ -0,0 +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/patches/linux/2.6.32.27/100-unifdef-strclpy.patch b/packages/linux/2.6.32.27/100-unifdef-strclpy.patch
index 072fac6..072fac6 100644
--- a/patches/linux/2.6.32.27/100-unifdef-strclpy.patch
+++ b/packages/linux/2.6.32.27/100-unifdef-strclpy.patch
diff --git a/packages/linux/2.6.32.27/version.desc b/packages/linux/2.6.32.27/version.desc
new file mode 100644
index 0000000..1199456
--- /dev/null
+++ b/packages/linux/2.6.32.27/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/2.6.33.7/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/2.6.34.7/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/2.6.35.9/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/2.6.36.4/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/2.6.37.6/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/2.6.38.8/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/2.6.39.4/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/3.0.101/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/3.1.10/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.10.107/version.desc b/packages/linux/3.10.107/version.desc
new file mode 100644
index 0000000..7c0a082
--- /dev/null
+++ b/packages/linux/3.10.107/version.desc
@@ -0,0 +1 @@
+# Not obsolete: used by CentOS7.x, EOL 06/2024
diff --git a/packages/linux/3.11.10/version.desc b/packages/linux/3.11.10/version.desc
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/3.11.10/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.12.74/version.desc b/packages/linux/3.12.74/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/linux/3.12.74/version.desc
diff --git a/packages/linux/3.13.11/version.desc b/packages/linux/3.13.11/version.desc
new file mode 100644
index 0000000..89c1908
--- /dev/null
+++ b/packages/linux/3.13.11/version.desc
@@ -0,0 +1 @@
+# Not obsolete: used by Ubuntu14.04, EOL 04/2019
diff --git a/packages/linux/3.14.79/version.desc b/packages/linux/3.14.79/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/3.14.79/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/3.15.10/version.desc b/packages/linux/3.15.10/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/3.15.10/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/3.16.46/version.desc b/packages/linux/3.16.46/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/linux/3.16.46/version.desc
diff --git a/packages/linux/3.17.8/version.desc b/packages/linux/3.17.8/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/3.17.8/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/3.18.66/version.desc b/packages/linux/3.18.66/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/3.18.66/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/3.19.8/version.desc b/packages/linux/3.19.8/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/3.19.8/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/3.2.91/version.desc b/packages/linux/3.2.91/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ 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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/3.3.8/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.4.113/version.desc b/packages/linux/3.4.113/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/linux/3.4.113/version.desc
diff --git a/packages/linux/3.5.7/version.desc b/packages/linux/3.5.7/version.desc
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/3.5.7/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/3.6.11/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/3.7.10/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/3.8.13/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..40f81bc
--- /dev/null
+++ b/packages/linux/3.9.11/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/4.0.9/version.desc b/packages/linux/4.0.9/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/4.0.9/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/4.1.43/version.desc b/packages/linux/4.1.43/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/linux/4.1.43/version.desc
diff --git a/packages/linux/4.10.17/version.desc b/packages/linux/4.10.17/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/linux/4.10.17/version.desc
diff --git a/packages/linux/4.10.8/version.desc b/packages/linux/4.10.8/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/4.10.8/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/4.11.12/version.desc b/packages/linux/4.11.12/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/linux/4.11.12/version.desc
diff --git a/packages/linux/4.12.8/version.desc b/packages/linux/4.12.8/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/linux/4.12.8/version.desc
diff --git a/packages/linux/4.2.8/version.desc b/packages/linux/4.2.8/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/4.2.8/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/4.3.6/version.desc b/packages/linux/4.3.6/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/4.3.6/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/4.4.83/version.desc b/packages/linux/4.4.83/version.desc
new file mode 100644
index 0000000..7d5188f
--- /dev/null
+++ b/packages/linux/4.4.83/version.desc
@@ -0,0 +1 @@
+# Not obsolete: used by Ubuntu16.04, EOL 04/2021
diff --git a/packages/linux/4.5.7/version.desc b/packages/linux/4.5.7/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/4.5.7/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/4.6.7/version.desc b/packages/linux/4.6.7/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/4.6.7/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/4.7.10/version.desc b/packages/linux/4.7.10/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/4.7.10/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/4.8.17/version.desc b/packages/linux/4.8.17/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/linux/4.8.17/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/linux/4.9.44/version.desc b/packages/linux/4.9.44/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/linux/4.9.44/version.desc
diff --git a/packages/linux/package.desc b/packages/linux/package.desc
new file mode 100644
index 0000000..2ea5733
--- /dev/null
+++ b/packages/linux/package.desc
@@ -0,0 +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/patches/ltrace/0.5.3/100-allow-cross-compile.patch b/packages/ltrace/0.5.3/100-allow-cross-compile.patch
index 58572cd..58572cd 100644
--- a/patches/ltrace/0.5.3/100-allow-cross-compile.patch
+++ b/packages/ltrace/0.5.3/100-allow-cross-compile.patch
diff --git a/patches/ltrace/0.5.3/110-alpha-support.patch b/packages/ltrace/0.5.3/110-alpha-support.patch
index 838b84b..838b84b 100644
--- a/patches/ltrace/0.5.3/110-alpha-support.patch
+++ b/packages/ltrace/0.5.3/110-alpha-support.patch
diff --git a/patches/ltrace/0.5.3/120-debian-ltrace_0.5.3-2.patch b/packages/ltrace/0.5.3/120-debian-ltrace_0.5.3-2.patch
index 483c743..483c743 100644
--- a/patches/ltrace/0.5.3/120-debian-ltrace_0.5.3-2.patch
+++ b/packages/ltrace/0.5.3/120-debian-ltrace_0.5.3-2.patch
diff --git a/patches/ltrace/0.5.3/130-add-sysdep.patch b/packages/ltrace/0.5.3/130-add-sysdep.patch
index 6fd8d26..6fd8d26 100644
--- a/patches/ltrace/0.5.3/130-add-sysdep.patch
+++ b/packages/ltrace/0.5.3/130-add-sysdep.patch
diff --git a/patches/ltrace/0.5.3/140-mips-remove-CP.patch b/packages/ltrace/0.5.3/140-mips-remove-CP.patch
index 4532a8f..4532a8f 100644
--- a/patches/ltrace/0.5.3/140-mips-remove-CP.patch
+++ b/packages/ltrace/0.5.3/140-mips-remove-CP.patch
diff --git a/patches/ltrace/0.5.3/140-mips.patch b/packages/ltrace/0.5.3/140-mips.patch
index b01b7a9..b01b7a9 100644
--- a/patches/ltrace/0.5.3/140-mips.patch
+++ b/packages/ltrace/0.5.3/140-mips.patch
diff --git a/patches/ltrace/0.5.3/150-allow-configurable-arch.patch b/packages/ltrace/0.5.3/150-allow-configurable-arch.patch
index 7208ca8..7208ca8 100644
--- a/patches/ltrace/0.5.3/150-allow-configurable-arch.patch
+++ b/packages/ltrace/0.5.3/150-allow-configurable-arch.patch
diff --git a/patches/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch b/packages/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch
index b57a166..b57a166 100644
--- a/patches/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch
+++ b/packages/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch
diff --git a/patches/ltrace/0.5.3/170-lib-supcc.patch b/packages/ltrace/0.5.3/170-lib-supcc.patch
index 8842b91..8842b91 100644
--- a/patches/ltrace/0.5.3/170-lib-supcc.patch
+++ b/packages/ltrace/0.5.3/170-lib-supcc.patch
diff --git a/patches/ltrace/0.5.3/180-libltrace-genindex.patch b/packages/ltrace/0.5.3/180-libltrace-genindex.patch
index 0b1629b..0b1629b 100644
--- a/patches/ltrace/0.5.3/180-libltrace-genindex.patch
+++ b/packages/ltrace/0.5.3/180-libltrace-genindex.patch
diff --git a/patches/ltrace/0.5.3/190-ar-configurable.patch b/packages/ltrace/0.5.3/190-ar-configurable.patch
index 28856a3..28856a3 100644
--- a/patches/ltrace/0.5.3/190-ar-configurable.patch
+++ b/packages/ltrace/0.5.3/190-ar-configurable.patch
diff --git a/patches/ltrace/0.5.3/200-configure-hostos.patch b/packages/ltrace/0.5.3/200-configure-hostos.patch
index 36563f4..36563f4 100644
--- a/patches/ltrace/0.5.3/200-configure-hostos.patch
+++ b/packages/ltrace/0.5.3/200-configure-hostos.patch
diff --git a/packages/ltrace/0.5.3/version.desc b/packages/ltrace/0.5.3/version.desc
new file mode 100644
index 0000000..17de7cf
--- /dev/null
+++ b/packages/ltrace/0.5.3/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.gz'
diff --git a/patches/ltrace/0.7.3/001-avoid-libstdc++.patch b/packages/ltrace/0.7.3/001-avoid-libstdc++.patch
index 9cbf557..9cbf557 100644
--- a/patches/ltrace/0.7.3/001-avoid-libstdc++.patch
+++ b/packages/ltrace/0.7.3/001-avoid-libstdc++.patch
diff --git a/patches/ltrace/0.7.3/002-printf-p.patch b/packages/ltrace/0.7.3/002-printf-p.patch
index 10631d9..10631d9 100644
--- a/patches/ltrace/0.7.3/002-printf-p.patch
+++ b/packages/ltrace/0.7.3/002-printf-p.patch
diff --git a/patches/ltrace/0.7.3/003-alpha-debug.h.patch b/packages/ltrace/0.7.3/003-alpha-debug.h.patch
index 237026d..237026d 100644
--- a/patches/ltrace/0.7.3/003-alpha-debug.h.patch
+++ b/packages/ltrace/0.7.3/003-alpha-debug.h.patch
diff --git a/patches/ltrace/0.7.3/004-compile-warning.patch b/packages/ltrace/0.7.3/004-compile-warning.patch
index ad65829..ad65829 100644
--- a/patches/ltrace/0.7.3/004-compile-warning.patch
+++ b/packages/ltrace/0.7.3/004-compile-warning.patch
diff --git a/patches/ltrace/0.7.3/005-sparc-ftbfs.patch b/packages/ltrace/0.7.3/005-sparc-ftbfs.patch
index 266a8e6..266a8e6 100644
--- a/patches/ltrace/0.7.3/005-sparc-ftbfs.patch
+++ b/packages/ltrace/0.7.3/005-sparc-ftbfs.patch
diff --git a/patches/ltrace/0.7.3/006-unexpected-breakpoint.patch b/packages/ltrace/0.7.3/006-unexpected-breakpoint.patch
index 443bee4..443bee4 100644
--- a/patches/ltrace/0.7.3/006-unexpected-breakpoint.patch
+++ b/packages/ltrace/0.7.3/006-unexpected-breakpoint.patch
diff --git a/patches/ltrace/0.7.3/007-gcc-5.patch b/packages/ltrace/0.7.3/007-gcc-5.patch
index 4c62f85..4c62f85 100644
--- a/patches/ltrace/0.7.3/007-gcc-5.patch
+++ b/packages/ltrace/0.7.3/007-gcc-5.patch
diff --git a/patches/ltrace/0.7.3/008-glibc-2.24.patch b/packages/ltrace/0.7.3/008-glibc-2.24.patch
index 85b008b..85b008b 100644
--- a/patches/ltrace/0.7.3/008-glibc-2.24.patch
+++ b/packages/ltrace/0.7.3/008-glibc-2.24.patch
diff --git a/packages/ltrace/0.7.3/version.desc b/packages/ltrace/0.7.3/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/ltrace/0.7.3/version.desc
diff --git a/packages/ltrace/package.desc b/packages/ltrace/package.desc
new file mode 100644
index 0000000..df0bdda
--- /dev/null
+++ b/packages/ltrace/package.desc
@@ -0,0 +1,6 @@
+repository='git git://git.debian.org/git/collab-maint/ltrace.git'
+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.18/version.desc b/packages/m4/1.4.18/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/m4/1.4.18/version.desc
diff --git a/packages/m4/package.desc b/packages/m4/package.desc
new file mode 100644
index 0000000..eefb179
--- /dev/null
+++ b/packages/m4/package.desc
@@ -0,0 +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/3.81/version.desc b/packages/make/3.81/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/make/3.81/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/make/4.0/version.desc b/packages/make/4.0/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/make/4.0/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/make/4.1/version.desc b/packages/make/4.1/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/make/4.1/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/make/4.2.1/version.desc b/packages/make/4.2.1/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/make/4.2.1/version.desc
diff --git a/packages/make/package.desc b/packages/make/package.desc
new file mode 100644
index 0000000..8cb9ada
--- /dev/null
+++ b/packages/make/package.desc
@@ -0,0 +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
new file mode 100644
index 0000000..12cb4f2
--- /dev/null
+++ b/packages/mingw-w64/package.desc
@@ -0,0 +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/patches/mingw-w64/v4.0.6/100-mingw64-malloc.patch b/packages/mingw-w64/v2.0.10/100-mingw64-malloc.patch
index d9d5a61..d9d5a61 100644
--- a/patches/mingw-w64/v4.0.6/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/patches/mingw-w64/v4.0.5/100-mingw64-malloc.patch b/packages/mingw-w64/v3.0.0/100-mingw64-malloc.patch
index d9d5a61..d9d5a61 100644
--- a/patches/mingw-w64/v4.0.5/100-mingw64-malloc.patch
+++ b/packages/mingw-w64/v3.0.0/100-mingw64-malloc.patch
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
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/mingw-w64/v3.0.0/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/patches/mingw-w64/v4.0.4/100-mingw64-malloc.patch b/packages/mingw-w64/v3.1.0/100-mingw64-malloc.patch
index d9d5a61..d9d5a61 100644
--- a/patches/mingw-w64/v4.0.4/100-mingw64-malloc.patch
+++ b/packages/mingw-w64/v3.1.0/100-mingw64-malloc.patch
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
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/mingw-w64/v3.1.0/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/patches/mingw-w64/v4.0.2/100-mingw64-malloc.patch b/packages/mingw-w64/v3.2.0/100-mingw64-malloc.patch
index d9d5a61..d9d5a61 100644
--- a/patches/mingw-w64/v4.0.2/100-mingw64-malloc.patch
+++ b/packages/mingw-w64/v3.2.0/100-mingw64-malloc.patch
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
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/mingw-w64/v3.2.0/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/patches/mingw-w64/v4.0.1/100-mingw64-malloc.patch b/packages/mingw-w64/v3.3.0/100-mingw64-malloc.patch
index d9d5a61..d9d5a61 100644
--- a/patches/mingw-w64/v4.0.1/100-mingw64-malloc.patch
+++ b/packages/mingw-w64/v3.3.0/100-mingw64-malloc.patch
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
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/mingw-w64/v3.3.0/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/patches/mingw-w64/v4.0.0/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.6/100-mingw64-malloc.patch
index d9d5a61..d9d5a61 100644
--- a/patches/mingw-w64/v4.0.0/100-mingw64-malloc.patch
+++ b/packages/mingw-w64/v4.0.6/100-mingw64-malloc.patch
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/v4.0.6/version.desc b/packages/mingw-w64/v4.0.6/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/mingw-w64/v4.0.6/version.desc
diff --git a/patches/mingw-w64/v5.0.2/100-mingw64-malloc.patch b/packages/mingw-w64/v5.0.2/100-mingw64-malloc.patch
index 3d05b63..3d05b63 100644
--- a/patches/mingw-w64/v5.0.2/100-mingw64-malloc.patch
+++ b/packages/mingw-w64/v5.0.2/100-mingw64-malloc.patch
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/mingw-w64/v5.0.2/version.desc b/packages/mingw-w64/v5.0.2/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/mingw-w64/v5.0.2/version.desc
diff --git a/packages/mpc/0.7/version.desc b/packages/mpc/0.7/version.desc
new file mode 100644
index 0000000..a529846
--- /dev/null
+++ b/packages/mpc/0.7/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+mirrors='http://www.multiprecision.org/mpc/download'
diff --git a/packages/mpc/0.8.2/version.desc b/packages/mpc/0.8.2/version.desc
new file mode 100644
index 0000000..a529846
--- /dev/null
+++ b/packages/mpc/0.8.2/version.desc
@@ -0,0 +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
new file mode 100644
index 0000000..a529846
--- /dev/null
+++ b/packages/mpc/0.9/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+mirrors='http://www.multiprecision.org/mpc/download'
diff --git a/packages/mpc/1.0.3/version.desc b/packages/mpc/1.0.3/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/mpc/1.0.3/version.desc
diff --git a/packages/mpc/package.desc b/packages/mpc/package.desc
new file mode 100644
index 0000000..04c2ac2
--- /dev/null
+++ b/packages/mpc/package.desc
@@ -0,0 +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/patches/mpfr/2.4.2/100-sin_cos_underflow.patch b/packages/mpfr/2.4.2/100-sin_cos_underflow.patch
index 2721517..2721517 100644
--- a/patches/mpfr/2.4.2/100-sin_cos_underflow.patch
+++ b/packages/mpfr/2.4.2/100-sin_cos_underflow.patch
diff --git a/patches/mpfr/2.4.2/110-longlong.h.patch b/packages/mpfr/2.4.2/110-longlong.h.patch
index fa85d8e..fa85d8e 100644
--- a/patches/mpfr/2.4.2/110-longlong.h.patch
+++ b/packages/mpfr/2.4.2/110-longlong.h.patch
diff --git a/patches/mpfr/2.4.2/120-gmp5.patch b/packages/mpfr/2.4.2/120-gmp5.patch
index 3ce4952..3ce4952 100644
--- a/patches/mpfr/2.4.2/120-gmp5.patch
+++ b/packages/mpfr/2.4.2/120-gmp5.patch
diff --git a/packages/mpfr/2.4.2/version.desc b/packages/mpfr/2.4.2/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/mpfr/2.4.2/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/mpfr/3.0.1/110-asin_exprange.patch b/packages/mpfr/3.0.1/110-asin_exprange.patch
index d79a6f9..d79a6f9 100644
--- a/patches/mpfr/3.0.1/110-asin_exprange.patch
+++ b/packages/mpfr/3.0.1/110-asin_exprange.patch
diff --git a/patches/mpfr/3.0.1/120-rec_sqrt-carry.patch b/packages/mpfr/3.0.1/120-rec_sqrt-carry.patch
index 0367d84..0367d84 100644
--- a/patches/mpfr/3.0.1/120-rec_sqrt-carry.patch
+++ b/packages/mpfr/3.0.1/120-rec_sqrt-carry.patch
diff --git a/patches/mpfr/3.0.1/130-atan-expo-range.patch b/packages/mpfr/3.0.1/130-atan-expo-range.patch
index 251b837..251b837 100644
--- a/patches/mpfr/3.0.1/130-atan-expo-range.patch
+++ b/packages/mpfr/3.0.1/130-atan-expo-range.patch
diff --git a/patches/mpfr/3.0.1/140-texp-zero.patch b/packages/mpfr/3.0.1/140-texp-zero.patch
index fd74087..fd74087 100644
--- a/patches/mpfr/3.0.1/140-texp-zero.patch
+++ b/packages/mpfr/3.0.1/140-texp-zero.patch
diff --git a/packages/mpfr/3.0.1/version.desc b/packages/mpfr/3.0.1/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/mpfr/3.0.1/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/mpfr/3.1.5/version.desc b/packages/mpfr/3.1.5/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/mpfr/3.1.5/version.desc
diff --git a/packages/mpfr/package.desc b/packages/mpfr/package.desc
new file mode 100644
index 0000000..59cb5d4
--- /dev/null
+++ b/packages/mpfr/package.desc
@@ -0,0 +1,5 @@
+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/1.1.15/version.desc b/packages/musl/1.1.15/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/musl/1.1.15/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/musl/1.1.16/version.desc b/packages/musl/1.1.16/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/musl/1.1.16/version.desc
diff --git a/packages/musl/package.desc b/packages/musl/package.desc
new file mode 100644
index 0000000..3dac0d1
--- /dev/null
+++ b/packages/musl/package.desc
@@ -0,0 +1,3 @@
+repository='git git://git.musl-libc.org/musl'
+mirrors='http://www.musl-libc.org/releases'
+archive_formats='.tar.gz'
diff --git a/patches/ncurses/6.0/100-ncurses-6.0-20150810.patch b/packages/ncurses/6.0/100-ncurses-6.0-20150810.patch
index 76f238f..76f238f 100644
--- a/patches/ncurses/6.0/100-ncurses-6.0-20150810.patch
+++ b/packages/ncurses/6.0/100-ncurses-6.0-20150810.patch
diff --git a/patches/ncurses/6.0/110-ncurses-6.0-20150815.patch b/packages/ncurses/6.0/110-ncurses-6.0-20150815.patch
index 21fe06e..21fe06e 100644
--- a/patches/ncurses/6.0/110-ncurses-6.0-20150815.patch
+++ b/packages/ncurses/6.0/110-ncurses-6.0-20150815.patch
diff --git a/patches/ncurses/6.0/120-ncurses-6.0-20150822.patch b/packages/ncurses/6.0/120-ncurses-6.0-20150822.patch
index 202ffe8..202ffe8 100644
--- a/patches/ncurses/6.0/120-ncurses-6.0-20150822.patch
+++ b/packages/ncurses/6.0/120-ncurses-6.0-20150822.patch
diff --git a/patches/ncurses/6.0/130-ncurses-6.0-20150905.patch b/packages/ncurses/6.0/130-ncurses-6.0-20150905.patch
index 76dd45c..76dd45c 100644
--- a/patches/ncurses/6.0/130-ncurses-6.0-20150905.patch
+++ b/packages/ncurses/6.0/130-ncurses-6.0-20150905.patch
diff --git a/patches/ncurses/6.0/140-ncurses-6.0-20150912.patch b/packages/ncurses/6.0/140-ncurses-6.0-20150912.patch
index 4d698f4..4d698f4 100644
--- a/patches/ncurses/6.0/140-ncurses-6.0-20150912.patch
+++ b/packages/ncurses/6.0/140-ncurses-6.0-20150912.patch
diff --git a/patches/ncurses/6.0/150-ncurses-6.0-20150919.patch b/packages/ncurses/6.0/150-ncurses-6.0-20150919.patch
index 13646a7..13646a7 100644
--- a/patches/ncurses/6.0/150-ncurses-6.0-20150919.patch
+++ b/packages/ncurses/6.0/150-ncurses-6.0-20150919.patch
diff --git a/patches/ncurses/6.0/160-ncurses-6.0-20150926.patch b/packages/ncurses/6.0/160-ncurses-6.0-20150926.patch
index d675a26..d675a26 100644
--- a/patches/ncurses/6.0/160-ncurses-6.0-20150926.patch
+++ b/packages/ncurses/6.0/160-ncurses-6.0-20150926.patch
diff --git a/patches/ncurses/6.0/170-ncurses-6.0-20151010.patch b/packages/ncurses/6.0/170-ncurses-6.0-20151010.patch
index 1f9e949..1f9e949 100644
--- a/patches/ncurses/6.0/170-ncurses-6.0-20151010.patch
+++ b/packages/ncurses/6.0/170-ncurses-6.0-20151010.patch
diff --git a/patches/ncurses/6.0/180-ncurses-6.0-20151017.patch b/packages/ncurses/6.0/180-ncurses-6.0-20151017.patch
index 6bb1cd3..6bb1cd3 100644
--- a/patches/ncurses/6.0/180-ncurses-6.0-20151017.patch
+++ b/packages/ncurses/6.0/180-ncurses-6.0-20151017.patch
diff --git a/patches/ncurses/6.0/190-ncurses-6.0-20151024.patch b/packages/ncurses/6.0/190-ncurses-6.0-20151024.patch
index 61f922f..61f922f 100644
--- a/patches/ncurses/6.0/190-ncurses-6.0-20151024.patch
+++ b/packages/ncurses/6.0/190-ncurses-6.0-20151024.patch
diff --git a/patches/ncurses/6.0/200-ncurses-6.0-20151101.patch b/packages/ncurses/6.0/200-ncurses-6.0-20151101.patch
index 7cae284..7cae284 100644
--- a/patches/ncurses/6.0/200-ncurses-6.0-20151101.patch
+++ b/packages/ncurses/6.0/200-ncurses-6.0-20151101.patch
diff --git a/patches/ncurses/6.0/210-ncurses-6.0-20151107.patch b/packages/ncurses/6.0/210-ncurses-6.0-20151107.patch
index f2567c9..f2567c9 100644
--- a/patches/ncurses/6.0/210-ncurses-6.0-20151107.patch
+++ b/packages/ncurses/6.0/210-ncurses-6.0-20151107.patch
diff --git a/patches/ncurses/6.0/999-create-run_tic.patch b/packages/ncurses/6.0/999-create-run_tic.patch
index 7c4fb0d..7c4fb0d 100644
--- a/patches/ncurses/6.0/999-create-run_tic.patch
+++ b/packages/ncurses/6.0/999-create-run_tic.patch
diff --git a/packages/ncurses/6.0/version.desc b/packages/ncurses/6.0/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/ncurses/6.0/version.desc
diff --git a/packages/ncurses/package.desc b/packages/ncurses/package.desc
new file mode 100644
index 0000000..0243856
--- /dev/null
+++ b/packages/ncurses/package.desc
@@ -0,0 +1,3 @@
+# No public repository for ncurses
+mirrors='ftp://invisible-island.net/ncurses $(CT_Mirrors GNU ncurses)'
+archive_formats='.tar.gz'
diff --git a/patches/newlib/linaro-2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib-linaro/2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch
index 1d0b49b..1d0b49b 100644
--- a/patches/newlib/linaro-2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib-linaro/2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/patches/newlib/linaro-2.1.0-2014.09/110-fix-eabihf.patch b/packages/newlib-linaro/2.1.0-2014.09/110-fix-eabihf.patch
index 21a3149..21a3149 100644
--- a/patches/newlib/linaro-2.1.0-2014.09/110-fix-eabihf.patch
+++ b/packages/newlib-linaro/2.1.0-2014.09/110-fix-eabihf.patch
diff --git a/patches/newlib/linaro-2.1.0-2014.09/200-fix-mt-cflags.patch b/packages/newlib-linaro/2.1.0-2014.09/200-fix-mt-cflags.patch
index f64c170..f64c170 100644
--- a/patches/newlib/linaro-2.1.0-2014.09/200-fix-mt-cflags.patch
+++ b/packages/newlib-linaro/2.1.0-2014.09/200-fix-mt-cflags.patch
diff --git a/packages/newlib-linaro/2.1.0-2014.09/version.desc b/packages/newlib-linaro/2.1.0-2014.09/version.desc
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/newlib-linaro/2.1.0-2014.09/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/patches/newlib/linaro-2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib-linaro/2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch
index 1d0b49b..1d0b49b 100644
--- a/patches/newlib/linaro-2.1.0-2014.09/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib-linaro/2.2.0-2015.01/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/patches/newlib/linaro-2.2.0-2015.01/110-fix-eabihf.patch b/packages/newlib-linaro/2.2.0-2015.01/110-fix-eabihf.patch
index 1fa21cc..1fa21cc 100644
--- a/patches/newlib/linaro-2.2.0-2015.01/110-fix-eabihf.patch
+++ b/packages/newlib-linaro/2.2.0-2015.01/110-fix-eabihf.patch
diff --git a/patches/newlib/linaro-2.2.0-2015.01/200-fix-mt-cflags.patch b/packages/newlib-linaro/2.2.0-2015.01/200-fix-mt-cflags.patch
index 68e935b..68e935b 100644
--- a/patches/newlib/linaro-2.2.0-2015.01/200-fix-mt-cflags.patch
+++ b/packages/newlib-linaro/2.2.0-2015.01/200-fix-mt-cflags.patch
diff --git a/packages/newlib-linaro/2.2.0-2015.01/version.desc b/packages/newlib-linaro/2.2.0-2015.01/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/newlib-linaro/2.2.0-2015.01/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/newlib-linaro/package.desc b/packages/newlib-linaro/package.desc
new file mode 100644
index 0000000..bc92a5b
--- /dev/null
+++ b/packages/newlib-linaro/package.desc
@@ -0,0 +1,6 @@
+origin='Linaro'
+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/patches/newlib/1.17.0/110-fix-eabihf.patch b/packages/newlib/1.17.0/110-fix-eabihf.patch
index d896ad0..d896ad0 100644
--- a/patches/newlib/1.17.0/110-fix-eabihf.patch
+++ b/packages/newlib/1.17.0/110-fix-eabihf.patch
diff --git a/patches/newlib/1.17.0/200-fix-mt-cflags.patch b/packages/newlib/1.17.0/200-fix-mt-cflags.patch
index f97ba15..f97ba15 100644
--- a/patches/newlib/1.17.0/200-fix-mt-cflags.patch
+++ b/packages/newlib/1.17.0/200-fix-mt-cflags.patch
diff --git a/patches/newlib/1.17.0/999-fix-arm-build.patch b/packages/newlib/1.17.0/999-fix-arm-build.patch
index 154a92f..154a92f 100644
--- a/patches/newlib/1.17.0/999-fix-arm-build.patch
+++ b/packages/newlib/1.17.0/999-fix-arm-build.patch
diff --git a/packages/newlib/1.17.0/version.desc b/packages/newlib/1.17.0/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/newlib/1.17.0/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch
index 6214ee5..6214ee5 100644
--- a/patches/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib/1.18.0/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/patches/newlib/1.18.0/110-fix-eabihf.patch b/packages/newlib/1.18.0/110-fix-eabihf.patch
index c2868b9..c2868b9 100644
--- a/patches/newlib/1.18.0/110-fix-eabihf.patch
+++ b/packages/newlib/1.18.0/110-fix-eabihf.patch
diff --git a/patches/newlib/1.18.0/200-fix-mt-cflags.patch b/packages/newlib/1.18.0/200-fix-mt-cflags.patch
index 718e0c9..718e0c9 100644
--- a/patches/newlib/1.18.0/200-fix-mt-cflags.patch
+++ b/packages/newlib/1.18.0/200-fix-mt-cflags.patch
diff --git a/packages/newlib/1.18.0/version.desc b/packages/newlib/1.18.0/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/newlib/1.18.0/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch
index 191363a..191363a 100644
--- a/patches/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib/1.19.0/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/patches/newlib/1.19.0/110-fix-eabihf.patch b/packages/newlib/1.19.0/110-fix-eabihf.patch
index 69ddff3..69ddff3 100644
--- a/patches/newlib/1.19.0/110-fix-eabihf.patch
+++ b/packages/newlib/1.19.0/110-fix-eabihf.patch
diff --git a/patches/newlib/1.19.0/200-fix-mt-cflags.patch b/packages/newlib/1.19.0/200-fix-mt-cflags.patch
index 9158e90..9158e90 100644
--- a/patches/newlib/1.19.0/200-fix-mt-cflags.patch
+++ b/packages/newlib/1.19.0/200-fix-mt-cflags.patch
diff --git a/packages/newlib/1.19.0/version.desc b/packages/newlib/1.19.0/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/newlib/1.19.0/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/1.20.0/100-fix-unaligned-access-memcpy-m68k.patch
index 1d0b49b..1d0b49b 100644
--- a/patches/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib/1.20.0/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/patches/newlib/1.20.0/110-fix-eabihf.patch b/packages/newlib/1.20.0/110-fix-eabihf.patch
index 8e30823..8e30823 100644
--- a/patches/newlib/1.20.0/110-fix-eabihf.patch
+++ b/packages/newlib/1.20.0/110-fix-eabihf.patch
diff --git a/patches/newlib/1.20.0/200-fix-mt-cflags.patch b/packages/newlib/1.20.0/200-fix-mt-cflags.patch
index b470af7..b470af7 100644
--- a/patches/newlib/1.20.0/200-fix-mt-cflags.patch
+++ b/packages/newlib/1.20.0/200-fix-mt-cflags.patch
diff --git a/packages/newlib/1.20.0/version.desc b/packages/newlib/1.20.0/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/newlib/1.20.0/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch
index 1d0b49b..1d0b49b 100644
--- a/patches/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/patches/newlib/2.0.0/110-fix-eabihf.patch b/packages/newlib/2.0.0/110-fix-eabihf.patch
index 5bb2405..5bb2405 100644
--- a/patches/newlib/2.0.0/110-fix-eabihf.patch
+++ b/packages/newlib/2.0.0/110-fix-eabihf.patch
diff --git a/patches/newlib/2.0.0/200-fix-mt-cflags.patch b/packages/newlib/2.0.0/200-fix-mt-cflags.patch
index d2b0529..d2b0529 100644
--- a/patches/newlib/2.0.0/200-fix-mt-cflags.patch
+++ b/packages/newlib/2.0.0/200-fix-mt-cflags.patch
diff --git a/packages/newlib/2.0.0/version.desc b/packages/newlib/2.0.0/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/newlib/2.0.0/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch
index 1d0b49b..1d0b49b 100644
--- a/patches/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/patches/newlib/2.1.0/110-fix-eabihf.patch b/packages/newlib/2.1.0/110-fix-eabihf.patch
index 5f91a23..5f91a23 100644
--- a/patches/newlib/2.1.0/110-fix-eabihf.patch
+++ b/packages/newlib/2.1.0/110-fix-eabihf.patch
diff --git a/patches/newlib/2.1.0/200-fix-mt-cflags.patch b/packages/newlib/2.1.0/200-fix-mt-cflags.patch
index 57839ed..57839ed 100644
--- a/patches/newlib/2.1.0/200-fix-mt-cflags.patch
+++ b/packages/newlib/2.1.0/200-fix-mt-cflags.patch
diff --git a/packages/newlib/2.1.0/version.desc b/packages/newlib/2.1.0/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/newlib/2.1.0/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch
index 1d0b49b..1d0b49b 100644
--- a/patches/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib/2.2.0.20151023/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/patches/newlib/2.2.0.20151023/110-fix-eabihf.patch b/packages/newlib/2.2.0.20151023/110-fix-eabihf.patch
index 2d5a3ff..2d5a3ff 100644
--- a/patches/newlib/2.2.0.20151023/110-fix-eabihf.patch
+++ b/packages/newlib/2.2.0.20151023/110-fix-eabihf.patch
diff --git a/patches/newlib/2.2.0.20151023/200-fix-mt-cflags.patch b/packages/newlib/2.2.0.20151023/200-fix-mt-cflags.patch
index e1d8c02..e1d8c02 100644
--- a/patches/newlib/2.2.0.20151023/200-fix-mt-cflags.patch
+++ b/packages/newlib/2.2.0.20151023/200-fix-mt-cflags.patch
diff --git a/packages/newlib/2.2.0.20151023/version.desc b/packages/newlib/2.2.0.20151023/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/newlib/2.2.0.20151023/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch
index 1d0b49b..1d0b49b 100644
--- a/patches/newlib/2.1.0/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib/2.3.0.20160226/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/patches/newlib/2.3.0.20160226/110-fix-eabihf.patch b/packages/newlib/2.3.0.20160226/110-fix-eabihf.patch
index 37d8842..37d8842 100644
--- a/patches/newlib/2.3.0.20160226/110-fix-eabihf.patch
+++ b/packages/newlib/2.3.0.20160226/110-fix-eabihf.patch
diff --git a/patches/newlib/2.3.0.20160226/200-fix-mt-cflags.patch b/packages/newlib/2.3.0.20160226/200-fix-mt-cflags.patch
index 8c080e4..8c080e4 100644
--- a/patches/newlib/2.3.0.20160226/200-fix-mt-cflags.patch
+++ b/packages/newlib/2.3.0.20160226/200-fix-mt-cflags.patch
diff --git a/packages/newlib/2.3.0.20160226/version.desc b/packages/newlib/2.3.0.20160226/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/newlib/2.3.0.20160226/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch
index 1d0b49b..1d0b49b 100644
--- a/patches/newlib/2.0.0/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib/2.4.0.20161025/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/patches/newlib/2.4.0.20161025/110-fix-eabihf.patch b/packages/newlib/2.4.0.20161025/110-fix-eabihf.patch
index 65122f1..65122f1 100644
--- a/patches/newlib/2.4.0.20161025/110-fix-eabihf.patch
+++ b/packages/newlib/2.4.0.20161025/110-fix-eabihf.patch
diff --git a/patches/newlib/2.4.0.20161025/200-fix-mt-cflags.patch b/packages/newlib/2.4.0.20161025/200-fix-mt-cflags.patch
index dcf6826..dcf6826 100644
--- a/patches/newlib/2.4.0.20161025/200-fix-mt-cflags.patch
+++ b/packages/newlib/2.4.0.20161025/200-fix-mt-cflags.patch
diff --git a/packages/newlib/2.4.0.20161025/version.desc b/packages/newlib/2.4.0.20161025/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/newlib/2.4.0.20161025/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/newlib/1.20.0/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/patches/newlib/1.20.0/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib/2.5.0.20170720/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/patches/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/patches/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/newlib/2.5.0.20170720/version.desc b/packages/newlib/2.5.0.20170720/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/newlib/2.5.0.20170720/version.desc
diff --git a/packages/newlib/package.desc b/packages/newlib/package.desc
new file mode 100644
index 0000000..5d09a77
--- /dev/null
+++ b/packages/newlib/package.desc
@@ -0,0 +1,6 @@
+origin='RedHat'
+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/patches/strace/4.10/001_aarch64_rt_sigreturn.patch b/packages/strace/4.10/001_aarch64_rt_sigreturn.patch
index 6b7bbe3..6b7bbe3 100644
--- a/patches/strace/4.10/001_aarch64_rt_sigreturn.patch
+++ b/packages/strace/4.10/001_aarch64_rt_sigreturn.patch
diff --git a/patches/strace/4.10/002_arm_mmap2.patch b/packages/strace/4.10/002_arm_mmap2.patch
index 41953e2..41953e2 100644
--- a/patches/strace/4.10/002_arm_mmap2.patch
+++ b/packages/strace/4.10/002_arm_mmap2.patch
diff --git a/patches/strace/4.10/003_aarch64_arch_regs.patch b/packages/strace/4.10/003_aarch64_arch_regs.patch
index e5153b5..e5153b5 100644
--- a/patches/strace/4.10/003_aarch64_arch_regs.patch
+++ b/packages/strace/4.10/003_aarch64_arch_regs.patch
diff --git a/patches/strace/4.10/004_stat64-v.test.patch b/packages/strace/4.10/004_stat64-v.test.patch
index 53383e3..53383e3 100644
--- a/patches/strace/4.10/004_stat64-v.test.patch
+++ b/packages/strace/4.10/004_stat64-v.test.patch
diff --git a/patches/strace/4.10/005_select_test.patch b/packages/strace/4.10/005_select_test.patch
index cb56ec6..cb56ec6 100644
--- a/patches/strace/4.10/005_select_test.patch
+++ b/packages/strace/4.10/005_select_test.patch
diff --git a/patches/strace/4.10/006_fix_aarch64_ioctl_decoding.patch b/packages/strace/4.10/006_fix_aarch64_ioctl_decoding.patch
index a270349..a270349 100644
--- a/patches/strace/4.10/006_fix_aarch64_ioctl_decoding.patch
+++ b/packages/strace/4.10/006_fix_aarch64_ioctl_decoding.patch
diff --git a/patches/strace/4.10/007_fix_bexecve64_test.patch b/packages/strace/4.10/007_fix_bexecve64_test.patch
index 6dc9b46..6dc9b46 100644
--- a/patches/strace/4.10/007_fix_bexecve64_test.patch
+++ b/packages/strace/4.10/007_fix_bexecve64_test.patch
diff --git a/patches/strace/4.10/008_decode_mips_indirect_syscall.patch b/packages/strace/4.10/008_decode_mips_indirect_syscall.patch
index d2d7217..d2d7217 100644
--- a/patches/strace/4.10/008_decode_mips_indirect_syscall.patch
+++ b/packages/strace/4.10/008_decode_mips_indirect_syscall.patch
diff --git a/patches/strace/4.10/009-upstream-musl_includes.patch b/packages/strace/4.10/009-upstream-musl_includes.patch
index c68f8d8..c68f8d8 100644
--- a/patches/strace/4.10/009-upstream-musl_includes.patch
+++ b/packages/strace/4.10/009-upstream-musl_includes.patch
diff --git a/patches/strace/4.10/010-use-host-ioctl.patch b/packages/strace/4.10/010-use-host-ioctl.patch
index e9c34d3..e9c34d3 100644
--- a/patches/strace/4.10/010-use-host-ioctl.patch
+++ b/packages/strace/4.10/010-use-host-ioctl.patch
diff --git a/packages/strace/4.10/version.desc b/packages/strace/4.10/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/strace/4.10/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/strace/4.11/010-use-host-ioctl.patch b/packages/strace/4.11/010-use-host-ioctl.patch
index 5155200..5155200 100644
--- a/patches/strace/4.11/010-use-host-ioctl.patch
+++ b/packages/strace/4.11/010-use-host-ioctl.patch
diff --git a/packages/strace/4.11/version.desc b/packages/strace/4.11/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/strace/4.11/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/strace/4.12/010-use-host-ioctl.patch b/packages/strace/4.12/010-use-host-ioctl.patch
index bd5a40e..bd5a40e 100644
--- a/patches/strace/4.12/010-use-host-ioctl.patch
+++ b/packages/strace/4.12/010-use-host-ioctl.patch
diff --git a/packages/strace/4.12/version.desc b/packages/strace/4.12/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/strace/4.12/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/strace/4.13/010-use-host-ioctl.patch b/packages/strace/4.13/010-use-host-ioctl.patch
index 40ebbf3..40ebbf3 100644
--- a/patches/strace/4.13/010-use-host-ioctl.patch
+++ b/packages/strace/4.13/010-use-host-ioctl.patch
diff --git a/packages/strace/4.13/version.desc b/packages/strace/4.13/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/strace/4.13/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/strace/4.14/010-use-host-ioctl.patch b/packages/strace/4.14/010-use-host-ioctl.patch
index 2c7671f..2c7671f 100644
--- a/patches/strace/4.14/010-use-host-ioctl.patch
+++ b/packages/strace/4.14/010-use-host-ioctl.patch
diff --git a/packages/strace/4.14/version.desc b/packages/strace/4.14/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/strace/4.14/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/strace/4.15/010-use-host-ioctl.patch b/packages/strace/4.15/010-use-host-ioctl.patch
index 71d380a..71d380a 100644
--- a/patches/strace/4.15/010-use-host-ioctl.patch
+++ b/packages/strace/4.15/010-use-host-ioctl.patch
diff --git a/packages/strace/4.15/version.desc b/packages/strace/4.15/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/strace/4.15/version.desc
diff --git a/packages/strace/4.16/version.desc b/packages/strace/4.16/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/strace/4.16/version.desc
diff --git a/packages/strace/4.17/version.desc b/packages/strace/4.17/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/strace/4.17/version.desc
diff --git a/packages/strace/4.18/version.desc b/packages/strace/4.18/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/strace/4.18/version.desc
diff --git a/packages/strace/4.5.20/version.desc b/packages/strace/4.5.20/version.desc
new file mode 100644
index 0000000..a114052
--- /dev/null
+++ b/packages/strace/4.5.20/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/strace/4.6/version.desc b/packages/strace/4.6/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/strace/4.6/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/strace/4.7/version.desc b/packages/strace/4.7/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/strace/4.7/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/patches/strace/4.8/001-strace-4.8-glibc_2.18_build_fix-1.patch b/packages/strace/4.8/001-strace-4.8-glibc_2.18_build_fix-1.patch
index 49a71e1..49a71e1 100644
--- a/patches/strace/4.8/001-strace-4.8-glibc_2.18_build_fix-1.patch
+++ b/packages/strace/4.8/001-strace-4.8-glibc_2.18_build_fix-1.patch
diff --git a/packages/strace/4.8/version.desc b/packages/strace/4.8/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/strace/4.8/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/strace/4.9/version.desc b/packages/strace/4.9/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/strace/4.9/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/strace/package.desc b/packages/strace/package.desc
new file mode 100644
index 0000000..8d5f2c6
--- /dev/null
+++ b/packages/strace/package.desc
@@ -0,0 +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.25/0001-gdb8.patch b/packages/uClibc-ng/1.0.25/0001-gdb8.patch
new file mode 100644
index 0000000..b4a70eb
--- /dev/null
+++ b/packages/uClibc-ng/1.0.25/0001-gdb8.patch
@@ -0,0 +1,64 @@
+commit 111f01d432d542a153c1cad83def3a6ab57df7af
+Author: Waldemar Brodkorb <wbx@uclibc-ng.org>
+Date: Sat Aug 5 11:28:07 2017 +0200
+
+ fix issues with gdb 8.0
+
+ GDB 8.0 is compiled and linked with g++, but the
+ linking of static targets (f.e. coldfire) fails,
+ without declaring the functions in thread_db.h
+ extern C.
+
+ The compilation of gdb errors out with:
+ thread-db.o: In function `thread_db_init()':
+ thread-db.c:(.text+0x5b6): undefined reference to `td_ta_new(ps_prochandle*, td_thragent**)'
+ thread-db.c:(.text+0x61e): undefined reference to `td_thr_get_info(td_thrhandle const*, td_thrinfo*)'
+ thread-db.c:(.text+0x632): undefined reference to `td_symbol_list()'
+ ..
+
+diff --git a/libpthread/linuxthreads_db/thread_db.h b/libpthread/linuxthreads_db/thread_db.h
+index 13c30af5b..ec79f6022 100644
+--- a/libpthread/linuxthreads_db/thread_db.h
++++ b/libpthread/linuxthreads_db/thread_db.h
+@@ -27,6 +27,9 @@
+ #include <sys/types.h>
+ #include <sys/procfs.h>
+
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* Error codes of the library. */
+ typedef enum
+@@ -455,4 +458,8 @@ extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th);
+ /* Resume execution of thread TH. */
+ extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th);
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif /* thread_db.h */
+diff --git a/libpthread/nptl_db/thread_db.h b/libpthread/nptl_db/thread_db.h
+index 27ea69af8..993842ff5 100644
+--- a/libpthread/nptl_db/thread_db.h
++++ b/libpthread/nptl_db/thread_db.h
+@@ -27,6 +27,9 @@
+ #include <sys/types.h>
+ #include <sys/procfs.h>
+
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* Error codes of the library. */
+ typedef enum
+@@ -455,4 +458,8 @@ extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th);
+ /* Resume execution of thread TH. */
+ extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th);
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif /* thread_db.h */
diff --git a/packages/uClibc-ng/1.0.25/version.desc b/packages/uClibc-ng/1.0.25/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/uClibc-ng/1.0.25/version.desc
diff --git a/packages/uClibc-ng/1.0.26/0001-gdb8.patch b/packages/uClibc-ng/1.0.26/0001-gdb8.patch
new file mode 100644
index 0000000..b4a70eb
--- /dev/null
+++ b/packages/uClibc-ng/1.0.26/0001-gdb8.patch
@@ -0,0 +1,64 @@
+commit 111f01d432d542a153c1cad83def3a6ab57df7af
+Author: Waldemar Brodkorb <wbx@uclibc-ng.org>
+Date: Sat Aug 5 11:28:07 2017 +0200
+
+ fix issues with gdb 8.0
+
+ GDB 8.0 is compiled and linked with g++, but the
+ linking of static targets (f.e. coldfire) fails,
+ without declaring the functions in thread_db.h
+ extern C.
+
+ The compilation of gdb errors out with:
+ thread-db.o: In function `thread_db_init()':
+ thread-db.c:(.text+0x5b6): undefined reference to `td_ta_new(ps_prochandle*, td_thragent**)'
+ thread-db.c:(.text+0x61e): undefined reference to `td_thr_get_info(td_thrhandle const*, td_thrinfo*)'
+ thread-db.c:(.text+0x632): undefined reference to `td_symbol_list()'
+ ..
+
+diff --git a/libpthread/linuxthreads_db/thread_db.h b/libpthread/linuxthreads_db/thread_db.h
+index 13c30af5b..ec79f6022 100644
+--- a/libpthread/linuxthreads_db/thread_db.h
++++ b/libpthread/linuxthreads_db/thread_db.h
+@@ -27,6 +27,9 @@
+ #include <sys/types.h>
+ #include <sys/procfs.h>
+
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* Error codes of the library. */
+ typedef enum
+@@ -455,4 +458,8 @@ extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th);
+ /* Resume execution of thread TH. */
+ extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th);
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif /* thread_db.h */
+diff --git a/libpthread/nptl_db/thread_db.h b/libpthread/nptl_db/thread_db.h
+index 27ea69af8..993842ff5 100644
+--- a/libpthread/nptl_db/thread_db.h
++++ b/libpthread/nptl_db/thread_db.h
+@@ -27,6 +27,9 @@
+ #include <sys/types.h>
+ #include <sys/procfs.h>
+
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* Error codes of the library. */
+ typedef enum
+@@ -455,4 +458,8 @@ extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th);
+ /* Resume execution of thread TH. */
+ extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th);
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif /* thread_db.h */
diff --git a/packages/uClibc-ng/1.0.26/version.desc b/packages/uClibc-ng/1.0.26/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/uClibc-ng/1.0.26/version.desc
diff --git a/packages/uClibc-ng/package.desc b/packages/uClibc-ng/package.desc
new file mode 100644
index 0000000..ee37b57
--- /dev/null
+++ b/packages/uClibc-ng/package.desc
@@ -0,0 +1,5 @@
+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/patches/uClibc/0.9.33.2/100-m68k-ice.patch b/packages/uClibc/0.9.33.2/100-m68k-ice.patch
index 410f8d6..410f8d6 100644
--- a/patches/uClibc/0.9.33.2/100-m68k-ice.patch
+++ b/packages/uClibc/0.9.33.2/100-m68k-ice.patch
diff --git a/patches/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch b/packages/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch
index 0381ba8..0381ba8 100644
--- a/patches/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch
+++ b/packages/uClibc/0.9.33.2/200-fix-kernel-3.4plus-build.patch
diff --git a/patches/uClibc/0.9.33.2/300-fix-darwin-build.patch b/packages/uClibc/0.9.33.2/300-fix-darwin-build.patch
index 884307d..884307d 100644
--- a/patches/uClibc/0.9.33.2/300-fix-darwin-build.patch
+++ b/packages/uClibc/0.9.33.2/300-fix-darwin-build.patch
diff --git a/patches/uClibc/0.9.33.2/400-arm-unwind.patch b/packages/uClibc/0.9.33.2/400-arm-unwind.patch
index d31844c..d31844c 100644
--- a/patches/uClibc/0.9.33.2/400-arm-unwind.patch
+++ b/packages/uClibc/0.9.33.2/400-arm-unwind.patch
diff --git a/patches/uClibc/0.9.33.2/500-no-install-D.patch b/packages/uClibc/0.9.33.2/500-no-install-D.patch
index f8c2cc1..f8c2cc1 100644
--- a/patches/uClibc/0.9.33.2/500-no-install-D.patch
+++ b/packages/uClibc/0.9.33.2/500-no-install-D.patch
diff --git a/patches/uClibc/0.9.33.2/600-prefer-multilib.patch b/packages/uClibc/0.9.33.2/600-prefer-multilib.patch
index 677c599..677c599 100644
--- a/patches/uClibc/0.9.33.2/600-prefer-multilib.patch
+++ b/packages/uClibc/0.9.33.2/600-prefer-multilib.patch
diff --git a/patches/uClibc/0.9.33.2/998-dlopen-static.patch b/packages/uClibc/0.9.33.2/998-dlopen-static.patch
index 9d2fa55..9d2fa55 100644
--- a/patches/uClibc/0.9.33.2/998-dlopen-static.patch
+++ b/packages/uClibc/0.9.33.2/998-dlopen-static.patch
diff --git a/patches/uClibc/0.9.33.2/999-make-olddefconfig.patch b/packages/uClibc/0.9.33.2/999-make-olddefconfig.patch
index 8bc87ec..8bc87ec 100644
--- a/patches/uClibc/0.9.33.2/999-make-olddefconfig.patch
+++ b/packages/uClibc/0.9.33.2/999-make-olddefconfig.patch
diff --git a/packages/uClibc/0.9.33.2/version.desc b/packages/uClibc/0.9.33.2/version.desc
new file mode 100644
index 0000000..fcfe389
--- /dev/null
+++ b/packages/uClibc/0.9.33.2/version.desc
@@ -0,0 +1 @@
+obsolete='yes'
diff --git a/packages/uClibc/package.desc b/packages/uClibc/package.desc
new file mode 100644
index 0000000..d7f15df
--- /dev/null
+++ b/packages/uClibc/package.desc
@@ -0,0 +1,8 @@
+# Even though this is the "master" package, we really want to steer the users
+# towards uClibc-ng, as the original uClibc is no longer maintained.
+preferred='uClibc-ng'
+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/patches/zlib/1.2.11/100-make-check-fail.patch b/packages/zlib/1.2.11/100-make-check-fail.patch
index 3852206..3852206 100644
--- a/patches/zlib/1.2.11/100-make-check-fail.patch
+++ b/packages/zlib/1.2.11/100-make-check-fail.patch
diff --git a/patches/zlib/1.2.11/110-no-_wopen-cygwin.patch b/packages/zlib/1.2.11/110-no-_wopen-cygwin.patch
index 6704e3e..6704e3e 100644
--- a/patches/zlib/1.2.11/110-no-_wopen-cygwin.patch
+++ b/packages/zlib/1.2.11/110-no-_wopen-cygwin.patch
diff --git a/patches/zlib/1.2.11/120-mingw-static-only.patch b/packages/zlib/1.2.11/120-mingw-static-only.patch
index 9eef00b..9eef00b 100644
--- a/patches/zlib/1.2.11/120-mingw-static-only.patch
+++ b/packages/zlib/1.2.11/120-mingw-static-only.patch
diff --git a/packages/zlib/1.2.11/version.desc b/packages/zlib/1.2.11/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/zlib/1.2.11/version.desc
diff --git a/packages/zlib/package.desc b/packages/zlib/package.desc
new file mode 100644
index 0000000..1f7c64c
--- /dev/null
+++ b/packages/zlib/package.desc
@@ -0,0 +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/patches/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch b/patches/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch
deleted file mode 100644
index cea92f3..0000000
--- a/patches/binutils/2.24/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/patches/gcc/4.8.5/111-alpha-bad-eh_frame.patch b/patches/gcc/4.8.5/111-alpha-bad-eh_frame.patch
deleted file mode 100644
index 93f6e94..0000000
--- a/patches/gcc/4.8.5/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/patches/gcc/6.3.0/1100-ubsan-fix-check-empty-string.patch b/patches/gcc/6.3.0/1100-ubsan-fix-check-empty-string.patch
deleted file mode 100644
index c012719..0000000
--- a/patches/gcc/6.3.0/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/patches/gcc/6.3.0/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch b/patches/gcc/6.3.0/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
deleted file mode 100644
index 6e0ce6e..0000000
--- a/patches/gcc/6.3.0/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From d28554ee61a1ab1263274d66386e4051bca0ce05 Mon Sep 17 00:00:00 2001
-From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 18 Oct 2016 19:12:19 +0000
-Subject: [PATCH] xtensa: don't use unwind-dw2-fde-dip with elf targets
-
-Define LIB2ADDEH_XTENSA_UNWIND_DW2_FDE to unwind-dw2-fde.c in
-xtensa/t-elf and to unwind-dw2-fde-dip.c in xtensa/t-linux and use
-LIB2ADDEH_XTENSA_UNWIND_DW2_FDE in LIB2ADDEH definition.
-
-This fixes build for elf target with windowed xtensa core that currently
-breaks with the following error message:
-
- unwind-dw2-fde-dip.c:36:40: fatal error: elf.h: No such file or directory
-
-2016-10-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/t-elf (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
- definition.
- * config/xtensa/t-linux (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
- definition.
- * config/xtensa/t-windowed (LIB2ADDEH): Use
- LIB2ADDEH_XTENSA_UNWIND_DW2_FDE defined by either xtensa/t-elf
- or xtensa/t-linux.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241313 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- libgcc/config/xtensa/t-elf | 2 ++
- libgcc/config/xtensa/t-linux | 2 ++
- libgcc/config/xtensa/t-windowed | 2 +-
- 3 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/libgcc/config/xtensa/t-elf b/libgcc/config/xtensa/t-elf
-index 59d5121..967cf9b 100644
---- a/libgcc/config/xtensa/t-elf
-+++ b/libgcc/config/xtensa/t-elf
-@@ -3,3 +3,5 @@ CRTSTUFF_T_CFLAGS += -mlongcalls
- CRTSTUFF_T_CFLAGS_S += -mlongcalls
-
- HOST_LIBGCC2_CFLAGS += -mlongcalls
-+
-+LIB2ADDEH_XTENSA_UNWIND_DW2_FDE = $(srcdir)/unwind-dw2-fde.c
-diff --git a/libgcc/config/xtensa/t-linux b/libgcc/config/xtensa/t-linux
-index 6f4ae89..412ecca 100644
---- a/libgcc/config/xtensa/t-linux
-+++ b/libgcc/config/xtensa/t-linux
-@@ -1 +1,3 @@
- SHLIB_MAPFILES += $(srcdir)/config/xtensa/libgcc-glibc.ver
-+
-+LIB2ADDEH_XTENSA_UNWIND_DW2_FDE = $(srcdir)/unwind-dw2-fde-dip.c
-diff --git a/libgcc/config/xtensa/t-windowed b/libgcc/config/xtensa/t-windowed
-index a99156c..f140136 100644
---- a/libgcc/config/xtensa/t-windowed
-+++ b/libgcc/config/xtensa/t-windowed
-@@ -1,2 +1,2 @@
- LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \
-- $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
-+ $(LIB2ADDEH_XTENSA_UNWIND_DW2_FDE) $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
---
-2.1.4
-
diff --git a/patches/gcc/6.3.0/871-xtensa-Fix-PR-target-78118.patch b/patches/gcc/6.3.0/871-xtensa-Fix-PR-target-78118.patch
deleted file mode 100644
index c6ae103..0000000
--- a/patches/gcc/6.3.0/871-xtensa-Fix-PR-target-78118.patch
+++ /dev/null
@@ -1,318 +0,0 @@
-From bdda1689faf608ad7c83b5bd2e21a236b0047579 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Wed, 26 Oct 2016 08:02:51 +0000
-Subject: [PATCH] xtensa: Fix PR target/78118
-
-It started failing after the following commit: 32e90dc6a0cda45 ("PR
-rtl-optimization/61047").
-
-The change that made xtensa backend go ICE looks completely unrelated,
-and indeed, the issue is caused by the side effect of
-compute_frame_size() function call hidden in the
-INITIAL_ELIMINATION_OFFSET macro. This call updates the value of the
-xtensa_current_frame_size static variable, used in "return" instruction
-predicate. Prior to the change the value of xtensa_current_frame_size was
-set to 0 after the end of epilogue generation, which enabled the "return"
-instruction for the CALL0 ABI, but after the change the additional
-INITIAL_ELIMINATION_OFFSET calls make xtensa_current_frame_size non-zero
-and "return" pattern unavailable.
-
-Get rid of the global xtensa_current_frame_size and
-xtensa_callee_save_size variables by moving them into the
-machine_function structure. Implement predicate for the "return" pattern
-as a function. Don't communicate completion of epilogue generation
-through zeroing of xtensa_current_frame_size, add explicit epilogue_done
-variable to the machine_function structure. Don't update stack frame
-layout after the completion of reload.
-
-2016-10-26 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa-protos.h
- (xtensa_use_return_instruction_p): New prototype.
- * config/xtensa/xtensa.c (xtensa_current_frame_size,
- xtensa_callee_save_size): Remove.
- (struct machine_function): Add new fields: current_frame_size,
- callee_save_size, frame_laid_out and epilogue_done.
- (compute_frame_size, xtensa_expand_prologue,
- xtensa_expand_epilogue): Replace xtensa_callee_save_size with
- cfun->machine->callee_save_size and xtensa_current_frame_size
- with cfun->machine->current_frame_size.
- (compute_frame_size): Update cfun->machine->frame_laid_out and
- don't update frame layout after reload completion.
- (xtensa_expand_epilogue): Set cfun->machine->epilogue_done
- instead of zeroing xtensa_current_frame_size.
- (xtensa_use_return_instruction_p): New function.
- * config/xtensa/xtensa.h (xtensa_current_frame_size): Remove
- declaration.
- (INITIAL_ELIMINATION_OFFSET): Use return value of
- compute_frame_size instead of xtensa_current_frame_size value.
- * config/xtensa/xtensa.md ("return" pattern): Use new predicate
- function xtensa_use_return_instruction_p instead of inline code.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa-protos.h | 1 +
- gcc/config/xtensa/xtensa.c | 82 ++++++++++++++++++++++++---------------
- gcc/config/xtensa/xtensa.h | 6 +--
- gcc/config/xtensa/xtensa.md | 2 +-
- 4 files changed, 55 insertions(+), 36 deletions(-)
-
-diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h
-index f2ca526..873557f 100644
---- a/gcc/config/xtensa/xtensa-protos.h
-+++ b/gcc/config/xtensa/xtensa-protos.h
-@@ -68,6 +68,7 @@ extern rtx xtensa_return_addr (int, rtx);
- extern void xtensa_setup_frame_addresses (void);
- extern int xtensa_dbx_register_number (int);
- extern long compute_frame_size (int);
-+extern bool xtensa_use_return_instruction_p (void);
- extern void xtensa_expand_prologue (void);
- extern void xtensa_expand_epilogue (void);
- extern void order_regs_for_local_alloc (void);
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index 64d089b..e49f784 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -78,11 +78,6 @@ enum internal_test
- can support a given mode. */
- char xtensa_hard_regno_mode_ok[(int) MAX_MACHINE_MODE][FIRST_PSEUDO_REGISTER];
-
--/* Current frame size calculated by compute_frame_size. */
--unsigned xtensa_current_frame_size;
--/* Callee-save area size in the current frame calculated by compute_frame_size. */
--int xtensa_callee_save_size;
--
- /* Largest block move to handle in-line. */
- #define LARGEST_MOVE_RATIO 15
-
-@@ -94,6 +89,13 @@ struct GTY(()) machine_function
- bool vararg_a7;
- rtx vararg_a7_copy;
- rtx_insn *set_frame_ptr_insn;
-+ /* Current frame size calculated by compute_frame_size. */
-+ unsigned current_frame_size;
-+ /* Callee-save area size in the current frame calculated by
-+ compute_frame_size. */
-+ int callee_save_size;
-+ bool frame_laid_out;
-+ bool epilogue_done;
- };
-
- /* Vector, indexed by hard register number, which contains 1 for a
-@@ -2628,24 +2630,29 @@ compute_frame_size (int size)
- {
- int regno;
-
-+ if (reload_completed && cfun->machine->frame_laid_out)
-+ return cfun->machine->current_frame_size;
-+
- /* Add space for the incoming static chain value. */
- if (cfun->static_chain_decl != NULL)
- size += (1 * UNITS_PER_WORD);
-
-- xtensa_callee_save_size = 0;
-+ cfun->machine->callee_save_size = 0;
- for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
- {
- if (xtensa_call_save_reg(regno))
-- xtensa_callee_save_size += UNITS_PER_WORD;
-+ cfun->machine->callee_save_size += UNITS_PER_WORD;
- }
-
-- xtensa_current_frame_size =
-+ cfun->machine->current_frame_size =
- XTENSA_STACK_ALIGN (size
-- + xtensa_callee_save_size
-+ + cfun->machine->callee_save_size
- + crtl->outgoing_args_size
- + (WINDOW_SIZE * UNITS_PER_WORD));
-- xtensa_callee_save_size = XTENSA_STACK_ALIGN (xtensa_callee_save_size);
-- return xtensa_current_frame_size;
-+ cfun->machine->callee_save_size =
-+ XTENSA_STACK_ALIGN (cfun->machine->callee_save_size);
-+ cfun->machine->frame_laid_out = true;
-+ return cfun->machine->current_frame_size;
- }
-
-
-@@ -2696,6 +2703,7 @@ xtensa_expand_prologue (void)
- {
- int regno;
- HOST_WIDE_INT offset = 0;
-+ int callee_save_size = cfun->machine->callee_save_size;
-
- /* -128 is a limit of single addi instruction. */
- if (total_size > 0 && total_size <= 128)
-@@ -2709,7 +2717,7 @@ xtensa_expand_prologue (void)
- add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
- offset = total_size - UNITS_PER_WORD;
- }
-- else if (xtensa_callee_save_size)
-+ else if (callee_save_size)
- {
- /* 1020 is maximal s32i offset, if the frame is bigger than that
- * we move sp to the end of callee-saved save area, save and then
-@@ -2717,13 +2725,13 @@ xtensa_expand_prologue (void)
- if (total_size > 1024)
- {
- insn = emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
-- GEN_INT (-xtensa_callee_save_size)));
-+ GEN_INT (-callee_save_size)));
- RTX_FRAME_RELATED_P (insn) = 1;
- note_rtx = gen_rtx_SET (stack_pointer_rtx,
- plus_constant (Pmode, stack_pointer_rtx,
-- -xtensa_callee_save_size));
-+ -callee_save_size));
- add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
-- offset = xtensa_callee_save_size - UNITS_PER_WORD;
-+ offset = callee_save_size - UNITS_PER_WORD;
- }
- else
- {
-@@ -2759,13 +2767,13 @@ xtensa_expand_prologue (void)
- {
- rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
- emit_move_insn (tmp_reg, GEN_INT (total_size -
-- xtensa_callee_save_size));
-+ callee_save_size));
- insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
- stack_pointer_rtx, tmp_reg));
- RTX_FRAME_RELATED_P (insn) = 1;
- note_rtx = gen_rtx_SET (stack_pointer_rtx,
- plus_constant (Pmode, stack_pointer_rtx,
-- xtensa_callee_save_size -
-+ callee_save_size -
- total_size));
- add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
- }
-@@ -2833,21 +2841,21 @@ xtensa_expand_epilogue (void)
- int regno;
- HOST_WIDE_INT offset;
-
-- if (xtensa_current_frame_size > (frame_pointer_needed ? 127 : 1024))
-+ if (cfun->machine->current_frame_size > (frame_pointer_needed ? 127 : 1024))
- {
- rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
-- emit_move_insn (tmp_reg, GEN_INT (xtensa_current_frame_size -
-- xtensa_callee_save_size));
-+ emit_move_insn (tmp_reg, GEN_INT (cfun->machine->current_frame_size -
-+ cfun->machine->callee_save_size));
- emit_insn (gen_addsi3 (stack_pointer_rtx, frame_pointer_needed ?
- hard_frame_pointer_rtx : stack_pointer_rtx,
- tmp_reg));
-- offset = xtensa_callee_save_size - UNITS_PER_WORD;
-+ offset = cfun->machine->callee_save_size - UNITS_PER_WORD;
- }
- else
- {
- if (frame_pointer_needed)
- emit_move_insn (stack_pointer_rtx, hard_frame_pointer_rtx);
-- offset = xtensa_current_frame_size - UNITS_PER_WORD;
-+ offset = cfun->machine->current_frame_size - UNITS_PER_WORD;
- }
-
- /* Prevent reordering of saved a0 update and loading it back from
-@@ -2867,16 +2875,16 @@ xtensa_expand_epilogue (void)
- }
- }
-
-- if (xtensa_current_frame_size > 0)
-+ if (cfun->machine->current_frame_size > 0)
- {
- if (frame_pointer_needed || /* always reachable with addi */
-- xtensa_current_frame_size > 1024 ||
-- xtensa_current_frame_size <= 127)
-+ cfun->machine->current_frame_size > 1024 ||
-+ cfun->machine->current_frame_size <= 127)
- {
-- if (xtensa_current_frame_size <= 127)
-- offset = xtensa_current_frame_size;
-+ if (cfun->machine->current_frame_size <= 127)
-+ offset = cfun->machine->current_frame_size;
- else
-- offset = xtensa_callee_save_size;
-+ offset = cfun->machine->callee_save_size;
-
- emit_insn (gen_addsi3 (stack_pointer_rtx,
- stack_pointer_rtx,
-@@ -2885,7 +2893,8 @@ xtensa_expand_epilogue (void)
- else
- {
- rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
-- emit_move_insn (tmp_reg, GEN_INT (xtensa_current_frame_size));
-+ emit_move_insn (tmp_reg,
-+ GEN_INT (cfun->machine->current_frame_size));
- emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
- tmp_reg));
- }
-@@ -2896,11 +2905,22 @@ xtensa_expand_epilogue (void)
- stack_pointer_rtx,
- EH_RETURN_STACKADJ_RTX));
- }
-- xtensa_current_frame_size = 0;
-- xtensa_callee_save_size = 0;
-+ cfun->machine->epilogue_done = true;
- emit_jump_insn (gen_return ());
- }
-
-+bool
-+xtensa_use_return_instruction_p (void)
-+{
-+ if (!reload_completed)
-+ return false;
-+ if (TARGET_WINDOWED_ABI)
-+ return true;
-+ if (compute_frame_size (get_frame_size ()) == 0)
-+ return true;
-+ return cfun->machine->epilogue_done;
-+}
-+
- void
- xtensa_set_return_address (rtx address, rtx scratch)
- {
-diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
-index 82e9900..58eb1b2 100644
---- a/gcc/config/xtensa/xtensa.h
-+++ b/gcc/config/xtensa/xtensa.h
-@@ -23,8 +23,6 @@ along with GCC; see the file COPYING3. If not see
-
- /* External variables defined in xtensa.c. */
-
--extern unsigned xtensa_current_frame_size;
--
- /* Macros used in the machine description to select various Xtensa
- configuration options. */
- #ifndef XCHAL_HAVE_MUL32_HIGH
-@@ -477,14 +475,14 @@ enum reg_class
- /* Specify the initial difference between the specified pair of registers. */
- #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
- do { \
-- compute_frame_size (get_frame_size ()); \
-+ long frame_size = compute_frame_size (get_frame_size ()); \
- switch (FROM) \
- { \
- case FRAME_POINTER_REGNUM: \
- (OFFSET) = 0; \
- break; \
- case ARG_POINTER_REGNUM: \
-- (OFFSET) = xtensa_current_frame_size; \
-+ (OFFSET) = frame_size; \
- break; \
- default: \
- gcc_unreachable (); \
-diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
-index db54a12..fcdb6c8 100644
---- a/gcc/config/xtensa/xtensa.md
-+++ b/gcc/config/xtensa/xtensa.md
-@@ -1663,7 +1663,7 @@
- (define_insn "return"
- [(return)
- (use (reg:SI A0_REG))]
-- "(TARGET_WINDOWED_ABI || !xtensa_current_frame_size) && reload_completed"
-+ "xtensa_use_return_instruction_p ()"
- {
- return TARGET_WINDOWED_ABI ?
- (TARGET_DENSITY ? "retw.n" : "retw") :
---
-2.1.4
-
diff --git a/patches/gcc/6.3.0/872-xtensa-Fix-PR-target-78603.patch b/patches/gcc/6.3.0/872-xtensa-Fix-PR-target-78603.patch
deleted file mode 100644
index 669097c..0000000
--- a/patches/gcc/6.3.0/872-xtensa-Fix-PR-target-78603.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a568f3a84ff41ca272301a5fcf31071143e97e0f Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Tue, 29 Nov 2016 13:09:17 -0800
-Subject: [PATCH] xtensa: Fix PR target/78603
-
-2016-11-29 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (hwloop_optimize): Don't emit zero
- overhead loop start between a call and its CALL_ARG_LOCATION
- note.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index e49f784..70f698a 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -4158,7 +4158,10 @@ hwloop_optimize (hwloop_info loop)
- entry_after = BB_END (entry_bb);
- while (DEBUG_INSN_P (entry_after)
- || (NOTE_P (entry_after)
-- && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK))
-+ && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK
-+ /* Make sure we don't split a call and its corresponding
-+ CALL_ARG_LOCATION note. */
-+ && NOTE_KIND (entry_after) != NOTE_INSN_CALL_ARG_LOCATION))
- entry_after = PREV_INSN (entry_after);
-
- emit_insn_after (seq, entry_after);
---
-2.1.4
-
diff --git a/patches/gcc/6.3.0/873-gcc-xtensa-fix-fprintf-format-specifiers.patch b/patches/gcc/6.3.0/873-gcc-xtensa-fix-fprintf-format-specifiers.patch
deleted file mode 100644
index a5b0624..0000000
--- a/patches/gcc/6.3.0/873-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From a3d07c8a2a9564b57ebcae8463c1541a37c97c34 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 70f698a..2bdf5cc 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -1776,7 +1776,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
-@@ -2347,14 +2348,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;
-@@ -2368,7 +2369,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;
-@@ -2433,7 +2434,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/patches/gdb/7.10.1/100-musl_fix.patch b/patches/gdb/7.10.1/100-musl_fix.patch
deleted file mode 100644
index c0c1e0a..0000000
--- a/patches/gdb/7.10.1/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/patches/gdb/7.10.1/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch b/patches/gdb/7.10.1/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch
deleted file mode 100644
index 1182a45..0000000
--- a/patches/gdb/7.10.1/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/patches/gdb/7.10.1/111-xtensa-make-sure-ar_base-is-initialized.patch b/patches/gdb/7.10.1/111-xtensa-make-sure-ar_base-is-initialized.patch
deleted file mode 100644
index 982bd7f..0000000
--- a/patches/gdb/7.10.1/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/patches/gdb/7.10.1/112-WIP-end-of-prologue-detection-hack.patch b/patches/gdb/7.10.1/112-WIP-end-of-prologue-detection-hack.patch
deleted file mode 100644
index 506a57c..0000000
--- a/patches/gdb/7.10.1/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/patches/gdb/7.10/10-setns-handling.patch b/patches/gdb/7.10/10-setns-handling.patch
deleted file mode 100644
index e2647ad..0000000
--- a/patches/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/patches/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.12.1/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
deleted file mode 100644
index 6fd663a..0000000
--- a/patches/glibc/2.12.1/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/patches/glibc/2.12.1/102-fix-signed-shift-overlow.patch b/patches/glibc/2.12.1/102-fix-signed-shift-overlow.patch
deleted file mode 100644
index ef49f83..0000000
--- a/patches/glibc/2.12.1/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/patches/glibc/2.12.1/104-unused-variables.patch b/patches/glibc/2.12.1/104-unused-variables.patch
deleted file mode 100644
index e063675..0000000
--- a/patches/glibc/2.12.1/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/patches/glibc/2.12.1/105-misleading-indentation.patch b/patches/glibc/2.12.1/105-misleading-indentation.patch
deleted file mode 100644
index 1dd8d85..0000000
--- a/patches/glibc/2.12.1/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/patches/glibc/2.12.1/106-dl-open-array-bounds.patch b/patches/glibc/2.12.1/106-dl-open-array-bounds.patch
deleted file mode 100644
index bdb5c19..0000000
--- a/patches/glibc/2.12.1/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/patches/glibc/2.12.1/300-macos-cross-rpcgen.patch b/patches/glibc/2.12.1/300-macos-cross-rpcgen.patch
deleted file mode 100644
index e654644..0000000
--- a/patches/glibc/2.12.1/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/patches/glibc/2.12.1/920-fix-rpc_parse-format.patch b/patches/glibc/2.12.1/920-fix-rpc_parse-format.patch
deleted file mode 100644
index 37e58da..0000000
--- a/patches/glibc/2.12.1/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/patches/glibc/2.12.1/940-nis-bogus-conditional.patch b/patches/glibc/2.12.1/940-nis-bogus-conditional.patch
deleted file mode 100644
index 09b38cf..0000000
--- a/patches/glibc/2.12.1/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/patches/glibc/2.13/950-initfini-ppc64.patch b/patches/glibc/2.13/950-initfini-ppc64.patch
deleted file mode 100644
index 87f8d23..0000000
--- a/patches/glibc/2.13/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/patches/glibc/2.14.1/103-dl-openat64-variadic.patch b/patches/glibc/2.14.1/103-dl-openat64-variadic.patch
deleted file mode 100644
index fe94b96..0000000
--- a/patches/glibc/2.14.1/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/patches/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch b/patches/glibc/2.14.1/140-Fix-combreloc-test-BSD-grep.patch
deleted file mode 100644
index d720d39..0000000
--- a/patches/glibc/2.14.1/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/patches/glibc/2.14.1/900-cpuid-include.patch b/patches/glibc/2.14.1/900-cpuid-include.patch
deleted file mode 100644
index 0b8db71..0000000
--- a/patches/glibc/2.14.1/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/patches/glibc/2.14/999-new-tools.patch b/patches/glibc/2.14/999-new-tools.patch
deleted file mode 100644
index 7d115fd..0000000
--- a/patches/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/patches/glibc/ports-2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch
deleted file mode 100644
index 1a632fe..0000000
--- a/patches/glibc/ports-2.12.1/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/patches/glibc/ports-2.12.1/330-m68k-sys-user.patch b/patches/glibc/ports-2.12.1/330-m68k-sys-user.patch
deleted file mode 100644
index b441691..0000000
--- a/patches/glibc/ports-2.12.1/330-m68k-sys-user.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-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
-@@ -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 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/patches/glibc/ports-2.12.1/440-alpha-cache-shape.patch b/patches/glibc/ports-2.12.1/440-alpha-cache-shape.patch
deleted file mode 100644
index ea85e99..0000000
--- a/patches/glibc/ports-2.12.1/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.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
-@@ -1,2 +1,1 @@
--#include "dl-auxv.h"
- #include <elf/dl-support.c>
diff --git a/patches/glibc/ports-2.12.1/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.12.1/460-alpha-fix-gcc-4.1-warnings.patch
deleted file mode 100644
index 6438267..0000000
--- a/patches/glibc/ports-2.12.1/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.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
-@@ -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.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/patches/glibc/ports-2.12.1/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.12.1/530-alpha-fix-rtld-fPIC.patch
deleted file mode 100644
index 621a6f3..0000000
--- a/patches/glibc/ports-2.12.1/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.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
-@@ -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.12.1.orig/ports/sysdeps/alpha/Makefile glibc-2.12.1/ports/sysdeps/alpha/Makefile
diff --git a/patches/glibc/ports-2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/patches/glibc/ports-2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
deleted file mode 100644
index fc42a92..0000000
--- a/patches/glibc/ports-2.12.1/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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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/patches/glibc/ports-2.12.1/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.12.1/580-nptl-lowlevellock.patch
deleted file mode 100644
index c243a76..0000000
--- a/patches/glibc/ports-2.12.1/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.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
-@@ -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.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/patches/glibc/ports-2.12.1/610-fpu-cw-mips.patch b/patches/glibc/ports-2.12.1/610-fpu-cw-mips.patch
deleted file mode 100644
index 7d990de..0000000
--- a/patches/glibc/ports-2.12.1/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.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
-@@ -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.12.1.orig/ports/sysdeps/mips/fpu_control.h glibc-2.12.1/ports/sysdeps/mips/fpu_control.h
diff --git a/patches/glibc/ports-2.12.1/650-syslog.patch b/patches/glibc/ports-2.12.1/650-syslog.patch
deleted file mode 100644
index c20cafc..0000000
--- a/patches/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/patches/glibc/ports-2.12.1/660-debug-readlink_chk-readklinkat_chk.patch b/patches/glibc/ports-2.12.1/660-debug-readlink_chk-readklinkat_chk.patch
deleted file mode 100644
index a5a7052..0000000
--- a/patches/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/patches/glibc/ports-2.12.1/670-support-hard-float-eabi.patch b/patches/glibc/ports-2.12.1/670-support-hard-float-eabi.patch
deleted file mode 100644
index 3f2bc0f..0000000
--- a/patches/glibc/ports-2.12.1/670-support-hard-float-eabi.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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
-@@ -2,7 +2,7 @@
- arm*)
- base_machine=arm
- case $config_os in
-- linux-gnueabi)
-+ linux-gnueabi*)
- 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
-@@ -1,4 +1,4 @@
--arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4
-+arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4
-
--arm.*-.*-linux-gnueabi ld=ld-linux.so.3
-+arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3
- arm.*-.*-linux.* ld=ld-linux.so.2
diff --git a/patches/glibc/ports-2.13/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.13/090-Fix-ARM-build-with-GCC-trunk.patch
deleted file mode 100644
index 1a632fe..0000000
--- a/patches/glibc/ports-2.13/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/patches/glibc/ports-2.13/100-respect-env-CPPFLAGS.patch b/patches/glibc/ports-2.13/100-respect-env-CPPFLAGS.patch
deleted file mode 100644
index 3798cb2..0000000
--- a/patches/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/patches/glibc/ports-2.13/120-i386-x86_64-revert-clone-cfi.patch b/patches/glibc/ports-2.13/120-i386-x86_64-revert-clone-cfi.patch
deleted file mode 100644
index c7f6182..0000000
--- a/patches/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/patches/glibc/ports-2.13/140-disable-ldconfig.patch b/patches/glibc/ports-2.13/140-disable-ldconfig.patch
deleted file mode 100644
index 378e1df..0000000
--- a/patches/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/patches/glibc/ports-2.13/150-queue-header-updates.patch b/patches/glibc/ports-2.13/150-queue-header-updates.patch
deleted file mode 100644
index 7cbe70e..0000000
--- a/patches/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/patches/glibc/ports-2.13/160-manual-no-perl.patch b/patches/glibc/ports-2.13/160-manual-no-perl.patch
deleted file mode 100644
index 5e2b807..0000000
--- a/patches/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/patches/glibc/ports-2.13/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.13/170-localedef-fix-trampoline.patch
deleted file mode 100644
index 3cc6559..0000000
--- a/patches/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/patches/glibc/ports-2.13/180-resolv-dynamic.patch b/patches/glibc/ports-2.13/180-resolv-dynamic.patch
deleted file mode 100644
index e916bce..0000000
--- a/patches/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/patches/glibc/ports-2.13/190-localedef-mmap.patch b/patches/glibc/ports-2.13/190-localedef-mmap.patch
deleted file mode 100644
index f3914cd..0000000
--- a/patches/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/patches/glibc/ports-2.13/200-fadvise64_64.patch b/patches/glibc/ports-2.13/200-fadvise64_64.patch
deleted file mode 100644
index 71bca38..0000000
--- a/patches/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/patches/glibc/ports-2.13/220-section-comments.patch b/patches/glibc/ports-2.13/220-section-comments.patch
deleted file mode 100644
index d717829..0000000
--- a/patches/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/patches/glibc/ports-2.13/230-no-inline-gmon.patch b/patches/glibc/ports-2.13/230-no-inline-gmon.patch
deleted file mode 100644
index fa33c2b..0000000
--- a/patches/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/patches/glibc/ports-2.13/240-check_native-headers.patch b/patches/glibc/ports-2.13/240-check_native-headers.patch
deleted file mode 100644
index c936f71..0000000
--- a/patches/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/patches/glibc/ports-2.13/260-assume-pipe2.patch b/patches/glibc/ports-2.13/260-assume-pipe2.patch
deleted file mode 100644
index 42e8f4e..0000000
--- a/patches/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/patches/glibc/ports-2.13/270-china.patch b/patches/glibc/ports-2.13/270-china.patch
deleted file mode 100644
index 41d7759..0000000
--- a/patches/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/patches/glibc/ports-2.13/280-new-valencian-locale.patch b/patches/glibc/ports-2.13/280-new-valencian-locale.patch
deleted file mode 100644
index 4cdd108..0000000
--- a/patches/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/patches/glibc/ports-2.13/300-nscd-one-fork.patch b/patches/glibc/ports-2.13/300-nscd-one-fork.patch
deleted file mode 100644
index adc9b3f..0000000
--- a/patches/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/patches/glibc/ports-2.13/310-hppa-nptl-carlos.patch b/patches/glibc/ports-2.13/310-hppa-nptl-carlos.patch
deleted file mode 100644
index 4c028b2..0000000
--- a/patches/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/patches/glibc/ports-2.13/330-m68k-sys-user.patch b/patches/glibc/ports-2.13/330-m68k-sys-user.patch
deleted file mode 100644
index 191e0c6..0000000
--- a/patches/glibc/ports-2.13/330-m68k-sys-user.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-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
-@@ -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.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/patches/glibc/ports-2.13/340-dl_execstack-PaX-support.patch b/patches/glibc/ports-2.13/340-dl_execstack-PaX-support.patch
deleted file mode 100644
index 2402af0..0000000
--- a/patches/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/patches/glibc/ports-2.13/350-pre20040117-pt_pax.patch b/patches/glibc/ports-2.13/350-pre20040117-pt_pax.patch
deleted file mode 100644
index f8f6b83..0000000
--- a/patches/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/patches/glibc/ports-2.13/360-tests-sandbox-libdl-paths.patch b/patches/glibc/ports-2.13/360-tests-sandbox-libdl-paths.patch
deleted file mode 100644
index 9f78c52..0000000
--- a/patches/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/patches/glibc/ports-2.13/380-dont-build-timezone.patch b/patches/glibc/ports-2.13/380-dont-build-timezone.patch
deleted file mode 100644
index 11c358e..0000000
--- a/patches/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/patches/glibc/ports-2.13/400-alpha-xstat.patch b/patches/glibc/ports-2.13/400-alpha-xstat.patch
deleted file mode 100644
index 6e4ab8f..0000000
--- a/patches/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/patches/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch b/patches/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch
deleted file mode 100644
index fd55537..0000000
--- a/patches/glibc/ports-2.13/410-alpha-SETPIPE-GETPIPE.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-2011-02-28 Aurelien Jarno <aurelien@aurel32.net>
-
- * 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
-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
-@@ -97,6 +97,8 @@
- # define F_SETLEASE 1024 /* Set a lease. */
- # define F_GETLEASE 1025 /* Enquire what lease is active. */
- # define F_NOTIFY 1026 /* Request notfications on a directory. */
-+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-+# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
- #endif
- #ifdef __USE_XOPEN2K8
- # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
-
diff --git a/patches/glibc/ports-2.13/420-alpha-statfs.patch b/patches/glibc/ports-2.13/420-alpha-statfs.patch
deleted file mode 100644
index 65c925a..0000000
--- a/patches/glibc/ports-2.13/420-alpha-statfs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-2011-02-28 Aurelien Jarno <aurelien@aurel32.net>
-
- * 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
-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
-@@ -42,7 +42,8 @@ struct statfs
- __fsid_t f_fsid;
- int f_namelen;
- int f_frsize;
-- int f_spare[5];
-+ int f_flags;
-+ int f_spare[4];
- };
-
- #ifdef __USE_LARGEFILE64
-@@ -58,7 +59,8 @@ struct statfs64
- __fsid_t f_fsid;
- int f_namelen;
- int f_frsize;
-- int f_spare[5];
-+ int f_flags;
-+ int f_spare[4];
- };
- #endif
-
diff --git a/patches/glibc/ports-2.13/430-alpha-creat.patch b/patches/glibc/ports-2.13/430-alpha-creat.patch
deleted file mode 100644
index da6ddda..0000000
--- a/patches/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/patches/glibc/ports-2.13/440-alpha-cache-shape.patch b/patches/glibc/ports-2.13/440-alpha-cache-shape.patch
deleted file mode 100644
index 62ade7b..0000000
--- a/patches/glibc/ports-2.13/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.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
-@@ -1,2 +1,1 @@
--#include "dl-auxv.h"
- #include <elf/dl-support.c>
diff --git a/patches/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch b/patches/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch
deleted file mode 100644
index ac3ea9a..0000000
--- a/patches/glibc/ports-2.13/450-alpha-DEFAULT_STACK_PERMS.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-2011-02-28 Aurelien Jarno <aurelien@aurel32.net>
-
- * 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
-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
-@@ -22,7 +22,13 @@
- #ifndef _STACKINFO_H
- #define _STACKINFO_H 1
-
-+#include <elf.h>
-+
- /* On Alpha the stack grows down. */
- #define _STACK_GROWS_DOWN 1
-
-+/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is
-+ * present, but it is presumed absent. */
-+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
-+
- #endif /* stackinfo.h */
-
diff --git a/patches/glibc/ports-2.13/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.13/460-alpha-fix-gcc-4.1-warnings.patch
deleted file mode 100644
index 313e0e0..0000000
--- a/patches/glibc/ports-2.13/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.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
-@@ -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.13.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.13/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
diff --git a/patches/glibc/ports-2.13/470-alpha-feupdateenv.patch b/patches/glibc/ports-2.13/470-alpha-feupdateenv.patch
deleted file mode 100644
index 45a7051..0000000
--- a/patches/glibc/ports-2.13/470-alpha-feupdateenv.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-2011-03-01 Aurelien Jarno <aurelien@aurel32.net>
-
- * sysdeps/alpha/fpu/feupdateenv.c (feupdateenv): Add
- 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
-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
-@@ -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
-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
-@@ -30,3 +30,4 @@ fetestexcept (int excepts)
-
- return tmp & excepts & SWCR_STATUS_MASK;
- }
-+libm_hidden_def (fetestexcept)
-
diff --git a/patches/glibc/ports-2.13/490-alpha_alpha-add-fdatasync-support.patch b/patches/glibc/ports-2.13/490-alpha_alpha-add-fdatasync-support.patch
deleted file mode 100644
index 372f34c..0000000
--- a/patches/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/patches/glibc/ports-2.13/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.13/530-alpha-fix-rtld-fPIC.patch
deleted file mode 100644
index b2ae9b5..0000000
--- a/patches/glibc/ports-2.13/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.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
-@@ -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.13.orig/ports/sysdeps/alpha/Makefile glibc-2.13/ports/sysdeps/alpha/Makefile
diff --git a/patches/glibc/ports-2.13/560-ppc-atomic.patch b/patches/glibc/ports-2.13/560-ppc-atomic.patch
deleted file mode 100644
index ee1cb90..0000000
--- a/patches/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/patches/glibc/ports-2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/patches/glibc/ports-2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
deleted file mode 100644
index 4f4dbec..0000000
--- a/patches/glibc/ports-2.13/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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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/patches/glibc/ports-2.13/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.13/580-nptl-lowlevellock.patch
deleted file mode 100644
index 08518e9..0000000
--- a/patches/glibc/ports-2.13/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.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
-@@ -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.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/patches/glibc/ports-2.13/610-fpu-cw-mips.patch b/patches/glibc/ports-2.13/610-fpu-cw-mips.patch
deleted file mode 100644
index cd2b4d9..0000000
--- a/patches/glibc/ports-2.13/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.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
-@@ -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.13.orig/ports/sysdeps/mips/fpu_control.h glibc-2.13/ports/sysdeps/mips/fpu_control.h
diff --git a/patches/glibc/ports-2.13/630-mips_shn_undef-hack.patch b/patches/glibc/ports-2.13/630-mips_shn_undef-hack.patch
deleted file mode 100644
index 791d76c..0000000
--- a/patches/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/patches/glibc/ports-2.13/640-alpha-atfcts.patch b/patches/glibc/ports-2.13/640-alpha-atfcts.patch
deleted file mode 100644
index 7a8a94a..0000000
--- a/patches/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/patches/glibc/ports-2.13/670-support-hard-float-eabi.patch b/patches/glibc/ports-2.13/670-support-hard-float-eabi.patch
deleted file mode 100644
index 589f11e..0000000
--- a/patches/glibc/ports-2.13/670-support-hard-float-eabi.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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
-@@ -2,7 +2,7 @@
- arm*)
- base_machine=arm
- case $config_os in
-- linux-gnueabi)
-+ linux-gnueabi*)
- 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
-@@ -1,4 +1,4 @@
--arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4
-+arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4
-
--arm.*-.*-linux-gnueabi ld=ld-linux.so.3
-+arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3
- arm.*-.*-linux.* ld=ld-linux.so.2
diff --git a/patches/glibc/ports-2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch
deleted file mode 100644
index 1a632fe..0000000
--- a/patches/glibc/ports-2.14.1/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/patches/glibc/ports-2.14.1/330-m68k-sys-user.patch b/patches/glibc/ports-2.14.1/330-m68k-sys-user.patch
deleted file mode 100644
index 8fbe2e5..0000000
--- a/patches/glibc/ports-2.14.1/330-m68k-sys-user.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-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
-@@ -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.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/patches/glibc/ports-2.14.1/440-alpha-cache-shape.patch b/patches/glibc/ports-2.14.1/440-alpha-cache-shape.patch
deleted file mode 100644
index 8ca0bd6..0000000
--- a/patches/glibc/ports-2.14.1/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.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
-@@ -1,2 +1,1 @@
--#include "dl-auxv.h"
- #include <elf/dl-support.c>
diff --git a/patches/glibc/ports-2.14.1/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.14.1/460-alpha-fix-gcc-4.1-warnings.patch
deleted file mode 100644
index c3e59f4..0000000
--- a/patches/glibc/ports-2.14.1/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.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
-@@ -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.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/patches/glibc/ports-2.14.1/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.14.1/530-alpha-fix-rtld-fPIC.patch
deleted file mode 100644
index 2691a99..0000000
--- a/patches/glibc/ports-2.14.1/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.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
-@@ -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.1.orig/ports/sysdeps/alpha/Makefile glibc-2.14.1/ports/sysdeps/alpha/Makefile
diff --git a/patches/glibc/ports-2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/patches/glibc/ports-2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
deleted file mode 100644
index 5e45682..0000000
--- a/patches/glibc/ports-2.14.1/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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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/patches/glibc/ports-2.14.1/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.14.1/580-nptl-lowlevellock.patch
deleted file mode 100644
index 6bf5250..0000000
--- a/patches/glibc/ports-2.14.1/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.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
-@@ -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.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/patches/glibc/ports-2.14.1/610-fpu-cw-mips.patch b/patches/glibc/ports-2.14.1/610-fpu-cw-mips.patch
deleted file mode 100644
index e53ac78..0000000
--- a/patches/glibc/ports-2.14.1/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.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
-@@ -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.1.orig/ports/sysdeps/mips/fpu_control.h glibc-2.14.1/ports/sysdeps/mips/fpu_control.h
diff --git a/patches/glibc/ports-2.14/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.14/090-Fix-ARM-build-with-GCC-trunk.patch
deleted file mode 100644
index 1a632fe..0000000
--- a/patches/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/patches/glibc/ports-2.14/330-m68k-sys-user.patch b/patches/glibc/ports-2.14/330-m68k-sys-user.patch
deleted file mode 100644
index 28bcb11..0000000
--- a/patches/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/patches/glibc/ports-2.14/440-alpha-cache-shape.patch b/patches/glibc/ports-2.14/440-alpha-cache-shape.patch
deleted file mode 100644
index def0181..0000000
--- a/patches/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/patches/glibc/ports-2.14/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.14/460-alpha-fix-gcc-4.1-warnings.patch
deleted file mode 100644
index 1569ce4..0000000
--- a/patches/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/patches/glibc/ports-2.14/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.14/530-alpha-fix-rtld-fPIC.patch
deleted file mode 100644
index 3560e2a..0000000
--- a/patches/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/patches/glibc/ports-2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/patches/glibc/ports-2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
deleted file mode 100644
index b297ff0..0000000
--- a/patches/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/patches/glibc/ports-2.14/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.14/580-nptl-lowlevellock.patch
deleted file mode 100644
index a2a141c..0000000
--- a/patches/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/patches/glibc/ports-2.14/610-fpu-cw-mips.patch b/patches/glibc/ports-2.14/610-fpu-cw-mips.patch
deleted file mode 100644
index c624565..0000000
--- a/patches/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/patches/glibc/ports-2.15/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.15/090-Fix-ARM-build-with-GCC-trunk.patch
deleted file mode 100644
index 1a632fe..0000000
--- a/patches/glibc/ports-2.15/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/patches/glibc/ports-2.15/091-libmemusage-link-failure.patch b/patches/glibc/ports-2.15/091-libmemusage-link-failure.patch
deleted file mode 100644
index 9f9887c..0000000
--- a/patches/glibc/ports-2.15/091-libmemusage-link-failure.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 2d80bda39073a35af4b904d27fa1511cd309b26f
-Author: Nathan Sidwell <nathan@codesourcery.com>
-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
-index 5651161..1a88430 100644
---- a/ports/sysdeps/arm/Makefile
-+++ b/ports/sysdeps/arm/Makefile
-@@ -7,3 +7,8 @@ endif
- ifeq ($(subdir),csu)
- gen-as-const-headers += tlsdesc.sym
- endif
-+
-+# to pull in __aeabi_read_tp, needed for tls
-+ifeq ($(subdir),malloc)
-+$(objpfx)libmemusage.so: $(common-objpfx)libc_nonshared.a
-+endif
diff --git a/patches/glibc/ports-2.15/330-m68k-sys-user.patch b/patches/glibc/ports-2.15/330-m68k-sys-user.patch
deleted file mode 100644
index faee18f..0000000
--- a/patches/glibc/ports-2.15/330-m68k-sys-user.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-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
-@@ -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.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/patches/glibc/ports-2.15/440-alpha-cache-shape.patch b/patches/glibc/ports-2.15/440-alpha-cache-shape.patch
deleted file mode 100644
index b3158da..0000000
--- a/patches/glibc/ports-2.15/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.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
-@@ -1,2 +1,1 @@
--#include "dl-auxv.h"
- #include <elf/dl-support.c>
diff --git a/patches/glibc/ports-2.15/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.15/460-alpha-fix-gcc-4.1-warnings.patch
deleted file mode 100644
index a54d823..0000000
--- a/patches/glibc/ports-2.15/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.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
-@@ -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.15.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.15/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
diff --git a/patches/glibc/ports-2.15/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.15/530-alpha-fix-rtld-fPIC.patch
deleted file mode 100644
index 800a789..0000000
--- a/patches/glibc/ports-2.15/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.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
-@@ -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.15.orig/ports/sysdeps/alpha/Makefile glibc-2.15/ports/sysdeps/alpha/Makefile
diff --git a/patches/glibc/ports-2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/patches/glibc/ports-2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
deleted file mode 100644
index 8a05574..0000000
--- a/patches/glibc/ports-2.15/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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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
-@@ -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.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/patches/glibc/ports-2.15/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.15/580-nptl-lowlevellock.patch
deleted file mode 100644
index a39e463..0000000
--- a/patches/glibc/ports-2.15/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.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
-@@ -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.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/patches/glibc/ports-2.15/610-fpu-cw-mips.patch b/patches/glibc/ports-2.15/610-fpu-cw-mips.patch
deleted file mode 100644
index 8692a1f..0000000
--- a/patches/glibc/ports-2.15/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.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
-@@ -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.15.orig/ports/sysdeps/mips/fpu_control.h glibc-2.15/ports/sysdeps/mips/fpu_control.h
diff --git a/patches/glibc/ports-2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/ports-2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch
deleted file mode 100644
index 59f95aa..0000000
--- a/patches/glibc/ports-2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch
+++ /dev/null
@@ -1,54 +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(-)
-
-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
-@@ -22,7 +22,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)
-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
-@@ -20,7 +20,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 *);
-
---
-1.9.4
-
diff --git a/patches/glibc/ports-2.16.0/330-m68k-sys-user.patch b/patches/glibc/ports-2.16.0/330-m68k-sys-user.patch
deleted file mode 100644
index f113996..0000000
--- a/patches/glibc/ports-2.16.0/330-m68k-sys-user.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-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
-@@ -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.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/patches/glibc/ports-2.16.0/440-alpha-cache-shape.patch b/patches/glibc/ports-2.16.0/440-alpha-cache-shape.patch
deleted file mode 100644
index 5b1a298..0000000
--- a/patches/glibc/ports-2.16.0/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.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
-@@ -1,2 +1,1 @@
--#include "dl-auxv.h"
- #include <elf/dl-support.c>
diff --git a/patches/glibc/ports-2.16.0/460-alpha-fix-gcc-4.1-warnings.patch b/patches/glibc/ports-2.16.0/460-alpha-fix-gcc-4.1-warnings.patch
deleted file mode 100644
index f2ff04f..0000000
--- a/patches/glibc/ports-2.16.0/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.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
-@@ -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.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/patches/glibc/ports-2.16.0/530-alpha-fix-rtld-fPIC.patch b/patches/glibc/ports-2.16.0/530-alpha-fix-rtld-fPIC.patch
deleted file mode 100644
index 42faaa5..0000000
--- a/patches/glibc/ports-2.16.0/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.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
-@@ -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.16.0.orig/ports/sysdeps/alpha/Makefile glibc-2.16.0/ports/sysdeps/alpha/Makefile
diff --git a/patches/glibc/ports-2.16.0/580-nptl-lowlevellock.patch b/patches/glibc/ports-2.16.0/580-nptl-lowlevellock.patch
deleted file mode 100644
index 185331c..0000000
--- a/patches/glibc/ports-2.16.0/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.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
-@@ -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.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/patches/glibc/ports-2.16.0/610-fpu-cw-mips.patch b/patches/glibc/ports-2.16.0/610-fpu-cw-mips.patch
deleted file mode 100644
index 0c0daf3..0000000
--- a/patches/glibc/ports-2.16.0/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.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
-@@ -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.16.0.orig/ports/sysdeps/mips/fpu_control.h glibc-2.16.0/ports/sysdeps/mips/fpu_control.h
diff --git a/patches/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch b/patches/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch
deleted file mode 100644
index f60e88f..0000000
--- a/patches/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/patches/gmp/4.3.0/110-unbounded-alloc.patch b/patches/gmp/4.3.0/110-unbounded-alloc.patch
deleted file mode 100644
index 78e0588..0000000
--- a/patches/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/patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch b/patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch
deleted file mode 100644
index f60e88f..0000000
--- a/patches/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/patches/gmp/4.3.1/110-unbounded-alloc.patch b/patches/gmp/4.3.1/110-unbounded-alloc.patch
deleted file mode 100644
index 78e0588..0000000
--- a/patches/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/patches/gmp/5.0.1/100-fix-tests-ABI-long-long.patch b/patches/gmp/5.0.1/100-fix-tests-ABI-long-long.patch
deleted file mode 100644
index b6e303e..0000000
--- a/patches/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/patches/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch b/patches/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch
deleted file mode 100644
index 2e0a1af..0000000
--- a/patches/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/patches/gmp/5.0.1/120-fix-r0-clobbering-issue.patch b/patches/gmp/5.0.1/120-fix-r0-clobbering-issue.patch
deleted file mode 100644
index d12d6b2..0000000
--- a/patches/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/patches/gmp/5.0.2/110-get-mpn_sub_1-size-argument-right.patch b/patches/gmp/5.0.2/110-get-mpn_sub_1-size-argument-right.patch
deleted file mode 100644
index 2e0a1af..0000000
--- a/patches/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/patches/gmp/5.1.1/100-fix-bulldozer-piledriver.patch b/patches/gmp/5.1.1/100-fix-bulldozer-piledriver.patch
deleted file mode 100644
index f6faca1..0000000
--- a/patches/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/patches/gmp/5.1.1/110-mpz_powm_ui.patch b/patches/gmp/5.1.1/110-mpz_powm_ui.patch
deleted file mode 100644
index f0d240c..0000000
--- a/patches/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/patches/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch b/patches/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch
deleted file mode 100644
index 13a50ad..0000000
--- a/patches/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/patches/gmp/5.1.1/130-do-not-clobber-f16-f18.patch b/patches/gmp/5.1.1/130-do-not-clobber-f16-f18.patch
deleted file mode 100644
index 9f9f470..0000000
--- a/patches/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/patches/gmp/6.1.0/100-fix-broadwell-skylake.patch b/patches/gmp/6.1.0/100-fix-broadwell-skylake.patch
deleted file mode 100644
index 9afd339..0000000
--- a/patches/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/patches/libelf/0.8.12/100-fix-64-bit-detection.patch b/patches/libelf/0.8.12/100-fix-64-bit-detection.patch
deleted file mode 100644
index 7995443..0000000
--- a/patches/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/patches/ltrace/0.5.2/100-allow-cross-compile.patch b/patches/ltrace/0.5.2/100-allow-cross-compile.patch
deleted file mode 100644
index 10440ad..0000000
--- a/patches/ltrace/0.5.2/100-allow-cross-compile.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff -durN ltrace-0.5.2.orig/Makefile.in ltrace-0.5.2/Makefile.in
---- ltrace-0.5.2.orig/Makefile.in 2009-05-21 19:14:54.000000000 +0200
-+++ ltrace-0.5.2/Makefile.in 2009-06-27 15:30:34.000000000 +0200
-@@ -2,8 +2,14 @@
- # ltrace's Makefile.in
- #
-
--#OS := $(shell uname -s)
- OS := @HOST_OS@
-+ARCH := $(shell echo "@HOST_ARCH@" |sed -e s/i.86/i386/ \
-+ -e s/sun4u/sparc64/ \
-+ -e s/arm.*/arm/ \
-+ -e s/sa110/arm/ \
-+ -e s/ppc64/ppc/ \
-+ -e s/s390x/s390/)
-+export ARCH
-
- TOPDIR = $(shell pwd)
-
-diff -durN ltrace-0.5.2.orig/configure ltrace-0.5.2/configure
---- ltrace-0.5.2.orig/configure 2009-05-21 19:14:57.000000000 +0200
-+++ ltrace-0.5.2/configure 2009-06-27 15:30:34.000000000 +0200
-@@ -660,6 +660,7 @@
- host_cpu
- host_vendor
- host_os
-+HOST_ARCH
- HOST_OS
- CC
- CFLAGS
-@@ -1823,6 +1824,7 @@
- case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-+HOST_ARCH="$host_cpu"
- case "$host_os" in
- linux-gnu*) host_os=linux-gnu
- esac
-@@ -5406,6 +5408,7 @@
- host_cpu!$host_cpu$ac_delim
- host_vendor!$host_vendor$ac_delim
- host_os!$host_os$ac_delim
-+HOST_ARCH!$HOST_ARCH$ac_delim
- HOST_OS!$HOST_OS$ac_delim
- CC!$CC$ac_delim
- CFLAGS!$CFLAGS$ac_delim
-@@ -5426,7 +5429,7 @@
- LTLIBOBJS!$LTLIBOBJS$ac_delim
- _ACEOF
-
-- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
-+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then
- break
- elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-diff -durN ltrace-0.5.2.orig/configure.ac ltrace-0.5.2/configure.ac
---- ltrace-0.5.2.orig/configure.ac 2009-05-21 19:14:54.000000000 +0200
-+++ ltrace-0.5.2/configure.ac 2009-06-27 15:30:34.000000000 +0200
-@@ -11,6 +11,8 @@
- esac
- HOST_OS="$host_os"
- AC_SUBST(HOST_OS)
-+HOST_ARCH="$host_cpu"
-+AC_SUBST(HOST_ARCH)
-
- dnl Checks for programs.
- AC_PROG_CC
-diff -durN ltrace-0.5.2.orig/sysdeps/linux-gnu/Makefile ltrace-0.5.2/sysdeps/linux-gnu/Makefile
---- ltrace-0.5.2.orig/sysdeps/linux-gnu/Makefile 2009-05-21 19:14:54.000000000 +0200
-+++ ltrace-0.5.2/sysdeps/linux-gnu/Makefile 2009-06-27 15:30:34.000000000 +0200
-@@ -1,6 +1,3 @@
--ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/ppc64/ppc/ -e s/s390x/s390/)
--
- CPPFLAGS += -I$(TOPDIR)/sysdeps/linux-gnu/$(ARCH)
-
- OBJ = events.o trace.o proc.o breakpoint.o
diff --git a/patches/ltrace/0.5.2/110-alpha-support.patch b/patches/ltrace/0.5.2/110-alpha-support.patch
deleted file mode 100644
index f121ca1..0000000
--- a/patches/ltrace/0.5.2/110-alpha-support.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -durN ltrace-0.5.2.orig/Makefile.in ltrace-0.5.2/Makefile.in
---- ltrace-0.5.2.orig/Makefile.in 2009-06-27 15:34:04.000000000 +0200
-+++ ltrace-0.5.2/Makefile.in 2009-06-27 15:34:27.000000000 +0200
-@@ -5,6 +5,7 @@
- OS := @HOST_OS@
- ARCH := $(shell echo "@HOST_ARCH@" |sed -e s/i.86/i386/ \
- -e s/sun4u/sparc64/ \
-+ -e s/alpha.*/alpha/ \
- -e s/arm.*/arm/ \
- -e s/sa110/arm/ \
- -e s/ppc64/ppc/ \
diff --git a/patches/ltrace/0.5.2/120-debian-ltrace-0.5.2-2.patch b/patches/ltrace/0.5.2/120-debian-ltrace-0.5.2-2.patch
deleted file mode 100644
index 6d62315..0000000
--- a/patches/ltrace/0.5.2/120-debian-ltrace-0.5.2-2.patch
+++ /dev/null
@@ -1,240 +0,0 @@
---- ltrace-0.5.2.orig/TODO
-+++ ltrace-0.5.2/TODO
-@@ -37,3 +37,4 @@
- * debug: change "-d" option to be something like "-d elf,events", or "-d breakpoints"
- * Find out if a process is sharing memory with its parent?
- * When using -p, find out if that process is sharing memory with other procs
-+* After a clone(), syscalls may be seen as sysrets in s390 (see trace.c:syscall_p())
---- ltrace-0.5.2.orig/process_event.c
-+++ ltrace-0.5.2/process_event.c
-@@ -170,7 +170,7 @@
- enable_breakpoint(proc->pid, proc->breakpoint_being_enabled);
- proc->breakpoint_being_enabled = NULL;
- }
-- if (proc->parent->state == STATE_ATTACHED && options.follow) {
-+ if (options.follow) {
- proc->state = STATE_ATTACHED;
- } else {
- proc->state = STATE_IGNORED;
---- ltrace-0.5.2.orig/sysdeps/linux-gnu/ppc/trace.c
-+++ ltrace-0.5.2/sysdeps/linux-gnu/ppc/trace.c
-@@ -50,9 +50,9 @@
- *sysnum =
- (int)ptrace(PTRACE_PEEKUSER, proc->pid,
- sizeof(long) * PT_R0, 0);
-- if (proc->callstack_depth > 0
-- && proc->callstack[proc->callstack_depth -
-- 1].is_syscall) {
-+ if (proc->callstack_depth > 0 &&
-+ proc->callstack[proc->callstack_depth - 1].is_syscall &&
-+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
- return 2;
- }
- return 1;
---- ltrace-0.5.2.orig/sysdeps/linux-gnu/i386/trace.c
-+++ ltrace-0.5.2/sysdeps/linux-gnu/i386/trace.c
-@@ -32,7 +32,8 @@
- *sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, 4 * ORIG_EAX, 0);
-
- if (proc->callstack_depth > 0 &&
-- proc->callstack[proc->callstack_depth - 1].is_syscall) {
-+ proc->callstack[proc->callstack_depth - 1].is_syscall &&
-+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
- return 2;
- }
-
---- ltrace-0.5.2.orig/sysdeps/linux-gnu/ia64/trace.c
-+++ ltrace-0.5.2/sysdeps/linux-gnu/ia64/trace.c
-@@ -106,8 +106,8 @@
- if (insn == 0x1000000000 || insn == 0x1ffffffffff) {
- *sysnum = r15;
- if (proc->callstack_depth > 0 &&
-- proc->callstack[proc->callstack_depth -
-- 1].is_syscall) {
-+ proc->callstack[proc->callstack_depth - 1].is_syscall &&
-+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
- return 2;
- }
- return 1;
---- ltrace-0.5.2.orig/sysdeps/linux-gnu/m68k/trace.c
-+++ ltrace-0.5.2/sysdeps/linux-gnu/m68k/trace.c
-@@ -36,9 +36,8 @@
- if (*sysnum >= 0) {
- depth = proc->callstack_depth;
- if (depth > 0 &&
-- proc->callstack[depth - 1].is_syscall &&
-- proc->callstack[depth - 1].c_un.syscall ==
-- *sysnum) {
-+ proc->callstack[depth - 1].is_syscall &&
-+ proc->callstack[depth - 1].c_un.syscall == *sysnum) {
- return 2;
- } else {
- return 1;
---- ltrace-0.5.2.orig/sysdeps/linux-gnu/alpha/trace.c
-+++ ltrace-0.5.2/sysdeps/linux-gnu/alpha/trace.c
-@@ -36,8 +36,9 @@
- return 0;
- *sysnum =
- ptrace(PTRACE_PEEKUSER, proc->pid, 0 /* REG_R0 */ , 0);
-- if (proc->callstack_depth > 0
-- && proc->callstack[proc->callstack_depth - 1].is_syscall) {
-+ if (proc->callstack_depth > 0 &&
-+ proc->callstack[proc->callstack_depth - 1].is_syscall &&
-+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
- return 2;
- }
- if (*sysnum >= 0 && *sysnum < 500) {
---- ltrace-0.5.2.orig/sysdeps/linux-gnu/sparc/trace.c
-+++ ltrace-0.5.2/sysdeps/linux-gnu/sparc/trace.c
-@@ -33,9 +33,9 @@
- insn = ptrace(PTRACE_PEEKTEXT, proc->pid, ip, 0);
- if ((insn & 0xc1f8007f) == 0x81d00010) {
- *sysnum = ((proc_archdep *) proc->arch_ptr)->regs.r_g1;
-- if ((proc->callstack_depth > 0)
-- && proc->callstack[proc->callstack_depth -
-- 1].is_syscall) {
-+ if (proc->callstack_depth > 0 &&
-+ proc->callstack[proc->callstack_depth - 1].is_syscall &&
-+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
- return 2;
- } else if (*sysnum >= 0) {
- return 1;
---- ltrace-0.5.2.orig/sysdeps/linux-gnu/mipsel/trace.c
-+++ ltrace-0.5.2/sysdeps/linux-gnu/mipsel/trace.c
-@@ -60,33 +60,34 @@
- int
- syscall_p(Process *proc, int status, int *sysnum) {
- if (WIFSTOPPED(status)
-- && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) {
-- /* get the user's pc (plus 8) */
-- long pc = (long)get_instruction_pointer(proc);
-- /* fetch the SWI instruction */
-- int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 4, 0);
-- int num = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 8, 0);
--
--/*
-- On a mipsel, syscall looks like:
-- 24040fa1 li v0, 0x0fa1 # 4001 --> _exit syscall
-- 0000000c syscall
-- */
-- if(insn!=0x0000000c){
-- return 0;
-- }
--
-- *sysnum = (num & 0xFFFF) - 4000;
-- /* if it is a syscall, return 1 or 2 */
-- if (proc->callstack_depth > 0 &&
-- proc->callstack[proc->callstack_depth - 1].is_syscall) {
-- return 2;
-- }
--
-- if (*sysnum >= 0) {
-- return 1;
-- }
-- }
-+ && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) {
-+ /* get the user's pc (plus 8) */
-+ long pc = (long)get_instruction_pointer(proc);
-+ /* fetch the SWI instruction */
-+ int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 4, 0);
-+ int num = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 8, 0);
-+
-+ /*
-+ On a mipsel, syscall looks like:
-+ 24040fa1 li v0, 0x0fa1 # 4001 --> _exit syscall
-+ 0000000c syscall
-+ */
-+ if(insn!=0x0000000c){
-+ return 0;
-+ }
-+
-+ *sysnum = (num & 0xFFFF) - 4000;
-+ /* if it is a syscall, return 1 or 2 */
-+ if (proc->callstack_depth > 0 &&
-+ proc->callstack[proc->callstack_depth - 1].is_syscall &&
-+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
-+ return 2;
-+ }
-+
-+ if (*sysnum >= 0) {
-+ return 1;
-+ }
-+ }
- return 0;
- }
- /**
-@@ -119,34 +120,34 @@
- */
- long
- gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) {
-- long ret;
-- debug(2,"type %d arg %d",type,arg_num);
-- if (type == LT_TOF_FUNCTION || type == LT_TOF_SYSCALL){
-- if(arg_num <4){
-- ret=ptrace(PTRACE_PEEKUSER,proc->pid,off_a0+arg_num,0);
-- debug(2,"ret = %#lx",ret);
-- return ret;
-- } else {
-- // If we need this, I think we can look at [sp+16] for arg_num==4.
-- CP;
-- return 0;
-- }
-- }
-- if(arg_num>=0){
-- fprintf(stderr,"args on return?");
-- }
-- if(type == LT_TOF_FUNCTIONR) {
-- return ptrace(PTRACE_PEEKUSER,proc->pid,off_v0,0);
-- }
-- if (type == LT_TOF_SYSCALLR) {
-- unsigned a3=ptrace(PTRACE_PEEKUSER, proc->pid,off_a3,0);
-- unsigned v0=ptrace(PTRACE_PEEKUSER, proc->pid,off_v0,0);
-- if(!a3){
-- return v0;
-- }
-- return -1;
-- }
-- fprintf(stderr, "gimme_arg called with wrong arguments\n");
-+ long ret;
-+ debug(2,"type %d arg %d",type,arg_num);
-+ if (type == LT_TOF_FUNCTION || type == LT_TOF_SYSCALL){
-+ if(arg_num <4){
-+ ret=ptrace(PTRACE_PEEKUSER,proc->pid,off_a0+arg_num,0);
-+ debug(2,"ret = %#lx",ret);
-+ return ret;
-+ } else {
-+ // If we need this, I think we can look at [sp+16] for arg_num==4.
-+ CP;
-+ return 0;
-+ }
-+ }
-+ if(arg_num>=0){
-+ fprintf(stderr,"args on return?");
-+ }
-+ if(type == LT_TOF_FUNCTIONR) {
-+ return ptrace(PTRACE_PEEKUSER,proc->pid,off_v0,0);
-+ }
-+ if (type == LT_TOF_SYSCALLR) {
-+ unsigned a3=ptrace(PTRACE_PEEKUSER, proc->pid,off_a3,0);
-+ unsigned v0=ptrace(PTRACE_PEEKUSER, proc->pid,off_v0,0);
-+ if(!a3){
-+ return v0;
-+ }
-+ return -1;
-+ }
-+ fprintf(stderr, "gimme_arg called with wrong arguments\n");
- return 0;
- }
-
---- ltrace-0.5.2.orig/sysdeps/linux-gnu/x86_64/trace.c
-+++ ltrace-0.5.2/sysdeps/linux-gnu/x86_64/trace.c
-@@ -41,7 +41,8 @@
- *sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, 8 * ORIG_RAX, 0);
-
- if (proc->callstack_depth > 0 &&
-- proc->callstack[proc->callstack_depth - 1].is_syscall) {
-+ proc->callstack[proc->callstack_depth - 1].is_syscall &&
-+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
- return 2;
- }
-
diff --git a/patches/ltrace/0.5.2/130-fix-build-with-exotic-linux-host-OS.patch b/patches/ltrace/0.5.2/130-fix-build-with-exotic-linux-host-OS.patch
deleted file mode 100644
index 20396d6..0000000
--- a/patches/ltrace/0.5.2/130-fix-build-with-exotic-linux-host-OS.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -durN ltrace-0.5.2.orig/configure ltrace-0.5.2/configure
---- ltrace-0.5.2.orig/configure 2009-09-14 18:47:45.000000000 +0200
-+++ ltrace-0.5.2/configure 2009-09-14 18:49:18.000000000 +0200
-@@ -1829,6 +1829,9 @@
- linux-gnu*) host_os=linux-gnu
- esac
- HOST_OS="$host_os"
-+case "${HOST_OS}" in
-+ linux-*) HOST_OS=linux-gnu;;
-+esac
-
-
- ac_ext=c
-diff -durN ltrace-0.5.2.orig/configure.ac ltrace-0.5.2/configure.ac
---- ltrace-0.5.2.orig/configure.ac 2009-09-14 18:47:45.000000000 +0200
-+++ ltrace-0.5.2/configure.ac 2009-09-14 18:49:18.000000000 +0200
-@@ -10,6 +10,9 @@
- linux-gnu*) host_os=linux-gnu
- esac
- HOST_OS="$host_os"
-+case "${HOST_OS}" in
-+ linux-*) HOST_OS=linux-gnu;;
-+esac
- AC_SUBST(HOST_OS)
- HOST_ARCH="$host_cpu"
- AC_SUBST(HOST_ARCH)
diff --git a/patches/mingw-w64/v2.0.7/100-mingw64-malloc.patch b/patches/mingw-w64/v2.0.7/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/patches/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/patches/mingw-w64/v2.0.8/100-mingw64-malloc.patch b/patches/mingw-w64/v2.0.8/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/patches/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/patches/mingw-w64/v2.0.9/100-mingw64-malloc.patch b/patches/mingw-w64/v2.0.9/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/patches/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/patches/mingw-w64/v3.0.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.0.0/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/patches/mingw-w64/v3.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/patches/mingw-w64/v3.1.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.1.0/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/patches/mingw-w64/v3.1.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/patches/mingw-w64/v3.2.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.2.0/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/patches/mingw-w64/v3.2.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/patches/mingw-w64/v3.3.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.3.0/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/patches/mingw-w64/v3.3.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/patches/mingw-w64/v5.0.0/100-mingw64-malloc.patch b/patches/mingw-w64/v5.0.0/100-mingw64-malloc.patch
deleted file mode 100644
index 3d05b63..0000000
--- a/patches/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/patches/mingw-w64/v5.0.1/100-mingw64-malloc.patch b/patches/mingw-w64/v5.0.1/100-mingw64-malloc.patch
deleted file mode 100644
index 3d05b63..0000000
--- a/patches/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/patches/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff b/patches/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff
deleted file mode 100644
index 88e1517..0000000
--- a/patches/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/patches/mpfr/2.4.0/100-printf-hh-ll.patch b/patches/mpfr/2.4.0/100-printf-hh-ll.patch
deleted file mode 100644
index e2a9f81..0000000
--- a/patches/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/patches/mpfr/2.4.0/110-mpfr_snprintf.patch b/patches/mpfr/2.4.0/110-mpfr_snprintf.patch
deleted file mode 100644
index 92af137..0000000
--- a/patches/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/patches/mpfr/2.4.1/100-remainder-neg.patch b/patches/mpfr/2.4.1/100-remainder-neg.patch
deleted file mode 100644
index ae92788..0000000
--- a/patches/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/patches/mpfr/2.4.1/110-assert.patch b/patches/mpfr/2.4.1/110-assert.patch
deleted file mode 100644
index c6b6aac..0000000
--- a/patches/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/patches/mpfr/2.4.1/120-cast-to-void-ptr.patch b/patches/mpfr/2.4.1/120-cast-to-void-ptr.patch
deleted file mode 100644
index e85136a..0000000
--- a/patches/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/patches/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch b/patches/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch
deleted file mode 100644
index 08e21f2..0000000
--- a/patches/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/patches/mpfr/2.4.1/140-zeta_ui-shift.patch b/patches/mpfr/2.4.1/140-zeta_ui-shift.patch
deleted file mode 100644
index 710c698..0000000
--- a/patches/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/patches/mpfr/2.4.1/150-test-tmul.patch b/patches/mpfr/2.4.1/150-test-tmul.patch
deleted file mode 100644
index 8b757d3..0000000
--- a/patches/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/patches/mpfr/3.0.0/110-mpfr_out_str.patch b/patches/mpfr/3.0.0/110-mpfr_out_str.patch
deleted file mode 100644
index da98aab..0000000
--- a/patches/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/patches/mpfr/3.0.0/120-alloca.patch b/patches/mpfr/3.0.0/120-alloca.patch
deleted file mode 100644
index af6dfb2..0000000
--- a/patches/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/patches/mpfr/3.0.0/130-gamma_underflow.patch b/patches/mpfr/3.0.0/130-gamma_underflow.patch
deleted file mode 100644
index cf8a936..0000000
--- a/patches/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/patches/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch b/patches/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch
deleted file mode 100644
index 67d6a6a..0000000
--- a/patches/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/patches/mpfr/3.0.0/150-tcan_round.patch b/patches/mpfr/3.0.0/150-tcan_round.patch
deleted file mode 100644
index 292e7a5..0000000
--- a/patches/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/patches/mpfr/3.0.0/160-mpfr_sub1.patch b/patches/mpfr/3.0.0/160-mpfr_sub1.patch
deleted file mode 100644
index 2ce98e9..0000000
--- a/patches/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/patches/mpfr/3.0.0/170-mpfr_set_ld.patch b/patches/mpfr/3.0.0/170-mpfr_set_ld.patch
deleted file mode 100644
index 9209afe..0000000
--- a/patches/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/patches/mpfr/3.0.0/180-macros.patch b/patches/mpfr/3.0.0/180-macros.patch
deleted file mode 100644
index 58a490f..0000000
--- a/patches/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/patches/mpfr/3.1.0/110-mpfr_unlikely.patch b/patches/mpfr/3.1.0/110-mpfr_unlikely.patch
deleted file mode 100644
index 437b1a2..0000000
--- a/patches/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/patches/mpfr/3.1.0/120-lib-search-path.patch b/patches/mpfr/3.1.0/120-lib-search-path.patch
deleted file mode 100644
index 4714ac9..0000000
--- a/patches/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/patches/mpfr/3.1.0/130-vasprintf.patch b/patches/mpfr/3.1.0/130-vasprintf.patch
deleted file mode 100644
index aa1cfbc..0000000
--- a/patches/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/patches/mpfr/3.1.0/140-gmp41compat.patch b/patches/mpfr/3.1.0/140-gmp41compat.patch
deleted file mode 100644
index 4b1ba08..0000000
--- a/patches/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/patches/mpfr/3.1.0/150-logging-freeze.patch b/patches/mpfr/3.1.0/150-logging-freeze.patch
deleted file mode 100644
index c664cee..0000000
--- a/patches/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/patches/mpfr/3.1.0/160-logging-varfmt.patch b/patches/mpfr/3.1.0/160-logging-varfmt.patch
deleted file mode 100644
index 0f4bfad..0000000
--- a/patches/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/patches/mpfr/3.1.0/170-large-prec.patch b/patches/mpfr/3.1.0/170-large-prec.patch
deleted file mode 100644
index 08e7b57..0000000
--- a/patches/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/patches/mpfr/3.1.0/180-__gmp_const.patch b/patches/mpfr/3.1.0/180-__gmp_const.patch
deleted file mode 100644
index 94444b6..0000000
--- a/patches/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/patches/mpfr/3.1.0/190-gamma-underflow.patch b/patches/mpfr/3.1.0/190-gamma-underflow.patch
deleted file mode 100644
index 3de1d19..0000000
--- a/patches/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/patches/mpfr/3.1.0/200-gamma-overunderflow.patch b/patches/mpfr/3.1.0/200-gamma-overunderflow.patch
deleted file mode 100644
index e6d6051..0000000
--- a/patches/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/patches/mpfr/3.1.1/110-get_decimal64.patch b/patches/mpfr/3.1.1/110-get_decimal64.patch
deleted file mode 100644
index d73a3d7..0000000
--- a/patches/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/patches/mpfr/3.1.1/120-strtofr-ternary-value.patch b/patches/mpfr/3.1.1/120-strtofr-ternary-value.patch
deleted file mode 100644
index 76dbc45..0000000
--- a/patches/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/patches/mpfr/3.1.1/130-gmp51-compat.patch b/patches/mpfr/3.1.1/130-gmp51-compat.patch
deleted file mode 100644
index ecf7537..0000000
--- a/patches/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/patches/mpfr/3.1.2/110-exp_2.patch b/patches/mpfr/3.1.2/110-exp_2.patch
deleted file mode 100644
index 731ea92..0000000
--- a/patches/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/patches/mpfr/3.1.2/120-fits-smallneg.patch b/patches/mpfr/3.1.2/120-fits-smallneg.patch
deleted file mode 100644
index b229c18..0000000
--- a/patches/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/patches/mpfr/3.1.2/130-clang-divby0.patch b/patches/mpfr/3.1.2/130-clang-divby0.patch
deleted file mode 100644
index 8e0cd8e..0000000
--- a/patches/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/patches/mpfr/3.1.2/140-printf-alt0.patch b/patches/mpfr/3.1.2/140-printf-alt0.patch
deleted file mode 100644
index 2451f36..0000000
--- a/patches/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/patches/mpfr/3.1.2/150-custom_init_set.patch b/patches/mpfr/3.1.2/150-custom_init_set.patch
deleted file mode 100644
index 669b91d..0000000
--- a/patches/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/patches/mpfr/3.1.2/160-li2-return.patch b/patches/mpfr/3.1.2/160-li2-return.patch
deleted file mode 100644
index 50cd04d..0000000
--- a/patches/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/patches/mpfr/3.1.2/170-exp3.patch b/patches/mpfr/3.1.2/170-exp3.patch
deleted file mode 100644
index 378c3bf..0000000
--- a/patches/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/patches/mpfr/3.1.2/180-gmp6-compat.patch b/patches/mpfr/3.1.2/180-gmp6-compat.patch
deleted file mode 100644
index 2245c7c..0000000
--- a/patches/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/patches/mpfr/3.1.2/190-div-overflow.patch b/patches/mpfr/3.1.2/190-div-overflow.patch
deleted file mode 100644
index 6ff7c4a..0000000
--- a/patches/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/patches/mpfr/3.1.2/200-vasprintf.patch b/patches/mpfr/3.1.2/200-vasprintf.patch
deleted file mode 100644
index 43848f7..0000000
--- a/patches/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/patches/mpfr/3.1.2/210-strtofr.patch b/patches/mpfr/3.1.2/210-strtofr.patch
deleted file mode 100644
index 462162e..0000000
--- a/patches/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/patches/mpfr/3.1.3/110-lngamma-and-doc.patch b/patches/mpfr/3.1.3/110-lngamma-and-doc.patch
deleted file mode 100644
index d7e1cbf..0000000
--- a/patches/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/patches/mpfr/3.1.3/120-muldiv-2exp-overflow.patch b/patches/mpfr/3.1.3/120-muldiv-2exp-overflow.patch
deleted file mode 100644
index df711fd..0000000
--- a/patches/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/patches/mpfr/3.1.3/130-muldiv-2exp-underflow.patch b/patches/mpfr/3.1.3/130-muldiv-2exp-underflow.patch
deleted file mode 100644
index c7be09f..0000000
--- a/patches/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/patches/mpfr/3.1.3/140-frexp.patch b/patches/mpfr/3.1.3/140-frexp.patch
deleted file mode 100644
index e0d5e09..0000000
--- a/patches/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/patches/mpfr/3.1.3/150-divhigh-basecase.patch b/patches/mpfr/3.1.3/150-divhigh-basecase.patch
deleted file mode 100644
index ef8d891..0000000
--- a/patches/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/patches/mpfr/3.1.3/160-jn.patch b/patches/mpfr/3.1.3/160-jn.patch
deleted file mode 100644
index e7d04fa..0000000
--- a/patches/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/patches/mpfr/3.1.3/170-zeta.patch b/patches/mpfr/3.1.3/170-zeta.patch
deleted file mode 100644
index 12faf1d..0000000
--- a/patches/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/patches/mpfr/3.1.3/180-sqrt.patch b/patches/mpfr/3.1.3/180-sqrt.patch
deleted file mode 100644
index 4887009..0000000
--- a/patches/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/patches/mpfr/3.1.3/190-si-ops.patch b/patches/mpfr/3.1.3/190-si-ops.patch
deleted file mode 100644
index e4df233..0000000
--- a/patches/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/patches/mpfr/3.1.3/200-can_round.patch b/patches/mpfr/3.1.3/200-can_round.patch
deleted file mode 100644
index 6c0f79a..0000000
--- a/patches/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/patches/mpfr/3.1.3/210-fits.patch b/patches/mpfr/3.1.3/210-fits.patch
deleted file mode 100644
index 888389c..0000000
--- a/patches/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/patches/mpfr/3.1.3/220-root.patch b/patches/mpfr/3.1.3/220-root.patch
deleted file mode 100644
index 9cd62a7..0000000
--- a/patches/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/patches/mpfr/3.1.3/230-gamma.patch b/patches/mpfr/3.1.3/230-gamma.patch
deleted file mode 100644
index 47d4e41..0000000
--- a/patches/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/patches/mpfr/3.1.3/240-rem1.patch b/patches/mpfr/3.1.3/240-rem1.patch
deleted file mode 100644
index 9d5e3c1..0000000
--- a/patches/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/patches/mpfr/3.1.3/250-agm-eq.patch b/patches/mpfr/3.1.3/250-agm-eq.patch
deleted file mode 100644
index e59e914..0000000
--- a/patches/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/patches/mpfr/3.1.3/260-sum.patch b/patches/mpfr/3.1.3/260-sum.patch
deleted file mode 100644
index 6fae047..0000000
--- a/patches/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/patches/mpfr/3.1.3/270-cmp_d.patch b/patches/mpfr/3.1.3/270-cmp_d.patch
deleted file mode 100644
index f22e27a..0000000
--- a/patches/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/patches/strace/4.5.18/110-dont-use-REG_SYSCALL-for-sh.patch b/patches/strace/4.5.18/110-dont-use-REG_SYSCALL-for-sh.patch
deleted file mode 100644
index ebbf69a..0000000
--- a/patches/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/patches/strace/4.5.18/130-fix-disabled-largefile-syscalls.patch b/patches/strace/4.5.18/130-fix-disabled-largefile-syscalls.patch
deleted file mode 100644
index 2f47dc9..0000000
--- a/patches/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/patches/strace/4.5.18/140-statfs64-check.patch b/patches/strace/4.5.18/140-statfs64-check.patch
deleted file mode 100644
index 758966b..0000000
--- a/patches/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/patches/strace/4.5.18/160-fix-check-for-linux-netlink.patch b/patches/strace/4.5.18/160-fix-check-for-linux-netlink.patch
deleted file mode 100644
index e12b4e4..0000000
--- a/patches/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/patches/strace/4.5.18/160-undef-syscall.patch b/patches/strace/4.5.18/160-undef-syscall.patch
deleted file mode 100644
index c7dcb07..0000000
--- a/patches/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/patches/strace/4.5.18/170-no_cachectl.patch b/patches/strace/4.5.18/170-no_cachectl.patch
deleted file mode 100644
index a8fab23..0000000
--- a/patches/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/patches/strace/4.5.18/180-arm-EABI-syscalls.patch b/patches/strace/4.5.18/180-arm-EABI-syscalls.patch
deleted file mode 100644
index 1f28450..0000000
--- a/patches/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/patches/strace/4.5.18/900-autoreconf.patch b/patches/strace/4.5.18/900-autoreconf.patch
deleted file mode 100644
index cff775f..0000000
--- a/patches/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/patches/strace/4.5.19/120-fix-disabled-largefile-syscalls.patch b/patches/strace/4.5.19/120-fix-disabled-largefile-syscalls.patch
deleted file mode 100644
index a555fc2..0000000
--- a/patches/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/patches/strace/4.5.19/130-statfs64-check.patch b/patches/strace/4.5.19/130-statfs64-check.patch
deleted file mode 100644
index 0959bdd..0000000
--- a/patches/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/patches/strace/4.5.19/150-undef-syscall.patch b/patches/strace/4.5.19/150-undef-syscall.patch
deleted file mode 100644
index 7d65e1d..0000000
--- a/patches/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/patches/strace/4.5.19/160-fix-check-for-linux-netlink.patch b/patches/strace/4.5.19/160-fix-check-for-linux-netlink.patch
deleted file mode 100644
index d8c6b2a..0000000
--- a/patches/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/patches/strace/4.5.19/170-update-configure.patch b/patches/strace/4.5.19/170-update-configure.patch
deleted file mode 100644
index 5d12276..0000000
--- a/patches/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/patches/uClibc-ng/1.0.20/100-xtensa-static-link.patch b/patches/uClibc-ng/1.0.20/100-xtensa-static-link.patch
deleted file mode 100644
index 3f8a518..0000000
--- a/patches/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/patches/uClibc-ng/1.0.20/110-has-lfs.patch b/patches/uClibc-ng/1.0.20/110-has-lfs.patch
deleted file mode 100644
index c5b90de..0000000
--- a/patches/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/patches/uClibc-ng/1.0.20/500-no-install-D.patch b/patches/uClibc-ng/1.0.20/500-no-install-D.patch
deleted file mode 100644
index 83d3ff6..0000000
--- a/patches/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/patches/uClibc-ng/1.0.20/600-prefer-multilib.patch b/patches/uClibc-ng/1.0.20/600-prefer-multilib.patch
deleted file mode 100644
index 4338f9f..0000000
--- a/patches/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/patches/uClibc-ng/1.0.20/700-features.h-c11.patch b/patches/uClibc-ng/1.0.20/700-features.h-c11.patch
deleted file mode 100644
index cb1d2a8..0000000
--- a/patches/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/patches/uClibc-ng/1.0.21/110-has-lfs.patch b/patches/uClibc-ng/1.0.21/110-has-lfs.patch
deleted file mode 100644
index c5b90de..0000000
--- a/patches/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/patches/uClibc-ng/1.0.21/120-module.patch b/patches/uClibc-ng/1.0.21/120-module.patch
deleted file mode 100644
index 2e8a989..0000000
--- a/patches/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/patches/uClibc-ng/1.0.21/500-no-install-D.patch b/patches/uClibc-ng/1.0.21/500-no-install-D.patch
deleted file mode 100644
index 83d3ff6..0000000
--- a/patches/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/patches/uClibc-ng/1.0.21/600-prefer-multilib.patch b/patches/uClibc-ng/1.0.21/600-prefer-multilib.patch
deleted file mode 100644
index 4338f9f..0000000
--- a/patches/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/patches/uClibc-ng/1.0.21/700-features.h-c11.patch b/patches/uClibc-ng/1.0.21/700-features.h-c11.patch
deleted file mode 100644
index cb1d2a8..0000000
--- a/patches/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/patches/uClibc-ng/1.0.22/500-no-install-D.patch b/patches/uClibc-ng/1.0.22/500-no-install-D.patch
deleted file mode 100644
index 83d3ff6..0000000
--- a/patches/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/patches/uClibc-ng/1.0.22/600-prefer-multilib.patch b/patches/uClibc-ng/1.0.22/600-prefer-multilib.patch
deleted file mode 100644
index 4338f9f..0000000
--- a/patches/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/patches/uClibc-ng/1.0.22/700-features.h-c11.patch b/patches/uClibc-ng/1.0.22/700-features.h-c11.patch
deleted file mode 100644
index cb1d2a8..0000000
--- a/patches/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/patches/uClibc-ng/1.0.23/700-features.h-c11.patch b/patches/uClibc-ng/1.0.23/700-features.h-c11.patch
deleted file mode 100644
index cb1d2a8..0000000
--- a/patches/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/patches/uClibc-ng/1.0.24/700-features.h-c11.patch b/patches/uClibc-ng/1.0.24/700-features.h-c11.patch
deleted file mode 100644
index cb1d2a8..0000000
--- a/patches/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/samples/aarch64-rpi3-linux-gnu/crosstool.config b/samples/aarch64-rpi3-linux-gnu/crosstool.config
new file mode 100644
index 0000000..f8ef63d
--- /dev/null
+++ b/samples/aarch64-rpi3-linux-gnu/crosstool.config
@@ -0,0 +1,11 @@
+CT_ARCH_ARM=y
+CT_ARCH_CPU="cortex-a53"
+CT_ARCH_64=y
+CT_TARGET_VENDOR="rpi3"
+CT_KERNEL_LINUX=y
+CT_BINUTILS_LINKER_LD_GOLD=y
+CT_BINUTILS_GOLD_THREADS=y
+CT_BINUTILS_LD_WRAPPER=y
+CT_BINUTILS_PLUGINS=y
+CT_CC_LANG_CXX=y
+CT_DEBUG_GDB=y
diff --git a/samples/aarch64-rpi3-linux-gnu/reported.by b/samples/aarch64-rpi3-linux-gnu/reported.by
new file mode 100644
index 0000000..a7cdf73
--- /dev/null
+++ b/samples/aarch64-rpi3-linux-gnu/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Bryan Hundven"
+reporter_url=""
+reporter_comment="Raspberry PI 3 aarch64"
diff --git a/samples/aarch64-rpi3-linux-gnueabi/crosstool.config b/samples/aarch64-rpi3-linux-gnueabi/crosstool.config
deleted file mode 100644
index 6d51c12..0000000
--- a/samples/aarch64-rpi3-linux-gnueabi/crosstool.config
+++ /dev/null
@@ -1,12 +0,0 @@
-CT_ARCH_arm=y
-CT_ARCH_64=y
-CT_ARCH_CPU="cortex-a53"
-CT_TARGET_VENDOR="rpi3"
-CT_KERNEL_linux=y
-CT_BINUTILS_LINKER_LD_GOLD=y
-CT_BINUTILS_GOLD_THREADS=y
-CT_BINUTILS_LD_WRAPPER=y
-CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
-CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
diff --git a/samples/aarch64-rpi3-linux-gnueabi/reported.by b/samples/aarch64-rpi3-linux-gnueabi/reported.by
deleted file mode 100644
index 0b99105..0000000
--- a/samples/aarch64-rpi3-linux-gnueabi/reported.by
+++ /dev/null
@@ -1,3 +0,0 @@
-reporter_name="Bryan Hundven"
-reporter_url="https://github.com/crosstool-ng/crosstool-ng/issues"
-reporter_comment="Raspberry PI 3 aarch64"
diff --git a/samples/aarch64-unknown-linux-android/crosstool.config b/samples/aarch64-unknown-linux-android/crosstool.config
index 295b219..0e8a6f8 100644
--- a/samples/aarch64-unknown-linux-android/crosstool.config
+++ b/samples/aarch64-unknown-linux-android/crosstool.config
@@ -1,11 +1,10 @@
CT_EXPERIMENTAL=y
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_64=y
CT_ARCH_ARCH="armv8-a"
CT_STATIC_TOOLCHAIN=y
-CT_KERNEL_linux=y
-CT_LIBC_BIONIC_V_14b=y
+CT_KERNEL_LINUX=y
CT_ANDROID_API_21=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
CT_GETTEXT=y
diff --git a/samples/aarch64-unknown-linux-gnu/crosstool.config b/samples/aarch64-unknown-linux-gnu/crosstool.config
new file mode 100644
index 0000000..898e4e4
--- /dev/null
+++ b/samples/aarch64-unknown-linux-gnu/crosstool.config
@@ -0,0 +1,10 @@
+CT_ARCH_ARM=y
+CT_ARCH_64=y
+CT_TARGET_VENDOR=""
+CT_KERNEL_LINUX=y
+CT_BINUTILS_LINKER_LD_GOLD=y
+CT_BINUTILS_GOLD_THREADS=y
+CT_BINUTILS_LD_WRAPPER=y
+CT_BINUTILS_PLUGINS=y
+CT_CC_LANG_CXX=y
+CT_DEBUG_GDB=y
diff --git a/samples/aarch64-unknown-linux-gnu/reported.by b/samples/aarch64-unknown-linux-gnu/reported.by
new file mode 100644
index 0000000..224868b
--- /dev/null
+++ b/samples/aarch64-unknown-linux-gnu/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Bryan Hundven"
+reporter_url=""
+reporter_comment="Generic aarch64 toolchain"
diff --git a/samples/aarch64-unknown-linux-gnueabi/crosstool.config b/samples/aarch64-unknown-linux-gnueabi/crosstool.config
deleted file mode 100644
index 8ff183c..0000000
--- a/samples/aarch64-unknown-linux-gnueabi/crosstool.config
+++ /dev/null
@@ -1,11 +0,0 @@
-CT_ARCH_arm=y
-CT_ARCH_64=y
-CT_TARGET_VENDOR=""
-CT_KERNEL_linux=y
-CT_BINUTILS_LINKER_LD_GOLD=y
-CT_BINUTILS_GOLD_THREADS=y
-CT_BINUTILS_LD_WRAPPER=y
-CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
-CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
diff --git a/samples/aarch64-unknown-linux-gnueabi/reported.by b/samples/aarch64-unknown-linux-gnueabi/reported.by
deleted file mode 100644
index 37668de..0000000
--- a/samples/aarch64-unknown-linux-gnueabi/reported.by
+++ /dev/null
@@ -1,3 +0,0 @@
-reporter_name="Bryan Hundven"
-reporter_url="https://github.com/crosstool-ng/crosstool-ng/issues"
-reporter_comment="Generic aarch64 toolchain"
diff --git a/samples/aarch64-unknown-linux-uclibc/crosstool.config b/samples/aarch64-unknown-linux-uclibc/crosstool.config
new file mode 100644
index 0000000..fdda449
--- /dev/null
+++ b/samples/aarch64-unknown-linux-uclibc/crosstool.config
@@ -0,0 +1,14 @@
+CT_ARCH_ARM=y
+CT_ARCH_64=y
+CT_TARGET_VENDOR=""
+CT_KERNEL_LINUX=y
+CT_BINUTILS_LINKER_LD_GOLD=y
+CT_BINUTILS_GOLD_THREADS=y
+CT_BINUTILS_LD_WRAPPER=y
+CT_BINUTILS_PLUGINS=y
+CT_LIBC_UCLIBC=y
+CT_CC_LANG_CXX=y
+CT_DEBUG_GDB=y
+CT_GDB_NATIVE=y
+CT_DEBUG_STRACE=y
+CT_GETTEXT=y
diff --git a/samples/aarch64-unknown-linux-uclibcgnueabi/reported.by b/samples/aarch64-unknown-linux-uclibc/reported.by
index d4dfbc2..d4dfbc2 100644
--- a/samples/aarch64-unknown-linux-uclibcgnueabi/reported.by
+++ b/samples/aarch64-unknown-linux-uclibc/reported.by
diff --git a/samples/aarch64-unknown-linux-uclibcgnueabi/crosstool.config b/samples/aarch64-unknown-linux-uclibcgnueabi/crosstool.config
deleted file mode 100644
index ebc0524..0000000
--- a/samples/aarch64-unknown-linux-uclibcgnueabi/crosstool.config
+++ /dev/null
@@ -1,14 +0,0 @@
-CT_ARCH_arm=y
-CT_ARCH_64=y
-CT_TARGET_VENDOR=""
-CT_KERNEL_linux=y
-CT_BINUTILS_LINKER_LD_GOLD=y
-CT_BINUTILS_GOLD_THREADS=y
-CT_BINUTILS_LD_WRAPPER=y
-CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
-CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
-CT_GDB_NATIVE=y
-CT_DEBUG_strace=y
-CT_GETTEXT=y
diff --git a/samples/alphaev56-unknown-linux-gnu/crosstool.config b/samples/alphaev56-unknown-linux-gnu/crosstool.config
index 67a5807..321e957 100644
--- a/samples/alphaev56-unknown-linux-gnu/crosstool.config
+++ b/samples/alphaev56-unknown-linux-gnu/crosstool.config
@@ -1,5 +1,4 @@
-CT_ARCH_CPU="ev56"
CT_ARCH_ALPHA_EV56=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
CT_CC_LANG_CXX=y
diff --git a/samples/alphaev67-unknown-linux-gnu/crosstool.config b/samples/alphaev67-unknown-linux-gnu/crosstool.config
index 41cc753..485bd2d 100644
--- a/samples/alphaev67-unknown-linux-gnu/crosstool.config
+++ b/samples/alphaev67-unknown-linux-gnu/crosstool.config
@@ -1,6 +1,5 @@
-CT_ARCH_CPU="ev67"
CT_ARCH_ALPHA_EV67=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
# CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set
CT_CC_LANG_CXX=y
diff --git a/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config b/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config
index c570a1e..09cae2b 100644
--- a/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config
+++ b/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config
@@ -1,8 +1,8 @@
-CT_ARCH_arm=y
-# CT_ARCH_USE_MMU is not set
+CT_ARCH_ARM=y
CT_ARCH_CPU="cortex-m3"
-CT_ARCH_FLOAT_SW=y
CT_ARCH_ARM_MODE_THUMB=y
+# CT_ARCH_USE_MMU is not set
+CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="bare_newlib_cortex_m3_nommu"
CT_ARCH_BINFMT_FLAT=y
CT_LIBC_NEWLIB_IO_C99FMT=y
diff --git a/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config b/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config
index 76174b6..491046d 100644
--- a/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config
+++ b/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config
@@ -1,18 +1,16 @@
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_CPU="cortex-a15"
CT_ARCH_FPU="neon-vfpv4"
CT_ARCH_FLOAT_HW=y
CT_TARGET_VENDOR="cortex_a15"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
-CT_CC_GCC_SHOW_LINARO=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
-CT_DEBUG_strace=y
+CT_DEBUG_STRACE=y
diff --git a/samples/arm-cortex_a8-linux-gnueabi/crosstool.config b/samples/arm-cortex_a8-linux-gnueabi/crosstool.config
index 7b7a74b..3e4c024 100644
--- a/samples/arm-cortex_a8-linux-gnueabi/crosstool.config
+++ b/samples/arm-cortex_a8-linux-gnueabi/crosstool.config
@@ -1,17 +1,16 @@
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_CPU="cortex-a8"
CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="cortex_a8"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
-CT_DEBUG_ltrace=y
-CT_DEBUG_strace=y
+CT_DEBUG_LTRACE=y
+CT_DEBUG_STRACE=y
diff --git a/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config b/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config
index 980d03f..49e842c 100644
--- a/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config
+++ b/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config
@@ -1,20 +1,19 @@
CT_EXPERIMENTAL=y
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_CPU="cortex-a5"
CT_ARCH_FPU="vfpv4-d16"
CT_ARCH_FLOAT_HW=y
CT_TARGET_VENDOR="cortexa5"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
-CT_LIBC_UCLIBC_WCHAR=y
+CT_LIBC_UCLIBC=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
CT_GDB_CROSS_STATIC=y
CT_GDB_NATIVE=y
-CT_DEBUG_ltrace=y
-CT_DEBUG_strace=y
+CT_DEBUG_LTRACE=y
+CT_DEBUG_STRACE=y
diff --git a/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config b/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config
index f5a57dd..83f781f 100644
--- a/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config
+++ b/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config
@@ -1,23 +1,22 @@
CT_EXPERIMENTAL=y
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_CPU="cortex-a9"
CT_ARCH_FPU="neon"
CT_ARCH_FLOAT_HW=y
CT_TARGET_VENDOR="cortexa9_neon"
CT_TOOLCHAIN_ENABLE_NLS=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
-CT_LIBC_ADDONS_LIST="libidn"
-CT_LIBC_LOCALES=y
-CT_LIBC_GLIBC_KERNEL_VERSION_NONE=y
-CT_CC_GCC_SHOW_LINARO=y
+CT_LIBC_GLIBC=y
+CT_GLIBC_USE_LIBIDN_ADDON=y
+CT_GLIBC_LOCALES=y
+CT_GLIBC_KERNEL_VERSION_NONE=y
# CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
CT_GDB_NATIVE_STATIC=y
diff --git a/samples/arm-multilib-linux-uclibcgnueabi/crosstool.config b/samples/arm-multilib-linux-uclibcgnueabi/crosstool.config
index 00ac47b..6dc39fa 100644
--- a/samples/arm-multilib-linux-uclibcgnueabi/crosstool.config
+++ b/samples/arm-multilib-linux-uclibcgnueabi/crosstool.config
@@ -1,15 +1,15 @@
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_MULTILIB=y
CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="multilib"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
# CT_SHARED_LIBS is not set
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
+CT_LIBC_UCLIBC=y
CT_THREADS_NONE=y
CT_CC_GCC_MULTILIB_LIST="aprofile"
-CT_DEBUG_ltrace=y
-CT_DEBUG_strace=y
+CT_DEBUG_LTRACE=y
+CT_DEBUG_STRACE=y
diff --git a/samples/arm-nano-eabi/crosstool.config b/samples/arm-nano-eabi/crosstool.config
index a00b6a2..82e5714 100644
--- a/samples/arm-nano-eabi/crosstool.config
+++ b/samples/arm-nano-eabi/crosstool.config
@@ -1,4 +1,4 @@
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_MULTILIB=y
CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="nano"
diff --git a/samples/arm-unknown-eabi/crosstool.config b/samples/arm-unknown-eabi/crosstool.config
index a22ac4a..f52abec 100644
--- a/samples/arm-unknown-eabi/crosstool.config
+++ b/samples/arm-unknown-eabi/crosstool.config
@@ -1,4 +1,4 @@
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_FLOAT_SW=y
CT_LIBC_NEWLIB_IO_C99FMT=y
CT_LIBC_NEWLIB_IO_LL=y
diff --git a/samples/arm-unknown-linux-gnueabi/crosstool.config b/samples/arm-unknown-linux-gnueabi/crosstool.config
index 20157cf..128d379 100644
--- a/samples/arm-unknown-linux-gnueabi/crosstool.config
+++ b/samples/arm-unknown-linux-gnueabi/crosstool.config
@@ -1,17 +1,16 @@
# CT_REMOVE_DOCS is not set
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_FLOAT_SW=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
# CT_CC_GCC_SJLJ_EXCEPTIONS is not set
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
-CT_DEBUG_ltrace=y
-CT_DEBUG_strace=y
+CT_DEBUG_LTRACE=y
+CT_DEBUG_STRACE=y
diff --git a/samples/arm-unknown-linux-musleabi/crosstool.config b/samples/arm-unknown-linux-musleabi/crosstool.config
index e2335a7..c384611 100644
--- a/samples/arm-unknown-linux-musleabi/crosstool.config
+++ b/samples/arm-unknown-linux-musleabi/crosstool.config
@@ -1,14 +1,14 @@
CT_EXPERIMENTAL=y
-CT_ARCH_arm=y
-CT_KERNEL_linux=y
+CT_ARCH_ARM=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
CT_BINUTILS_FOR_TARGET=y
-CT_LIBC_musl=y
+CT_LIBC_MUSL=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
CT_GDB_NATIVE=y
-CT_DEBUG_strace=y
+CT_DEBUG_STRACE=y
diff --git a/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config b/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config
index c2b4823..2993b99 100644
--- a/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config
+++ b/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config
@@ -1,16 +1,16 @@
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_CPU="arm926ej-s"
CT_ARCH_FLOAT_SW=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
+CT_LIBC_UCLIBC=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
CT_GDB_CROSS_STATIC=y
CT_GDB_NATIVE=y
-CT_DEBUG_ltrace=y
-CT_DEBUG_strace=y
+CT_DEBUG_LTRACE=y
+CT_DEBUG_STRACE=y
diff --git a/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config b/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config
index d327974..3fd2d2d 100644
--- a/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config
+++ b/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config
@@ -1,18 +1,18 @@
CT_EXPERIMENTAL=y
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_CPU="arm926ej-s"
CT_ARCH_FLOAT_HW=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
+CT_LIBC_UCLIBC=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
CT_GDB_CROSS_STATIC=y
CT_GDB_NATIVE=y
CT_GDB_NATIVE_STATIC=y
-CT_DEBUG_ltrace=y
-CT_DEBUG_strace=y
+CT_DEBUG_LTRACE=y
+CT_DEBUG_STRACE=y
diff --git a/samples/armeb-unknown-eabi/crosstool.config b/samples/armeb-unknown-eabi/crosstool.config
index ce975a8..c6779f8 100644
--- a/samples/armeb-unknown-eabi/crosstool.config
+++ b/samples/armeb-unknown-eabi/crosstool.config
@@ -1,11 +1,11 @@
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_BE=y
CT_ARCH_FLOAT_SW=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_none=y
+CT_LIBC_NONE=y
# CT_CC_GCC_USE_GRAPHITE is not set
# CT_CC_GCC_USE_LTO is not set
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
diff --git a/samples/armeb-unknown-linux-gnueabi/crosstool.config b/samples/armeb-unknown-linux-gnueabi/crosstool.config
index 983c33d..22d7d9f 100644
--- a/samples/armeb-unknown-linux-gnueabi/crosstool.config
+++ b/samples/armeb-unknown-linux-gnueabi/crosstool.config
@@ -1,18 +1,17 @@
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_BE=y
CT_ARCH_ARCH="armv5te"
CT_ARCH_FLOAT_SW=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
# CT_CC_GCC_SJLJ_EXCEPTIONS is not set
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
-CT_DEBUG_ltrace=y
-CT_DEBUG_strace=y
+CT_DEBUG_LTRACE=y
+CT_DEBUG_STRACE=y
diff --git a/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config b/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config
index 8f4d688..c2b21f8 100644
--- a/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config
+++ b/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config
@@ -1,17 +1,17 @@
-CT_ARCH_arm=y
-CT_ARCH_BE=y
+CT_ARCH_ARM=y
CT_ARCH_CPU="xscale"
+CT_ARCH_BE=y
CT_ARCH_FLOAT_SW=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
+CT_LIBC_UCLIBC=y
# CT_CC_GCC_SJLJ_EXCEPTIONS is not set
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
-CT_DEBUG_strace=y
+CT_DEBUG_STRACE=y
diff --git a/samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config b/samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config
index 398a550..4b0c04b 100644
--- a/samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config
+++ b/samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config
@@ -1,13 +1,12 @@
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_SUFFIX="v6"
# CT_ARCH_USE_MMU is not set
CT_TARGET_VENDOR="nommu"
-CT_KERNEL_linux=y
-# CT_SHARED_LIBS is not set
+CT_KERNEL_LINUX=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
+# CT_SHARED_LIBS is not set
CT_BINUTILS_PLUGINS=y
CT_THREADS_NONE=y
-CT_CC_GCC_SHOW_LINARO=y
CT_CC_GCC_DISABLE_PCH=y
CT_CC_GCC_BUILD_ID=y
CT_CC_GCC_LNK_HASH_STYLE_BOTH=y
diff --git a/samples/armv6-rpi-linux-gnueabi/crosstool.config b/samples/armv6-rpi-linux-gnueabi/crosstool.config
index 22fbfaa..94f1b2a 100644
--- a/samples/armv6-rpi-linux-gnueabi/crosstool.config
+++ b/samples/armv6-rpi-linux-gnueabi/crosstool.config
@@ -1,22 +1,20 @@
-CT_ARCH_arm=y
-CT_ARCH_SUFFIX="v6"
+CT_ARCH_ARM=y
CT_ARCH_CPU="arm1176jzf-s"
+CT_ARCH_SUFFIX="v6"
CT_ARCH_FPU="vfp"
CT_TARGET_VENDOR="rpi"
-CT_KERNEL_linux=y
-CT_KERNEL_V_3_12=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_3_12=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
-CT_LIBC_LOCALES=y
-CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN=y
-CT_LIBC_GLIBC_MIN_KERNEL_VERSION="3.2.27"
-CT_CC_GCC_SHOW_LINARO=y
+CT_GLIBC_LOCALES=y
+CT_GLIBC_KERNEL_VERSION_CHOSEN=y
+CT_GLIBC_MIN_KERNEL_VERSION="3.2.27"
CT_CC_GCC_DISABLE_PCH=y
CT_CC_GCC_BUILD_ID=y
CT_CC_GCC_LNK_HASH_STYLE_BOTH=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/armv7-rpi2-linux-gnueabihf/crosstool.config b/samples/armv7-rpi2-linux-gnueabihf/crosstool.config
index 30b678d..102c503 100644
--- a/samples/armv7-rpi2-linux-gnueabihf/crosstool.config
+++ b/samples/armv7-rpi2-linux-gnueabihf/crosstool.config
@@ -1,14 +1,13 @@
-CT_ARCH_arm=y
-CT_ARCH_SUFFIX="v7"
+CT_ARCH_ARM=y
CT_ARCH_CPU="cortex-a7"
+CT_ARCH_SUFFIX="v7"
CT_ARCH_FPU="neon-vfpv4"
CT_ARCH_FLOAT_HW=y
CT_TARGET_VENDOR="rpi2"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
diff --git a/samples/armv8-rpi3-linux-gnueabihf/crosstool.config b/samples/armv8-rpi3-linux-gnueabihf/crosstool.config
index 6d1d0f8..fe9b5af 100644
--- a/samples/armv8-rpi3-linux-gnueabihf/crosstool.config
+++ b/samples/armv8-rpi3-linux-gnueabihf/crosstool.config
@@ -1,14 +1,13 @@
-CT_ARCH_arm=y
-CT_ARCH_SUFFIX="v8"
+CT_ARCH_ARM=y
CT_ARCH_CPU="cortex-a53"
+CT_ARCH_SUFFIX="v8"
CT_ARCH_FPU="neon-vfpv4"
CT_ARCH_FLOAT_HW=y
CT_TARGET_VENDOR="rpi3"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
diff --git a/samples/avr/crosstool.config b/samples/avr/crosstool.config
index 3a3016f..6283c78 100644
--- a/samples/avr/crosstool.config
+++ b/samples/avr/crosstool.config
@@ -1,3 +1,3 @@
-CT_ARCH_avr=y
+CT_ARCH_AVR=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
diff --git a/samples/i586-geode-linux-uclibc/crosstool.config b/samples/i586-geode-linux-uclibc/crosstool.config
index 5dc1cc4..08f90f5 100644
--- a/samples/i586-geode-linux-uclibc/crosstool.config
+++ b/samples/i586-geode-linux-uclibc/crosstool.config
@@ -1,16 +1,15 @@
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_ARCH="pentium-mmx"
CT_TARGET_VENDOR="geode"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
-CT_LIBC_UCLIBC_WCHAR=y
+CT_LIBC_UCLIBC=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
-CT_DEBUG_strace=y
+CT_DEBUG_STRACE=y
diff --git a/samples/i686-centos6-linux-gnu/crosstool.config b/samples/i686-centos6-linux-gnu/crosstool.config
index 86ec1f6..c285893 100644
--- a/samples/i686-centos6-linux-gnu/crosstool.config
+++ b/samples/i686-centos6-linux-gnu/crosstool.config
@@ -1,10 +1,9 @@
CT_OBSOLETE=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_ARCH="i686"
CT_TARGET_VENDOR="centos6"
-CT_KERNEL_linux=y
-CT_KERNEL_V_2_6_32=y
-CT_LIBC_glibc=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_2_6_32=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
-CT_LIBC_GLIBC_V_2_12_2=y
+CT_GLIBC_V_2_12_2=y
CT_CC_LANG_CXX=y
diff --git a/samples/i686-centos7-linux-gnu/crosstool.config b/samples/i686-centos7-linux-gnu/crosstool.config
index b6403bb..498afcc 100644
--- a/samples/i686-centos7-linux-gnu/crosstool.config
+++ b/samples/i686-centos7-linux-gnu/crosstool.config
@@ -1,10 +1,9 @@
CT_OBSOLETE=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_ARCH="i686"
CT_TARGET_VENDOR="centos7"
-CT_KERNEL_linux=y
-CT_KERNEL_V_3_10=y
-CT_LIBC_glibc=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_3_10=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
-CT_LIBC_GLIBC_V_2_17=y
+CT_GLIBC_V_2_17=y
CT_CC_LANG_CXX=y
diff --git a/samples/i686-nptl-linux-gnu/crosstool.config b/samples/i686-nptl-linux-gnu/crosstool.config
index 1f14d67..48df330 100644
--- a/samples/i686-nptl-linux-gnu/crosstool.config
+++ b/samples/i686-nptl-linux-gnu/crosstool.config
@@ -1,16 +1,15 @@
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_ARCH="i686"
CT_TARGET_VENDOR="nptl"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
-CT_DEBUG_ltrace=y
-CT_DEBUG_strace=y
+CT_DEBUG_LTRACE=y
+CT_DEBUG_STRACE=y
diff --git a/samples/i686-ubuntu12.04-linux-gnu/crosstool.config b/samples/i686-ubuntu12.04-linux-gnu/crosstool.config
index 01c4312..958825d 100644
--- a/samples/i686-ubuntu12.04-linux-gnu/crosstool.config
+++ b/samples/i686-ubuntu12.04-linux-gnu/crosstool.config
@@ -1,10 +1,9 @@
CT_OBSOLETE=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_ARCH="i686"
CT_TARGET_VENDOR="ubuntu12.04"
-CT_KERNEL_linux=y
-CT_KERNEL_V_3_2=y
-CT_LIBC_glibc=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_3_2=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
-CT_LIBC_GLIBC_V_2_15=y
+CT_GLIBC_V_2_15=y
CT_CC_LANG_CXX=y
diff --git a/samples/i686-ubuntu14.04-linux-gnu/crosstool.config b/samples/i686-ubuntu14.04-linux-gnu/crosstool.config
index e3f459b..339c4c6 100644
--- a/samples/i686-ubuntu14.04-linux-gnu/crosstool.config
+++ b/samples/i686-ubuntu14.04-linux-gnu/crosstool.config
@@ -1,10 +1,9 @@
CT_OBSOLETE=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_ARCH="i686"
CT_TARGET_VENDOR="ubuntu14.04"
-CT_KERNEL_linux=y
-CT_KERNEL_V_3_13=y
-CT_LIBC_glibc=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_3_13=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
-CT_LIBC_GLIBC_V_2_19=y
+CT_GLIBC_V_2_19=y
CT_CC_LANG_CXX=y
diff --git a/samples/i686-ubuntu16.04-linux-gnu/crosstool.config b/samples/i686-ubuntu16.04-linux-gnu/crosstool.config
index 9eec3c1..e7f381e 100644
--- a/samples/i686-ubuntu16.04-linux-gnu/crosstool.config
+++ b/samples/i686-ubuntu16.04-linux-gnu/crosstool.config
@@ -1,10 +1,9 @@
CT_OBSOLETE=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_ARCH="i686"
CT_TARGET_VENDOR="ubuntu16.04"
-CT_KERNEL_linux=y
-CT_KERNEL_V_4_4=y
-CT_LIBC_glibc=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_4_4=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
-CT_LIBC_GLIBC_V_2_23=y
+CT_GLIBC_V_2_23=y
CT_CC_LANG_CXX=y
diff --git a/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config b/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config
index f3cd8e5..c3df4ad 100644
--- a/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config
+++ b/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config
@@ -1,10 +1,10 @@
CT_EXPERIMENTAL=y
# CT_REMOVE_DOCS is not set
-CT_ARCH_nios2=y
+CT_ARCH_NIOS2=y
CT_STATIC_TOOLCHAIN=y
CT_TOOLCHAIN_BUGURL="https://bitbucket.org/netzimme/eax-gcc/issues?status=new&status=open"
CT_TARGET_VENDOR="spico"
CT_CANADIAN=y
CT_HOST="i686-w64-mingw32"
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
diff --git a/samples/i686-w64-mingw32/crosstool.config b/samples/i686-w64-mingw32/crosstool.config
index 4d2c99c..5ed39c0 100644
--- a/samples/i686-w64-mingw32/crosstool.config
+++ b/samples/i686-w64-mingw32/crosstool.config
@@ -1,8 +1,8 @@
CT_EXPERIMENTAL=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_ARCH="i686"
CT_TARGET_VENDOR="w64"
-CT_KERNEL_windows=y
+CT_KERNEL_WINDOWS=y
CT_BINUTILS_PLUGINS=y
CT_MINGW_DIRECTX=y
CT_MINGW_DDK=y
diff --git a/samples/m68k-unknown-elf/crosstool.config b/samples/m68k-unknown-elf/crosstool.config
index 9b93583..227d45b 100644
--- a/samples/m68k-unknown-elf/crosstool.config
+++ b/samples/m68k-unknown-elf/crosstool.config
@@ -1,9 +1,9 @@
-CT_ARCH_m68k=y
+CT_ARCH_M68K=y
CT_ARCH_CPU="cpu32"
CT_ARCH_BINFMT_FLAT=y
-CT_LIBC_none=y
+CT_LIBC_NONE=y
# CT_CC_GCC_USE_GRAPHITE is not set
# CT_CC_GCC_USE_LTO is not set
-CT_COMP_TOOLS_autoconf=y
-CT_COMP_TOOLS_automake=y
-CT_COMP_TOOLS_libtool=y
+CT_COMP_TOOLS_AUTOCONF=y
+CT_COMP_TOOLS_AUTOMAKE=y
+CT_COMP_TOOLS_LIBTOOL=y
diff --git a/samples/m68k-unknown-uclinux-uclibc/crosstool.config b/samples/m68k-unknown-uclinux-uclibc/crosstool.config
index ab0fbe5..61c37f1 100644
--- a/samples/m68k-unknown-uclinux-uclibc/crosstool.config
+++ b/samples/m68k-unknown-uclinux-uclibc/crosstool.config
@@ -1,3 +1,3 @@
-CT_ARCH_m68k=y
-CT_KERNEL_linux=y
+CT_ARCH_M68K=y
+CT_KERNEL_LINUX=y
CT_THREADS_LT=y
diff --git a/samples/mips-ar2315-linux-gnu/crosstool.config b/samples/mips-ar2315-linux-gnu/crosstool.config
index 55ae935..f9e79d7 100644
--- a/samples/mips-ar2315-linux-gnu/crosstool.config
+++ b/samples/mips-ar2315-linux-gnu/crosstool.config
@@ -1,12 +1,11 @@
-CT_ARCH_mips=y
-CT_ARCH_ARCH="4kc"
+CT_ARCH_MIPS=y
CT_ARCH_TUNE="4kc"
+CT_ARCH_ARCH="4kc"
CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="ar2315"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
CT_CC_GCC_mips_plt=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/mips-malta-linux-gnu/crosstool.config b/samples/mips-malta-linux-gnu/crosstool.config
index 624d01d..a063908 100644
--- a/samples/mips-malta-linux-gnu/crosstool.config
+++ b/samples/mips-malta-linux-gnu/crosstool.config
@@ -1,9 +1,8 @@
-CT_ARCH_mips=y
+CT_ARCH_MIPS=y
CT_TARGET_VENDOR="malta"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
CT_CC_GCC_mips_plt=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/mips-unknown-elf/crosstool.config b/samples/mips-unknown-elf/crosstool.config
index 658b3ef..133d27e 100644
--- a/samples/mips-unknown-elf/crosstool.config
+++ b/samples/mips-unknown-elf/crosstool.config
@@ -1,6 +1,6 @@
-CT_ARCH_mips=y
+CT_ARCH_MIPS=y
CT_ARCH_FLOAT_SW=y
-CT_LIBC_none=y
+CT_LIBC_NONE=y
CT_CC_GCC_mips_plt=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/mips-unknown-linux-uclibc/crosstool.config b/samples/mips-unknown-linux-uclibc/crosstool.config
index c693e8b..a4cd5ce 100644
--- a/samples/mips-unknown-linux-uclibc/crosstool.config
+++ b/samples/mips-unknown-linux-uclibc/crosstool.config
@@ -1,12 +1,11 @@
-CT_ARCH_mips=y
+CT_ARCH_MIPS=y
CT_ARCH_ARCH="mips1"
CT_ARCH_FLOAT_SW=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
-CT_LIBC_UCLIBC_WCHAR=y
+CT_LIBC_UCLIBC=y
CT_CC_GCC_mips_plt=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/mips64el-multilib-linux-uclibc/crosstool.config b/samples/mips64el-multilib-linux-uclibc/crosstool.config
index f4d8e66..faeab87 100644
--- a/samples/mips64el-multilib-linux-uclibc/crosstool.config
+++ b/samples/mips64el-multilib-linux-uclibc/crosstool.config
@@ -1,12 +1,12 @@
-CT_ARCH_mips=y
+CT_ARCH_MIPS=y
CT_MULTILIB=y
CT_ARCH_LE=y
CT_ARCH_64=y
CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="multilib"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
+CT_LIBC_UCLIBC=y
CT_LIBC_UCLIBC_WCHAR=y
CT_CC_GCC_mips_plt=y
CT_CC_LANG_CXX=y
diff --git a/samples/mipsel-multilib-linux-gnu/crosstool.config b/samples/mipsel-multilib-linux-gnu/crosstool.config
index 6f767a3..9257801 100644
--- a/samples/mipsel-multilib-linux-gnu/crosstool.config
+++ b/samples/mipsel-multilib-linux-gnu/crosstool.config
@@ -1,17 +1,16 @@
-CT_ARCH_mips=y
+CT_ARCH_MIPS=y
CT_MULTILIB=y
CT_ARCH_LE=y
CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="multilib"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="--enable-targets=all"
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--enable-targets=all"
CT_CC_GCC_mips_plt=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
-CT_DEBUG_strace=y
+CT_DEBUG_STRACE=y
diff --git a/samples/mipsel-sde-elf/crosstool.config b/samples/mipsel-sde-elf/crosstool.config
index f5cac25..8e89c90 100644
--- a/samples/mipsel-sde-elf/crosstool.config
+++ b/samples/mipsel-sde-elf/crosstool.config
@@ -1,8 +1,8 @@
-CT_ARCH_mips=y
+CT_ARCH_MIPS=y
CT_ARCH_LE=y
CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="sde"
-CT_LIBC_none=y
+CT_LIBC_NONE=y
# CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/mipsel-unknown-linux-gnu/crosstool.config b/samples/mipsel-unknown-linux-gnu/crosstool.config
index 11320bf..5458b7e 100644
--- a/samples/mipsel-unknown-linux-gnu/crosstool.config
+++ b/samples/mipsel-unknown-linux-gnu/crosstool.config
@@ -1,14 +1,13 @@
-CT_ARCH_mips=y
+CT_ARCH_MIPS=y
CT_ARCH_LE=y
CT_ARCH_ARCH="mips1"
CT_ARCH_FLOAT_SW=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
CT_CC_GCC_mips_plt=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
-CT_DEBUG_strace=y
+CT_DEBUG_STRACE=y
diff --git a/samples/msp430-unknown-elf/crosstool.config b/samples/msp430-unknown-elf/crosstool.config
index 5e979e1..52c53ba 100644
--- a/samples/msp430-unknown-elf/crosstool.config
+++ b/samples/msp430-unknown-elf/crosstool.config
@@ -1,4 +1,4 @@
CT_EXPERIMENTAL=y
-CT_ARCH_msp430=y
-CT_CC_GCC_V_4_9_4=y
-CT_DEBUG_gdb=y
+CT_ARCH_MSP430=y
+CT_GCC_V_4_9_4=y
+CT_DEBUG_GDB=y
diff --git a/samples/nios2-altera-linux-gnu/crosstool.config b/samples/nios2-altera-linux-gnu/crosstool.config
new file mode 100644
index 0000000..0b87b57
--- /dev/null
+++ b/samples/nios2-altera-linux-gnu/crosstool.config
@@ -0,0 +1,7 @@
+CT_ARCH_NIOS2=y
+CT_ARCH_USE_MMU=y
+CT_TARGET_VENDOR="altera"
+CT_KERNEL_LINUX=y
+CT_CC_LANG_CXX=y
+CT_DEBUG_GDB=y
+# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/nios2-altera-linux-gnu/reported.by b/samples/nios2-altera-linux-gnu/reported.by
new file mode 100644
index 0000000..52814ae
--- /dev/null
+++ b/samples/nios2-altera-linux-gnu/reported.by
@@ -0,0 +1,3 @@
+reporter_name="makoehr@github"
+reporter_url=""
+reporter_comment="Sample configuration for Altera NIOS II with MMU."
diff --git a/samples/nios2-unknown-elf/crosstool.config b/samples/nios2-unknown-elf/crosstool.config
new file mode 100644
index 0000000..1657309
--- /dev/null
+++ b/samples/nios2-unknown-elf/crosstool.config
@@ -0,0 +1,4 @@
+CT_ARCH_NIOS2=y
+CT_CC_LANG_CXX=y
+CT_DEBUG_GDB=y
+# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/nios2-unknown-elf/reported.by b/samples/nios2-unknown-elf/reported.by
new file mode 100644
index 0000000..4347939
--- /dev/null
+++ b/samples/nios2-unknown-elf/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Kirill K. Smirnov"
+reporter_url=""
+reporter_comment="Toolchain for NIOS2 bare metal targets"
diff --git a/samples/powerpc-405-linux-gnu/crosstool.config b/samples/powerpc-405-linux-gnu/crosstool.config
index eeddbac..0e22d92 100644
--- a/samples/powerpc-405-linux-gnu/crosstool.config
+++ b/samples/powerpc-405-linux-gnu/crosstool.config
@@ -1,9 +1,9 @@
-CT_ARCH_powerpc=y
+CT_ARCH_POWERPC=y
CT_ARCH_CPU="405"
CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="405"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/powerpc-860-linux-gnu/crosstool.config b/samples/powerpc-860-linux-gnu/crosstool.config
index eae5f91..6f1db15 100644
--- a/samples/powerpc-860-linux-gnu/crosstool.config
+++ b/samples/powerpc-860-linux-gnu/crosstool.config
@@ -1,10 +1,10 @@
-CT_ARCH_powerpc=y
+CT_ARCH_POWERPC=y
CT_ARCH_CPU="860"
CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="860"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY="--without-fp"
+CT_GLIBC_EXTRA_CONFIG_ARRAY="--without-fp"
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/powerpc-e300c3-linux-gnu/crosstool.config b/samples/powerpc-e300c3-linux-gnu/crosstool.config
index 8cdef71..53ad00c 100644
--- a/samples/powerpc-e300c3-linux-gnu/crosstool.config
+++ b/samples/powerpc-e300c3-linux-gnu/crosstool.config
@@ -1,7 +1,7 @@
-CT_ARCH_powerpc=y
+CT_ARCH_POWERPC=y
CT_ARCH_CPU="e300c3"
CT_TARGET_VENDOR="e300c3"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
# CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set
CT_CC_LANG_CXX=y
diff --git a/samples/powerpc-e500v2-linux-gnuspe/crosstool.config b/samples/powerpc-e500v2-linux-gnuspe/crosstool.config
index d05e2b4..aab2632 100644
--- a/samples/powerpc-e500v2-linux-gnuspe/crosstool.config
+++ b/samples/powerpc-e500v2-linux-gnuspe/crosstool.config
@@ -1,16 +1,15 @@
-CT_ARCH_powerpc=y
+CT_ARCH_POWERPC=y
CT_ARCH_CPU="8548"
+CT_ARCH_powerpc_ABI_SPE=y
CT_ARCH_FLOAT_SW=y
CT_TARGET_CFLAGS="-mfloat-gprs=double -Wa,-me500x2"
-CT_ARCH_powerpc_ABI_SPE=y
CT_TARGET_VENDOR="e500v2"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_EXTRA_CONFIG_ARRAY="--enable-spe=yes --enable-e500x2 --with-e500x2"
-CT_CC_GCC_SHOW_LINARO=y
CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="--enable-e500_double"
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--enable-e500_double"
# CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set
CT_CC_GCC_LDBL_128=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/powerpc-unknown-linux-gnu/crosstool.config b/samples/powerpc-unknown-linux-gnu/crosstool.config
index 8fbfb0b..29bedbf 100644
--- a/samples/powerpc-unknown-linux-gnu/crosstool.config
+++ b/samples/powerpc-unknown-linux-gnu/crosstool.config
@@ -1,9 +1,9 @@
-CT_ARCH_powerpc=y
-CT_KERNEL_linux=y
+CT_ARCH_POWERPC=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
-CT_DEBUG_strace=y
+CT_DEBUG_STRACE=y
diff --git a/samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/crosstool.config b/samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/crosstool.config
index 5225b61..749e26d 100644
--- a/samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/crosstool.config
+++ b/samples/powerpc-unknown-linux-uclibc,m68k-unknown-uclinux-uclibc/crosstool.config
@@ -1,7 +1,7 @@
-CT_ARCH_m68k=y
+CT_ARCH_M68K=y
CT_CANADIAN=y
CT_HOST="powerpc-unknown-linux-uclibc"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_THREADS_LT=y
# CT_LIBICONV is not set
# CT_GETTEXT is not set
diff --git a/samples/powerpc-unknown-linux-uclibc/crosstool.config b/samples/powerpc-unknown-linux-uclibc/crosstool.config
index 5dddeeb..e0f6dcb 100644
--- a/samples/powerpc-unknown-linux-uclibc/crosstool.config
+++ b/samples/powerpc-unknown-linux-uclibc/crosstool.config
@@ -1,12 +1,11 @@
-CT_ARCH_powerpc=y
+CT_ARCH_POWERPC=y
CT_ARCH_FLOAT_SW=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_FOR_TARGET=y
-CT_LIBC_uClibc=y
-CT_LIBC_UCLIBC_WCHAR=y
+CT_LIBC_UCLIBC=y
CT_CC_LANG_CXX=y
CT_CC_LANG_FORTRAN=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
CT_GDB_NATIVE=y
-CT_DEBUG_strace=y
+CT_DEBUG_STRACE=y
diff --git a/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config b/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config
index 4b0dc05..b42fa3b 100644
--- a/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config
+++ b/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config
@@ -1,9 +1,9 @@
-CT_ARCH_powerpc=y
+CT_ARCH_POWERPC=y
CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="unknown_nofpu"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
-CT_DEBUG_strace=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
+CT_DEBUG_STRACE=y
diff --git a/samples/powerpc64-multilib-linux-gnu/crosstool.config b/samples/powerpc64-multilib-linux-gnu/crosstool.config
index d59aa5a..d89a262 100644
--- a/samples/powerpc64-multilib-linux-gnu/crosstool.config
+++ b/samples/powerpc64-multilib-linux-gnu/crosstool.config
@@ -1,10 +1,10 @@
-CT_ARCH_powerpc=y
+CT_ARCH_POWERPC=y
CT_MULTILIB=y
CT_ARCH_64=y
CT_TARGET_VENDOR="multilib"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
diff --git a/samples/powerpc64-unknown-linux-gnu/crosstool.config b/samples/powerpc64-unknown-linux-gnu/crosstool.config
index 15cb99b..bbe8d5b 100644
--- a/samples/powerpc64-unknown-linux-gnu/crosstool.config
+++ b/samples/powerpc64-unknown-linux-gnu/crosstool.config
@@ -1,8 +1,8 @@
-CT_ARCH_powerpc=y
+CT_ARCH_POWERPC=y
CT_ARCH_64=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
diff --git a/samples/powerpc64le-unknown-linux-gnu/crosstool.config b/samples/powerpc64le-unknown-linux-gnu/crosstool.config
index 9f8245e..21b9e8c 100644
--- a/samples/powerpc64le-unknown-linux-gnu/crosstool.config
+++ b/samples/powerpc64le-unknown-linux-gnu/crosstool.config
@@ -1,9 +1,9 @@
-CT_ARCH_powerpc=y
+CT_ARCH_POWERPC=y
CT_ARCH_LE=y
CT_ARCH_64=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_NATIVE=y
diff --git a/samples/s390-ibm-linux-gnu/crosstool.config b/samples/s390-ibm-linux-gnu/crosstool.config
index 2312934..8648aa5 100644
--- a/samples/s390-ibm-linux-gnu/crosstool.config
+++ b/samples/s390-ibm-linux-gnu/crosstool.config
@@ -1,5 +1,5 @@
CT_EXPERIMENTAL=y
-CT_ARCH_s390=y
-CT_KERNEL_linux=y
+CT_ARCH_S390=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
CT_CC_LANG_CXX=y
diff --git a/samples/s390x-ibm-linux-gnu/crosstool.config b/samples/s390x-ibm-linux-gnu/crosstool.config
index 97afa2e..32f06c0 100644
--- a/samples/s390x-ibm-linux-gnu/crosstool.config
+++ b/samples/s390x-ibm-linux-gnu/crosstool.config
@@ -1,5 +1,5 @@
-CT_ARCH_s390=y
+CT_ARCH_S390=y
CT_ARCH_64=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_PLUGINS=y
CT_CC_LANG_CXX=y
diff --git a/samples/sh-multilib-linux-gnu/crosstool.config b/samples/sh-multilib-linux-gnu/crosstool.config
new file mode 100644
index 0000000..9fe6e41
--- /dev/null
+++ b/samples/sh-multilib-linux-gnu/crosstool.config
@@ -0,0 +1,10 @@
+CT_ARCH_SH=y
+CT_ARCH_CPU="sh4"
+CT_ARCH_LE_BE=y
+CT_TARGET_VENDOR="multilib"
+CT_KERNEL_LINUX=y
+CT_BINUTILS_PLUGINS=y
+CT_CC_GCC_MULTILIB_LIST="m4-nofpu,m4a,m3"
+CT_CC_LANG_CXX=y
+CT_DEBUG_GDB=y
+# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/sh4-multilib-linux-gnu/reported.by b/samples/sh-multilib-linux-gnu/reported.by
index f03f2c5..f03f2c5 100644
--- a/samples/sh4-multilib-linux-gnu/reported.by
+++ b/samples/sh-multilib-linux-gnu/reported.by
diff --git a/samples/sh-multilib-linux-uclibc/crosstool.config b/samples/sh-multilib-linux-uclibc/crosstool.config
new file mode 100644
index 0000000..66caf04
--- /dev/null
+++ b/samples/sh-multilib-linux-uclibc/crosstool.config
@@ -0,0 +1,11 @@
+CT_ARCH_SH=y
+CT_ARCH_CPU="sh4"
+CT_ARCH_LE_BE=y
+CT_TARGET_VENDOR="multilib"
+CT_KERNEL_LINUX=y
+CT_BINUTILS_PLUGINS=y
+CT_LIBC_UCLIBC=y
+CT_CC_GCC_MULTILIB_LIST="sh3,sh4,sh4a,sh4a-nofpu"
+CT_CC_LANG_CXX=y
+CT_DEBUG_GDB=y
+# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/sh4-multilib-linux-uclibc/reported.by b/samples/sh-multilib-linux-uclibc/reported.by
index 2d3a629..2d3a629 100644
--- a/samples/sh4-multilib-linux-uclibc/reported.by
+++ b/samples/sh-multilib-linux-uclibc/reported.by
diff --git a/samples/sh-unknown-elf/crosstool.config b/samples/sh-unknown-elf/crosstool.config
new file mode 100644
index 0000000..9387a51
--- /dev/null
+++ b/samples/sh-unknown-elf/crosstool.config
@@ -0,0 +1,5 @@
+CT_ARCH_SH=y
+CT_ARCH_LE_BE=y
+CT_BINUTILS_PLUGINS=y
+CT_CC_LANG_CXX=y
+CT_GETTEXT=y
diff --git a/samples/sh-unknown-elf/reported.by b/samples/sh-unknown-elf/reported.by
new file mode 100644
index 0000000..0435479
--- /dev/null
+++ b/samples/sh-unknown-elf/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Alexey Neyman"
+reporter_url=""
+reporter_comment="Sample SuperH/baremetal configuration with all default multilibs."
diff --git a/samples/sh4-multilib-linux-gnu/crosstool.config b/samples/sh4-multilib-linux-gnu/crosstool.config
deleted file mode 100644
index 2055126..0000000
--- a/samples/sh4-multilib-linux-gnu/crosstool.config
+++ /dev/null
@@ -1,9 +0,0 @@
-CT_ARCH_sh=y
-CT_ARCH_SH_SH4=y
-CT_TARGET_VENDOR="multilib"
-CT_KERNEL_linux=y
-CT_BINUTILS_PLUGINS=y
-CT_CC_GCC_MULTILIB_LIST="m4a"
-CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
-# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/sh4-multilib-linux-uclibc/crosstool.config b/samples/sh4-multilib-linux-uclibc/crosstool.config
deleted file mode 100644
index 2c61643..0000000
--- a/samples/sh4-multilib-linux-uclibc/crosstool.config
+++ /dev/null
@@ -1,11 +0,0 @@
-CT_ARCH_sh=y
-CT_ARCH_SH_SH4=y
-CT_TARGET_VENDOR="multilib"
-CT_KERNEL_linux=y
-CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
-CT_CC_GCC_V_4_9_4=y
-CT_CC_GCC_MULTILIB_LIST="m4a,m3"
-CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
-# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/sh4-unknown-linux-gnu/crosstool.config b/samples/sh4-unknown-linux-gnu/crosstool.config
deleted file mode 100644
index 0972f31..0000000
--- a/samples/sh4-unknown-linux-gnu/crosstool.config
+++ /dev/null
@@ -1,7 +0,0 @@
-CT_ARCH_sh=y
-CT_ARCH_SH_SH4=y
-CT_KERNEL_linux=y
-CT_BINUTILS_PLUGINS=y
-CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
-# CT_GDB_CROSS_PYTHON is not set
diff --git a/samples/sh4-unknown-linux-gnu/reported.by b/samples/sh4-unknown-linux-gnu/reported.by
deleted file mode 100644
index 4e2eae7..0000000
--- a/samples/sh4-unknown-linux-gnu/reported.by
+++ /dev/null
@@ -1,3 +0,0 @@
-reporter_name="YEM"
-reporter_url="http://ymorin.is-a-geek.org/"
-reporter_comment="EXPERIMENTAL Super-H sh4 sample."
diff --git a/samples/sparc-leon-linux-uclibc/crosstool.config b/samples/sparc-leon-linux-uclibc/crosstool.config
index 02c346d..20612d8 100644
--- a/samples/sparc-leon-linux-uclibc/crosstool.config
+++ b/samples/sparc-leon-linux-uclibc/crosstool.config
@@ -1,15 +1,14 @@
-CT_ARCH_sparc=y
+CT_ARCH_SPARC=y
CT_ARCH_CPU="leon"
CT_ARCH_TUNE="leon"
CT_ARCH_FLOAT_SW=y
CT_TARGET_VENDOR="leon"
-CT_KERNEL_linux=y
-CT_KERNEL_V_3_10=y
-CT_LIBC_uClibc=y
-CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/samples/${CT_TARGET}/uClibc.config"
+CT_KERNEL_LINUX=y
+CT_LINUX_V_3_10=y
+CT_LIBC_UCLIBC=y
+CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/samples/${CT_TARGET}/${CT_LIBC}.config"
CT_LIBC_UCLIBC_IPV6=y
-CT_LIBC_UCLIBC_WCHAR=y
-CT_CC_GCC_V_6_3_0=y
+CT_GCC_V_6_4_0=y
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--disable-libitm"
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
diff --git a/samples/sparc-unknown-linux-gnu/crosstool.config b/samples/sparc-unknown-linux-gnu/crosstool.config
index 9590037..2b225c7 100644
--- a/samples/sparc-unknown-linux-gnu/crosstool.config
+++ b/samples/sparc-unknown-linux-gnu/crosstool.config
@@ -1,2 +1,2 @@
-CT_ARCH_sparc=y
-CT_KERNEL_linux=y
+CT_ARCH_SPARC=y
+CT_KERNEL_LINUX=y
diff --git a/samples/sparc64-multilib-linux-gnu/crosstool.config b/samples/sparc64-multilib-linux-gnu/crosstool.config
index 3cd2a30..7ee711f 100644
--- a/samples/sparc64-multilib-linux-gnu/crosstool.config
+++ b/samples/sparc64-multilib-linux-gnu/crosstool.config
@@ -1,5 +1,5 @@
-CT_ARCH_sparc=y
+CT_ARCH_SPARC=y
CT_MULTILIB=y
CT_ARCH_64=y
CT_TARGET_VENDOR="multilib"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
diff --git a/samples/x86_64-centos6-linux-gnu/crosstool.config b/samples/x86_64-centos6-linux-gnu/crosstool.config
index ad84a6c..6f0c10f 100644
--- a/samples/x86_64-centos6-linux-gnu/crosstool.config
+++ b/samples/x86_64-centos6-linux-gnu/crosstool.config
@@ -1,10 +1,9 @@
CT_OBSOLETE=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_64=y
CT_TARGET_VENDOR="centos6"
-CT_KERNEL_linux=y
-CT_KERNEL_V_2_6_32=y
-CT_LIBC_glibc=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_2_6_32=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
-CT_LIBC_GLIBC_V_2_12_2=y
+CT_GLIBC_V_2_12_2=y
CT_CC_LANG_CXX=y
diff --git a/samples/x86_64-centos7-linux-gnu/crosstool.config b/samples/x86_64-centos7-linux-gnu/crosstool.config
index 8ca023c..9d16c9e 100644
--- a/samples/x86_64-centos7-linux-gnu/crosstool.config
+++ b/samples/x86_64-centos7-linux-gnu/crosstool.config
@@ -1,10 +1,9 @@
CT_OBSOLETE=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_64=y
CT_TARGET_VENDOR="centos7"
-CT_KERNEL_linux=y
-CT_KERNEL_V_3_10=y
-CT_LIBC_glibc=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_3_10=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
-CT_LIBC_GLIBC_V_2_17=y
+CT_GLIBC_V_2_17=y
CT_CC_LANG_CXX=y
diff --git a/samples/x86_64-multilib-linux-gnu/crosstool.config b/samples/x86_64-multilib-linux-gnu/crosstool.config
index d3e5b63..5fc177c 100644
--- a/samples/x86_64-multilib-linux-gnu/crosstool.config
+++ b/samples/x86_64-multilib-linux-gnu/crosstool.config
@@ -1,15 +1,14 @@
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_MULTILIB=y
CT_ARCH_64=y
CT_TARGET_VENDOR="multilib"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
-CT_LIBC_GLIBC_KERNEL_VERSION_NONE=y
+CT_GLIBC_KERNEL_VERSION_NONE=y
CT_CC_GCC_MULTILIB_LIST="m64,m32,mx32"
CT_CC_GCC_LNK_HASH_STYLE_BOTH=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
diff --git a/samples/x86_64-multilib-linux-musl/crosstool.config b/samples/x86_64-multilib-linux-musl/crosstool.config
index 7725879..a24f96f 100644
--- a/samples/x86_64-multilib-linux-musl/crosstool.config
+++ b/samples/x86_64-multilib-linux-musl/crosstool.config
@@ -1,15 +1,15 @@
CT_EXPERIMENTAL=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_MULTILIB=y
CT_ARCH_64=y
CT_TARGET_VENDOR="multilib"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_musl=y
+CT_LIBC_MUSL=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
diff --git a/samples/x86_64-multilib-linux-uclibc,powerpc-unknown-elf/crosstool.config b/samples/x86_64-multilib-linux-uclibc,powerpc-unknown-elf/crosstool.config
index a243ac4..d5be28f 100644
--- a/samples/x86_64-multilib-linux-uclibc,powerpc-unknown-elf/crosstool.config
+++ b/samples/x86_64-multilib-linux-uclibc,powerpc-unknown-elf/crosstool.config
@@ -1,11 +1,10 @@
-CT_ARCH_powerpc=y
+CT_ARCH_POWERPC=y
CT_TARGET_VENDOR=""
CT_CANADIAN=y
CT_HOST="x86_64-multilib-linux-uclibc"
CT_BINUTILS_PLUGINS=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
-# CT_GDB_CROSS_PYTHON is not set
+CT_DEBUG_GDB=y
CT_COMP_TOOLS_FOR_HOST=y
-CT_COMP_TOOLS_m4=y
-CT_COMP_TOOLS_make=y
+CT_COMP_TOOLS_M4=y
+CT_COMP_TOOLS_MAKE=y
diff --git a/samples/x86_64-multilib-linux-uclibc/crosstool.config b/samples/x86_64-multilib-linux-uclibc/crosstool.config
index c2fa7fa..4e08f7c 100644
--- a/samples/x86_64-multilib-linux-uclibc/crosstool.config
+++ b/samples/x86_64-multilib-linux-uclibc/crosstool.config
@@ -1,16 +1,15 @@
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_MULTILIB=y
CT_ARCH_64=y
CT_TARGET_VENDOR="multilib"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
-CT_LIBC_UCLIBC_WCHAR=y
+CT_LIBC_UCLIBC=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
CT_GDB_NATIVE=y
diff --git a/samples/x86_64-ubuntu12.04-linux-gnu/crosstool.config b/samples/x86_64-ubuntu12.04-linux-gnu/crosstool.config
index 3e2bc3f..f71ad6d 100644
--- a/samples/x86_64-ubuntu12.04-linux-gnu/crosstool.config
+++ b/samples/x86_64-ubuntu12.04-linux-gnu/crosstool.config
@@ -1,10 +1,9 @@
CT_OBSOLETE=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_64=y
CT_TARGET_VENDOR="ubuntu12.04"
-CT_KERNEL_linux=y
-CT_KERNEL_V_3_2=y
-CT_LIBC_glibc=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_3_2=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
-CT_LIBC_GLIBC_V_2_15=y
+CT_GLIBC_V_2_15=y
CT_CC_LANG_CXX=y
diff --git a/samples/x86_64-ubuntu14.04-linux-gnu/crosstool.config b/samples/x86_64-ubuntu14.04-linux-gnu/crosstool.config
index 4aa16c7..e7bfcd3 100644
--- a/samples/x86_64-ubuntu14.04-linux-gnu/crosstool.config
+++ b/samples/x86_64-ubuntu14.04-linux-gnu/crosstool.config
@@ -1,10 +1,9 @@
CT_OBSOLETE=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_64=y
CT_TARGET_VENDOR="ubuntu14.04"
-CT_KERNEL_linux=y
-CT_KERNEL_V_3_13=y
-CT_LIBC_glibc=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_3_13=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
-CT_LIBC_GLIBC_V_2_19=y
+CT_GLIBC_V_2_19=y
CT_CC_LANG_CXX=y
diff --git a/samples/x86_64-ubuntu16.04-linux-gnu/crosstool.config b/samples/x86_64-ubuntu16.04-linux-gnu/crosstool.config
index 37be385..2a7fc1d 100644
--- a/samples/x86_64-ubuntu16.04-linux-gnu/crosstool.config
+++ b/samples/x86_64-ubuntu16.04-linux-gnu/crosstool.config
@@ -1,10 +1,9 @@
CT_OBSOLETE=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_64=y
CT_TARGET_VENDOR="ubuntu16.04"
-CT_KERNEL_linux=y
-CT_KERNEL_V_4_4=y
-CT_LIBC_glibc=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_4_4=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
-CT_LIBC_GLIBC_V_2_23=y
+CT_GLIBC_V_2_23=y
CT_CC_LANG_CXX=y
diff --git a/samples/x86_64-unknown-linux-gnu/crosstool.config b/samples/x86_64-unknown-linux-gnu/crosstool.config
index 3f7c338..c3518a1 100644
--- a/samples/x86_64-unknown-linux-gnu/crosstool.config
+++ b/samples/x86_64-unknown-linux-gnu/crosstool.config
@@ -1,12 +1,11 @@
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_64=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_glibc=y
-CT_LIBC_GLIBC_KERNEL_VERSION_NONE=y
+CT_GLIBC_KERNEL_VERSION_NONE=y
CT_CC_GCC_LNK_HASH_STYLE_BOTH=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
diff --git a/samples/x86_64-unknown-linux-uclibc/crosstool.config b/samples/x86_64-unknown-linux-uclibc/crosstool.config
index 1cf57fb..6b2eb17 100644
--- a/samples/x86_64-unknown-linux-uclibc/crosstool.config
+++ b/samples/x86_64-unknown-linux-uclibc/crosstool.config
@@ -1,14 +1,13 @@
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_64=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
-CT_LIBC_uClibc=y
-CT_LIBC_UCLIBC_WCHAR=y
+CT_LIBC_UCLIBC=y
CT_CC_LANG_CXX=y
-CT_DEBUG_duma=y
-CT_DEBUG_gdb=y
+CT_DEBUG_DUMA=y
+CT_DEBUG_GDB=y
CT_GDB_NATIVE=y
diff --git a/samples/x86_64-w64-mingw32,arm-cortexa9_neon-linux-gnueabihf/crosstool.config b/samples/x86_64-w64-mingw32,arm-cortexa9_neon-linux-gnueabihf/crosstool.config
index 34d1ea1..2fc67d9 100644
--- a/samples/x86_64-w64-mingw32,arm-cortexa9_neon-linux-gnueabihf/crosstool.config
+++ b/samples/x86_64-w64-mingw32,arm-cortexa9_neon-linux-gnueabihf/crosstool.config
@@ -1,5 +1,5 @@
CT_EXPERIMENTAL=y
-CT_ARCH_arm=y
+CT_ARCH_ARM=y
CT_ARCH_CPU="cortex-a9"
CT_ARCH_FPU="neon"
CT_ARCH_FLOAT_HW=y
@@ -7,18 +7,16 @@ CT_TARGET_VENDOR="cortexa9_neon"
CT_CANADIAN=y
CT_HOST="x86_64-w64-mingw32"
CT_TOOLCHAIN_ENABLE_NLS=y
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
-CT_LIBC_glibc=y
-CT_LIBC_ADDONS_LIST="libidn"
-CT_LIBC_LOCALES=y
-CT_LIBC_GLIBC_KERNEL_VERSION_NONE=y
-CT_CC_GCC_SHOW_LINARO=y
+CT_LIBC_GLIBC=y
+CT_GLIBC_USE_LIBIDN_ADDON=y
+CT_GLIBC_LOCALES=y
+CT_GLIBC_KERNEL_VERSION_NONE=y
# CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
-# CT_GDB_CROSS_PYTHON is not set
+CT_DEBUG_GDB=y
CT_GDB_NATIVE=y
CT_GDB_NATIVE_STATIC=y
diff --git a/samples/x86_64-w64-mingw32,x86_64-pc-linux-gnu/crosstool.config b/samples/x86_64-w64-mingw32,x86_64-pc-linux-gnu/crosstool.config
index efd43a0..f10a91a 100644
--- a/samples/x86_64-w64-mingw32,x86_64-pc-linux-gnu/crosstool.config
+++ b/samples/x86_64-w64-mingw32,x86_64-pc-linux-gnu/crosstool.config
@@ -1,18 +1,18 @@
CT_EXPERIMENTAL=y
# CT_STRIP_HOST_TOOLCHAIN_EXECUTABLES is not set
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_ARCH_64=y
CT_TARGET_VENDOR="pc"
CT_CANADIAN=y
CT_HOST="x86_64-w64-mingw32"
-CT_KERNEL_linux=y
+CT_KERNEL_LINUX=y
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_FOR_TARGET=y
-CT_LIBC_glibc=y
+CT_LIBC_GLIBC=y
CT_CC_LANG_CXX=y
-CT_DEBUG_ltrace=y
-CT_DEBUG_strace=y
-CT_COMP_TOOLS_libtool=y
-CT_COMP_TOOLS_make=y
+CT_DEBUG_LTRACE=y
+CT_DEBUG_STRACE=y
+CT_COMP_TOOLS_LIBTOOL=y
+CT_COMP_TOOLS_MAKE=y
diff --git a/samples/x86_64-w64-mingw32/crosstool.config b/samples/x86_64-w64-mingw32/crosstool.config
index 253cb1c..eda9c67 100644
--- a/samples/x86_64-w64-mingw32/crosstool.config
+++ b/samples/x86_64-w64-mingw32/crosstool.config
@@ -1,9 +1,9 @@
CT_EXPERIMENTAL=y
-CT_ARCH_x86=y
+CT_ARCH_X86=y
CT_MULTILIB=y
CT_ARCH_64=y
CT_TARGET_VENDOR="w64"
-CT_KERNEL_windows=y
+CT_KERNEL_WINDOWS=y
CT_BINUTILS_PLUGINS=y
CT_MINGW_DIRECTX=y
CT_MINGW_DDK=y
diff --git a/samples/xtensa-fsf-linux-uclibc/crosstool.config b/samples/xtensa-fsf-linux-uclibc/crosstool.config
index ab82294..92f0388 100644
--- a/samples/xtensa-fsf-linux-uclibc/crosstool.config
+++ b/samples/xtensa-fsf-linux-uclibc/crosstool.config
@@ -1,9 +1,8 @@
-CT_ARCH_xtensa=y
+CT_ARCH_XTENSA=y
CT_ARCH_BE=y
CT_TARGET_CFLAGS="-mlongcalls -mtext-section-literals"
CT_TARGET_VENDOR="fsf"
-CT_KERNEL_linux=y
-CT_LIBC_uClibc=y
-CT_LIBC_UCLIBC_WCHAR=y
+CT_KERNEL_LINUX=y
+CT_LIBC_UCLIBC=y
CT_CC_LANG_CXX=y
-CT_DEBUG_gdb=y
+CT_DEBUG_GDB=y
diff --git a/scripts/build/arch.sh b/scripts/build/arch.sh
index 5a8d84c..de3e3c9 100644
--- a/scripts/build/arch.sh
+++ b/scripts/build/arch.sh
@@ -22,6 +22,12 @@ CT_DoArchGlibcAdjustTuple() {
:;
}
+# Multilib: Adjust configure arguments for GLIBC
+# Usage: CT_DoArchGlibcAdjustConfigure <configure-args-array-name> <cflags>
+CT_DoArchGlibcAdjustConfigure() {
+ :;
+}
+
# Helper for uClibc configurators: select the architecture
# Usage: CT_DoArchUClibcSelectArch <config-file> <architecture>
CT_DoArchUClibcSelectArch() {
diff --git a/scripts/build/arch/arm.sh b/scripts/build/arch/arm.sh
index 8733ac3..7433c92 100644
--- a/scripts/build/arch/arm.sh
+++ b/scripts/build/arch/arm.sh
@@ -15,10 +15,10 @@ CT_DoArchTupleValues() {
# The system part of the tuple:
case "${CT_LIBC},${CT_ARCH_ARM_EABI}" in
- *glibc,y) CT_TARGET_SYS=gnueabi;;
+ glibc,y) CT_TARGET_SYS=gnueabi;;
uClibc,y) CT_TARGET_SYS=uclibc${CT_LIBC_UCLIBC_USE_GNU_SUFFIX:+gnu}eabi;;
musl,y) CT_TARGET_SYS=musleabi;;
- bionic,y) CT_TARGET_SYS=android;;
+ bionic,y) CT_TARGET_SYS=androideabi;;
*,y) CT_TARGET_SYS=eabi;;
esac
diff --git a/scripts/build/arch/microblaze.sh b/scripts/build/arch/microblaze.sh
index e9d9811..5b85012 100644
--- a/scripts/build/arch/microblaze.sh
+++ b/scripts/build/arch/microblaze.sh
@@ -3,21 +3,6 @@
CT_DoArchTupleValues () {
# The architecture part of the tuple:
CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_SUFFIX:-${target_endian_el}}"
-
- # gcc ./configure flags
- CT_ARCH_WITH_ARCH=
- CT_ARCH_WITH_ABI=
- CT_ARCH_WITH_CPU=
- CT_ARCH_WITH_TUNE=
- CT_ARCH_WITH_FPU=
- CT_ARCH_WITH_FLOAT=
-
- # CFLAGS
- case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
- y,) CT_ARCH_FLOAT_CFLAG="-mhard-float" ;;
- ,y) CT_ARCH_FLOAT_CFLAG="-msoft-float" ;;
- esac
-
}
CT_DoArchUClibcConfig() {
diff --git a/scripts/build/arch/nios2.sh b/scripts/build/arch/nios2.sh
index 24c556b..afd73ec 100644
--- a/scripts/build/arch/nios2.sh
+++ b/scripts/build/arch/nios2.sh
@@ -1,12 +1,6 @@
# Compute NIOS2-specific values
CT_DoArchTupleValues() {
- # gcc ./configure flags
- CT_ARCH_WITH_ARCH=
- CT_ARCH_WITH_ABI=
- CT_ARCH_WITH_CPU=
- CT_ARCH_WITH_TUNE=
- CT_ARCH_WITH_FPU=
- CT_ARCH_WITH_FLOAT=
- CT_TARGET_SYS=elf
+ # Do nothing here. Default values are sane.
+ :;
}
diff --git a/scripts/build/arch/sh.sh b/scripts/build/arch/sh.sh
index 59bc08a..1911b20 100644
--- a/scripts/build/arch/sh.sh
+++ b/scripts/build/arch/sh.sh
@@ -4,36 +4,29 @@ CT_DoArchTupleValues () {
# The architecture part of the tuple:
CT_TARGET_ARCH="${CT_ARCH_SH_VARIANT}${CT_ARCH_SUFFIX:-${target_endian_eb}}"
- # gcc ./configure flags
- CT_ARCH_WITH_ARCH=
- CT_ARCH_WITH_ABI=
- CT_ARCH_WITH_CPU=
- CT_ARCH_WITH_TUNE=
- CT_ARCH_WITH_FPU=
- CT_ARCH_WITH_FLOAT=
-
- # Endianness stuff
+ # Endianness stuff (uses non-standard CFLAGS). If both are compiled, let the
+ # compiler's default or multilib iterator be used.
case "${CT_ARCH_ENDIAN}" in
big) CT_ARCH_ENDIAN_CFLAG=-mb;;
little) CT_ARCH_ENDIAN_CFLAG=-ml;;
esac
- # CFLAGS
+ # Instead of -m{soft,hard}-float, uses CPU type
+ CT_ARCH_FLOAT_CFLAG=
case "${CT_ARCH_SH_VARIANT}" in
sh3) CT_ARCH_ARCH_CFLAG=-m3;;
- sh4*)
+ sh4*|sh2*)
# softfp is not possible for SuperH, no need to test for it.
case "${CT_ARCH_FLOAT}" in
hard)
- CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}"
+ CT_ARCH_ARCH_CFLAG="-m${CT_ARCH_SH_VARIANT##sh}"
;;
soft)
- CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}-nofpu"
+ CT_ARCH_ARCH_CFLAG="-m${CT_ARCH_SH_VARIANT##sh}-nofpu"
;;
esac
;;
esac
- CT_ARCH_FLOAT_CFLAG=
}
CT_DoArchMultilibList() {
@@ -45,13 +38,19 @@ CT_DoArchMultilibList() {
# the default CPU. E.g. if configuring for sh4-*-*, we need to remove
# "sh4" or "m4" from the multilib list. Otherwise, the resulting compiler
# will fail when that CPU is selected explicitly "sh4-multilib-linux-gnu-gcc -m4 ..."
- # as it will fail to find the sysroot with that suffix.
+ # as it will fail to find the sysroot with that suffix. This applies to both
+ # the CPU type inferred from the target tuple (CT_ARCH_SH_VARIANT) as well as
+ # the default CPU configured with --with-cpu (CT_ARCH_CPU).
IFS=,
for x in ${CT_CC_GCC_MULTILIB_LIST}; do
if [ "${x}" = "${CT_ARCH_SH_VARIANT}" -o "sh${x#m}" = "${CT_ARCH_SH_VARIANT}" ]; then
CT_DoLog WARN "Ignoring '${x}' in multilib list: it is the default multilib"
continue
fi
+ if [ "${x}" = "${CT_ARCH_CPU}" -o "sh${x#m}" = "${CT_ARCH_CPU}" ]; then
+ CT_DoLog WARN "Ignoring '${x}' in multilib list: it is the default multilib"
+ continue
+ fi
new="${new:+${new},}${x}"
done
IFS="${save_ifs}"
@@ -59,15 +58,110 @@ CT_DoArchMultilibList() {
CT_DoLog DEBUG "Adjusted CT_CC_GCC_MULTILIB_LIST to '${CT_CC_GCC_MULTILIB_LIST}'"
}
+#------------------------------------------------------------------------------
+# Get multilib architecture-specific target
+# Usage: CT_DoArchMultilibTarget "target variable" "multilib flags"
+CT_DoArchMultilibTarget ()
+{
+ local target_var="${1}"; shift
+ local -a multi_flags=( "$@" )
+ local target_
+ local newcpu
+
+ for m in "${multi_flags[@]}"; do
+ case "${m}" in
+ -m4*) newcpu=sh4;;
+ -m3*) newcpu=sh3;;
+ -m2*) newcpu=sh2;;
+ -m1*) newcpu=sh1;;
+ esac
+ done
+
+ eval target_=\"\${${target_var}}\"
+
+ # Strip CPU name and append the new one if an option has been seen.
+ if [ -n "${newcpu}" ]; then
+ target_="${newcpu}-${target_#*-}"
+ fi
+
+ # Set the target variable
+ eval ${target_var}=\"${target_}\"
+}
+
+# Adjust target tuple for GLIBC
+CT_DoArchGlibcAdjustTuple() {
+ local target_var="${1}"
+ local target_
+
+ eval target_=\"\${${target_var}}\"
+
+ case "${target_}" in
+ sh-*)
+ # Glibc does not build unless configured with 'shX-*' tuple.
+ # Since we ended up here, no architecture variant has been
+ # specified, so the only source of default is CT_ARCH_CPU.
+ # GCC defaults to sh1, but this Glibc cannot compile for it.
+ if [ -n "${CT_ARCH_CPU}" ]; then
+ target_=${target_/#sh-/${CT_ARCH_CPU}-}
+ CT_DoLog DEBUG "Adjusted target tuple ${target_}"
+ else
+ CT_Abort "GNU C library cannot build for sh1 (GCC default). " \
+ "Specify architecture variant or the default CPU type."
+ fi
+ ;;
+ esac
+
+ # Set the target variable
+ eval ${target_var}=\"${target_}\"
+}
+
+# Multilib: Adjust configure arguments for GLIBC
+# Usage: CT_DoArchGlibcAdjustConfigure <configure-args-array-name> <cflags>
+CT_DoArchGlibcAdjustConfigure() {
+ local -a add_args
+ local array="${1}"
+ local cflags="${2}"
+ local opt
+
+ for opt in ${cflags}; do
+ case "${opt}" in
+ -m[1-5]*-nofpu)
+ add_args+=( "--without-fp" )
+ ;;
+ -m[1-5]*)
+ add_args+=( "--with-fp" )
+ ;;
+ esac
+ done
+
+ # If architecture variant was specified, we'd have CT_ARCH_ARCH_CFLAG
+ # and it would've been handled above. Our last resort: CT_ARCH_CPU
+ if [ "${#add_args[@]}" = 0 ]; then
+ case "${CT_ARCH_CPU}" in
+ sh[34]*-nofpu)
+ add_args+=( "--without-fp" )
+ ;;
+ sh[34]*)
+ add_args+=( "--with-fp" )
+ ;;
+ esac
+ fi
+
+ eval "${array}+=( \"\${add_args[@]}\" )"
+}
+
CT_DoArchUClibcConfig() {
local cfg="${1}"
- # FIXME: uclibc (!ng) seems to support sh64 (sh5), too
CT_DoArchUClibcSelectArch "${cfg}" "sh"
+ CT_KconfigDisableOption "CONFIG_SH2" "${cfg}"
+ CT_KconfigDisableOption "CONFIG_SH2A" "${cfg}"
CT_KconfigDisableOption "CONFIG_SH3" "${cfg}"
CT_KconfigDisableOption "CONFIG_SH4" "${cfg}"
CT_KconfigDisableOption "CONFIG_SH4A" "${cfg}"
case "${CT_ARCH_SH_VARIANT}" in
+ sh2) CT_KconfigEnableOption "CONFIG_SH2" "${cfg}";;
+ sh2a) CT_KconfigEnableOption "CONFIG_SH2A" "${cfg}";;
sh3) CT_KconfigEnableOption "CONFIG_SH3" "${cfg}";;
sh4) CT_KconfigEnableOption "CONFIG_SH4" "${cfg}";;
sh4a) CT_KconfigEnableOption "CONFIG_SH4A" "${cfg}";;
@@ -81,6 +175,36 @@ CT_DoArchUClibcCflags() {
for f in ${cflags}; do
case "${f}" in
+ -ml)
+ CT_KconfigDisableOption "ARCH_BIG_ENDIAN" "${dst}"
+ CT_KconfigDisableOption "ARCH_WANTS_BIG_ENDIAN" "${dst}"
+ CT_KconfigEnableOption "ARCH_LITTLE_ENDIAN" "${dst}"
+ CT_KconfigEnableOption "ARCH_WANTS_LITTLE_ENDIAN" "${dst}"
+ ;;
+ -mb)
+ CT_KconfigEnableOption "ARCH_BIG_ENDIAN" "${dst}"
+ CT_KconfigEnableOption "ARCH_WANTS_BIG_ENDIAN" "${dst}"
+ CT_KconfigDisableOption "ARCH_LITTLE_ENDIAN" "${dst}"
+ CT_KconfigDisableOption "ARCH_WANTS_LITTLE_ENDIAN" "${dst}"
+ ;;
+ -m2|-m2a|-m2a-nofpu|-m3|-m4|-m4-nofpu|-m4a|-m4a-nofpu)
+ CT_KconfigDisableOption "CONFIG_SH2" "${cfg}"
+ CT_KconfigDisableOption "CONFIG_SH2A" "${cfg}"
+ CT_KconfigDisableOption "CONFIG_SH3" "${cfg}"
+ CT_KconfigDisableOption "CONFIG_SH4" "${cfg}"
+ CT_KconfigDisableOption "CONFIG_SH4A" "${cfg}"
+ CT_KconfigDisableOption "UCLIBC_HAS_FPU" "${cfg}"
+ case "${f}" in
+ -m2)
+ CT_KconfigEnableOption "CONFIG_SH2" "${cfg}"
+ ;;
+ -m2a)
+ CT_KconfigEnableOption "CONFIG_SH2A" "${cfg}"
+ CT_KconfigEnableOption "UCLIBC_HAS_FPU" "${cfg}"
+ ;;
+ -m2a-nofpu)
+ CT_KconfigEnableOption "CONFIG_SH2A" "${cfg}"
+ ;;
-m3)
CT_KconfigEnableOption "CONFIG_SH3" "${cfg}"
;;
@@ -90,7 +214,6 @@ CT_DoArchUClibcCflags() {
;;
-m4-nofpu)
CT_KconfigEnableOption "CONFIG_SH4" "${cfg}"
- CT_KconfigDisableOption "UCLIBC_HAS_FPU" "${cfg}"
;;
-m4a)
CT_KconfigEnableOption "CONFIG_SH4A" "${cfg}"
@@ -98,8 +221,9 @@ CT_DoArchUClibcCflags() {
;;
-m4a-nofpu)
CT_KconfigEnableOption "CONFIG_SH4A" "${cfg}"
- CT_KconfigDisableOption "UCLIBC_HAS_FPU" "${cfg}"
;;
+ esac
+ ;;
esac
done
}
diff --git a/scripts/build/arch/sparc.sh b/scripts/build/arch/sparc.sh
index b5f8140..7433c4d 100644
--- a/scripts/build/arch/sparc.sh
+++ b/scripts/build/arch/sparc.sh
@@ -60,7 +60,7 @@ CT_DoArchGlibcAdjustTuple() {
# earlier (corresponding pthread barrier code is missing). Until this
# support is reintroduced, configure as sparcv9.
sparc-*)
- if [ "${CT_LIBC_GLIBC_2_23_or_later}" = y ]; then
+ if [ "${CT_GLIBC_NO_SPARC_V8}" = y ]; then
CT_DoLog WARN "GLIBC 2.23 and newer only support SPARCv9"
target_=${target_/#sparc-/sparcv9-}
fi
diff --git a/scripts/build/arch/x86.sh b/scripts/build/arch/x86.sh
index 3a7a2ce..471d377 100644
--- a/scripts/build/arch/x86.sh
+++ b/scripts/build/arch/x86.sh
@@ -86,7 +86,7 @@ CT_DoArchGlibcAdjustTuple() {
# x86 quirk: architecture name is i386, but glibc expects i[4567]86 - to
# indicate the desired optimization. If it was a multilib variant of x86_64,
# then it targets at least NetBurst a.k.a. i786, but we'll follow the model
- # above # and set the optimization to i686. Otherwise, replace with the most
+ # above and set the optimization to i686. Otherwise, replace with the most
# conservative choice, i486.
i386-*)
if [ "${CT_TARGET_ARCH}" = "x86_64" ]; then
diff --git a/scripts/build/arch/xtensa.sh b/scripts/build/arch/xtensa.sh
index bf94ddf..744bbb2 100644
--- a/scripts/build/arch/xtensa.sh
+++ b/scripts/build/arch/xtensa.sh
@@ -12,67 +12,6 @@ CT_DoArchTupleValues() {
esac
}
-# This function updates the specified component (binutils, gcc, gdb, etc.)
-# with the processor specific configuration.
-CT_ConfigureXtensa() {
- local component="${1}"
- local version="${2}"
- local custom_overlay="xtensa_${CT_ARCH_XTENSA_CUSTOM_NAME}.tar"
- local custom_location="${CT_ARCH_XTENSA_CUSTOM_OVERLAY_LOCATION}"
-
- if [ -z "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then
- custom_overlay="xtensa-overlay.tar"
- fi
-
- CT_TestAndAbort "${custom_overlay}: CT_ARCH_XTENSA_CUSTOM_OVERLAY_LOCATION must be set." -z "${custom_location}"
-
- local full_file="${custom_location}/${custom_overlay}"
- local basename="${component}-${version}"
- local ext
-
- ext=${full_file/*./.}
-
- if [ -z "${ext}" ] ; then
- CT_DoLog WARN "'${full_file}' not found"
- return 1
- fi
-
- if [ -e "${CT_SRC_DIR}/.${basename}.configuring" ]; then
- CT_DoLog ERROR "The '${basename}' source were partially configured."
- CT_DoLog ERROR "Please remove first:"
- CT_DoLog ERROR " - the source dir for '${basename}', in '${CT_SRC_DIR}'"
- CT_DoLog ERROR " - the file '${CT_SRC_DIR}/.${basename}.extracted'"
- CT_DoLog ERROR " - the file '${CT_SRC_DIR}/.${basename}.patch'"
- CT_DoLog ERROR " - the file '${CT_SRC_DIR}/.${basename}.configuring'"
- CT_Abort
- fi
-
- CT_DoLog EXTRA "Using '${custom_overlay}' from ${custom_location}"
- CT_DoExecLog DEBUG ln -sf "${custom_location}/${custom_overlay}" \
- "${CT_TARBALLS_DIR}/${custom_overlay}"
-
- CT_DoExecLog DEBUG touch "${CT_SRC_DIR}/.${basename}.configuring"
-
- CT_Pushd "${CT_SRC_DIR}/${basename}"
-
- tar_opts=( "--strip-components=1" )
- tar_opts+=( "-xv" )
-
- case "${ext}" in
- .tar) CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}" "${component}";;
- .gz|.tgz) gzip -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f - "${component}";;
- .bz2) bzip2 -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f - "${component}";;
- *) CT_DoLog WARN "Don't know how to handle '${basename}${ext}': unknown extension"
- return 1
- ;;
- esac
-
- CT_DoExecLog DEBUG touch "${CT_SRC_DIR}/.${basename}.configured"
- CT_DoExecLog DEBUG rm -f "${CT_SRC_DIR}/.${basename}.configuring"
-
- CT_Popd
-}
-
CT_DoArchUClibcConfig() {
local cfg="${1}"
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh
index f378b4f..703a6fa 100644
--- a/scripts/build/binutils/binutils.sh
+++ b/scripts/build/binutils/binutils.sh
@@ -4,44 +4,17 @@
# Download binutils
do_binutils_get() {
- if [ "${CT_BINUTILS_CUSTOM}" = "y" ]; then
- CT_GetCustom "binutils" "${CT_BINUTILS_CUSTOM_VERSION}" \
- "${CT_BINUTILS_CUSTOM_LOCATION}"
- else
- case "${CT_BINUTILS_VERSION}" in
- linaro-*)
- CT_GetLinaro "binutils" "${CT_BINUTILS_VERSION}"
- ;;
- *)
- CT_GetFile "binutils-${CT_BINUTILS_VERSION}" \
- {http,ftp}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils \
- ftp://{sourceware.org,gcc.gnu.org}/pub/binutils/{releases,snapshots}
- ;;
- esac
- fi
-
+ CT_Fetch BINUTILS
if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
- if [ "${CT_ELF2FLT_CUSTOM}" = "y" ]; then
- CT_GetCustom "elf2flt" "${CT_ELF2FLT_CUSTOM_VERSION}" \
- "${CT_ELF2FLT_CUSTOM_LOCATION}"
- else
- CT_GetGit elf2flt "${CT_ELF2FLT_GIT_CSET}" https://github.com/uclinux-dev/elf2flt.git
- fi
+ CT_Fetch ELF2FLT
fi
}
# Extract binutils
do_binutils_extract() {
- CT_Extract "binutils-${CT_BINUTILS_VERSION}"
- CT_Patch "binutils" "${CT_BINUTILS_VERSION}"
-
+ CT_ExtractPatch BINUTILS
if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
- CT_Extract "elf2flt-${CT_ELF2FLT_GIT_CSET}"
- CT_Patch "elf2flt" "${CT_ELF2FLT_GIT_CSET}"
- fi
-
- if [ -n "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then
- CT_ConfigureXtensa "binutils" "${CT_BINUTILS_VERSION}"
+ CT_ExtractPatch ELF2FLT
fi
}
@@ -67,7 +40,7 @@ do_binutils_for_build() {
if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
# We re-use binutils' options, plus our owns
- binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" )
+ binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils" )
binutils_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-build-${CT_BUILD}" )
CT_mkdir_pushd "${CT_BUILD_DIR}/build-elf2flt-build-${CT_BUILD}"
@@ -100,7 +73,7 @@ do_binutils_for_host() {
if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
# We re-use binutils' options, plus our owns
- binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" )
+ binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils" )
binutils_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-host-${CT_HOST}" )
CT_mkdir_pushd "${CT_BUILD_DIR}/build-elf2flt-host-${CT_HOST}"
@@ -181,7 +154,7 @@ do_binutils_backend() {
extra_config+=( --enable-plugins )
fi
if [ "${CT_BINUTILS_HAS_PKGVERSION_BUGURL}" = "y" ]; then
- extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
+ [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
fi
if [ "${CT_MULTILIB}" = "y" ]; then
@@ -207,7 +180,7 @@ do_binutils_backend() {
CXXFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure" \
+ "${CT_SRC_DIR}/binutils/configure" \
--build=${CT_BUILD} \
--host=${host} \
--target=${CT_TARGET} \
@@ -215,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
@@ -291,7 +264,7 @@ do_elf2flt_backend() {
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}/configure" \
+ "${CT_SRC_DIR}/elf2flt/configure" \
--build=${CT_BUILD} \
--host=${host} \
--target=${CT_TARGET} \
@@ -334,7 +307,7 @@ do_binutils_for_target() {
CT_DoLog EXTRA "Configuring binutils for target"
if [ "${CT_BINUTILS_HAS_PKGVERSION_BUGURL}" = "y" ]; then
- extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
+ [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
fi
if [ "${CT_MULTILIB}" = "y" ]; then
@@ -351,7 +324,7 @@ do_binutils_for_target() {
CT_DoExecLog CFG \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure" \
+ "${CT_SRC_DIR}/binutils/configure" \
--build=${CT_BUILD} \
--host=${CT_TARGET} \
--target=${CT_TARGET} \
diff --git a/scripts/build/cc.sh b/scripts/build/cc.sh
deleted file mode 100644
index 0db6b9c..0000000
--- a/scripts/build/cc.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-# Wrapper to build the companion tools facilities
-
-# List all companion tools facilities, and parse their scripts
-CT_CC_FACILITY_LIST=
-for f in "${CT_LIB_DIR}/scripts/build/cc/"*.sh; do
- _f="$(basename "${f}" .sh)"
- _f="${_f#???-}"
- __f="CT_CC_${_f}"
- if [ "${!__f}" = "y" ]; then
- CT_DoLog DEBUG "Enabling cc '${_f}'"
- . "${f}"
- CT_CC_FACILITY_LIST="${CT_CC_FACILITY_LIST} ${_f}"
- else
- CT_DoLog DEBUG "Disabling cc '${_f}'"
- fi
-done
-
-# Download the cc facilities
-do_cc_get() {
- for f in ${CT_CC_FACILITY_LIST}; do
- do_${f}_get
- done
-}
-
-# Extract and patch the cc facilities
-do_cc_extract() {
- for f in ${CT_CC_FACILITY_LIST}; do
- do_${f}_extract
- done
-}
-
-# Core pass 1 the cc facilities
-do_cc_core_pass_1() {
- for f in ${CT_CC_FACILITY_LIST}; do
- do_${f}_core_pass_1
- done
-}
-
-# Core pass 2 the cc facilities
-do_cc_core_pass_2() {
- for f in ${CT_CC_FACILITY_LIST}; do
- do_${f}_core_pass_2
- done
-}
-
-# Build for build the cc facilities
-do_cc_for_build() {
- for f in ${CT_CC_FACILITY_LIST}; do
- do_${f}_for_build
- done
-}
-
-# Build for host the cc facilities
-do_cc_for_host() {
- for f in ${CT_CC_FACILITY_LIST}; do
- do_${f}_for_host
- done
-}
diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh
deleted file mode 100644
index 2ca8e6f..0000000
--- a/scripts/build/cc/100-gcc.sh
+++ /dev/null
@@ -1,1178 +0,0 @@
-# This file adds the function to build the gcc C compiler
-# Copyright 2007 Yann E. MORIN
-# Licensed under the GPL v2. See COPYING in the root of this package
-
-# Download gcc
-do_gcc_get() {
- local linaro_version=""
- local linaro_series=""
-
- if [ "${CT_CC_GCC_CUSTOM}" = "y" ]; then
- CT_GetCustom "gcc" "${CT_CC_GCC_CUSTOM_VERSION}" \
- "${CT_CC_GCC_CUSTOM_LOCATION}"
- else
- case "${CT_CC_GCC_VERSION}" in
- linaro-*)
- CT_GetLinaro "gcc" "${CT_CC_GCC_VERSION}"
- ;;
- *)
- # The official gcc hosts put gcc under a gcc/release/ directory,
- # whereas the mirrors put it in the gcc/ directory.
- CT_GetFile "gcc-${CT_CC_GCC_VERSION}" \
- {http,ftp,https}://ftp.gnu.org/gnu/gcc/gcc-${CT_CC_GCC_VERSION} \
- ftp://{gcc.gnu.org,sourceware.org}/pub/gcc/releases/gcc-${CT_CC_GCC_VERSION}
- ;;
- esac
- fi # ! custom location
- # Starting with GCC 4.3, ecj is used for Java, and will only be
- # built if the configure script finds ecj.jar at the top of the
- # 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
- CT_GetFile ecj-latest .jar http://mirrors.kernel.org/sourceware/java/ \
- http://crosstool-ng.org/pub/java \
- ftp://gcc.gnu.org/pub/java \
- ftp://sourceware.org/pub/java
- fi
-}
-
-# Extract gcc
-do_gcc_extract() {
- CT_Extract "gcc-${CT_CC_GCC_VERSION}"
- CT_Patch "gcc" "${CT_CC_GCC_VERSION}"
-
- # Copy ecj-latest.jar to ecj.jar at the top of the GCC source tree
- if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" \
- -a ! -f "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/ecj.jar" \
- ]; then
- CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/ecj-latest.jar" "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/ecj.jar"
- fi
-
- if [ -n "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then
- CT_ConfigureXtensa "gcc" "${CT_CC_GCC_VERSION}"
- fi
-}
-
-#------------------------------------------------------------------------------
-# This function builds up the set of languages to enable
-# No argument expected, returns the comma-separated language list on stdout
-cc_gcc_lang_list() {
- local lang_list
-
- lang_list="c"
- [ "${CT_CC_LANG_CXX}" = "y" ] && lang_list+=",c++"
- [ "${CT_CC_LANG_FORTRAN}" = "y" ] && lang_list+=",fortran"
- [ "${CT_CC_LANG_ADA}" = "y" ] && lang_list+=",ada"
- [ "${CT_CC_LANG_JAVA}" = "y" ] && lang_list+=",java"
- [ "${CT_CC_LANG_OBJC}" = "y" ] && lang_list+=",objc"
- [ "${CT_CC_LANG_OBJCXX}" = "y" ] && lang_list+=",obj-c++"
- [ "${CT_CC_LANG_GOLANG}" = "y" ] && lang_list+=",go"
- lang_list+="${CT_CC_LANG_OTHERS:+,${CT_CC_LANG_OTHERS}}"
-
- printf "%s" "${lang_list}"
-}
-
-#------------------------------------------------------------------------------
-# Report the type of a GCC option
-cc_gcc_classify_opt() {
- # Options present in multiple architectures
- case "${1}" in
- -march=*) echo "arch"; return;;
- -mabi=*) echo "abi"; return;;
- -mcpu=*|-mmcu=*) echo "cpu"; return;;
- -mtune=*) echo "tune"; return;;
- -mfpu=*) echo "fpu"; return;;
- -mhard-float|-msoft-float|-mno-soft-float|-mno-float|-mfloat-abi=*|\
- -mfpu|-mno-fpu) echo "float"; return;;
- -EB|-EL|-mbig-endian|-mlittle-endian|-mbig|-mlittle|-meb|-mel|-mb|-ml) echo "endian"; return;;
- -mthumb|-marm) echo "mode"; return;;
- esac
-
- # Arch-specific options and aliases
- case "${CT_ARCH}" in
- m68k)
- case "${1}" in
- -m68881) echo "float"; return;;
- -m5[234]*|-mcfv4e) echo "cpu"; return;;
- -m68*|-mc68*) echo "arch"; return;;
- esac
- ;;
- mips)
- case "${1}" in
- -mips[1234]|-mips32|-mips32r*|-mips64|-mips64r*) echo "cpu"; return;;
- esac
- ;;
- sh)
- case "${1}" in
- -m[12345]*) echo "cpu"; return;;
- esac
- esac
-
- # All tried and failed
- echo "unknown"
-}
-
-evaluate_multilib_cflags()
-{
- local multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_flags multi_index multi_count
- local mdir mdir_os dirtop
- local f
-
- for arg in "$@"; do
- eval "${arg// /\\ }"
- done
-
- mdir="lib/${multi_dir}"
- mdir_os="lib/${multi_os_dir_gcc}"
- CT_SanitizeVarDir mdir mdir_os
- CT_DoLog EXTRA " '${multi_flags}' --> ${mdir} (gcc) ${mdir_os} (os)"
- for f in ${multi_flags}; do
- eval ml_`cc_gcc_classify_opt ${f}`=seen
- done
- if [ "${CT_DEMULTILIB}" = "y" -a "${CT_USE_SYSROOT}" = "y" ]; then
- case "${mdir_os}" in
- lib/*)
- ;;
- *)
- dirtop="${mdir_os%%/*}"
- if [ ! -e "${multi_root}/${mdir_os}" ]; then
- CT_DoExecLog ALL ln -sfv lib "${multi_root}/${mdir_os}"
- fi
- if [ ! -e "${multi_root}/usr/${mdir_os}" ]; then
- CT_DoExecLog ALL ln -sfv lib "${multi_root}/usr/${mdir_os}"
- fi
- ;;
- esac
- fi
-}
-
-#------------------------------------------------------------------------------
-# This function lists the multilibs configured in the compiler (even if multilib
-# is disabled - so that it lists the default GCC/OS directory, which may differ
-# from the default 'lib'). It then performs a few multilib checks/quirks:
-#
-# 1. On MIPS target, gcc (or rather, ld, which it invokes under the hood) chokes
-# if supplied with two -mabi=* options. I.e., 'gcc -mabi=n32' and 'gcc -mabi=32' both
-# work, but 'gcc -mabi=32 -mabi=n32' produces an internal error in ld. Thus we do
-# not supply target's CFLAGS in multilib builds - and after compiling pass-1 gcc,
-# attempt to determine which CFLAGS need to be filtered out.
-#
-# 2. If "demultilibing" is in effect, create top-level directories for any
-# multilibs not in lib/ as symlinks to lib.
-cc_gcc_multilib_housekeeping() {
- local cc host
- local ml_arch ml_abi ml_cpu ml_tune ml_fpu ml_float ml_endian ml_mode ml_unknown ml
- local new_cflags
-
- for arg in "$@"; do
- eval "${arg// /\\ }"
- done
-
- if [ \( "${CT_CANADIAN}" = "y" -o "${CT_CROSS_NATIVE}" = "y" \) -a "${host}" = "${CT_HOST}" ]; then
- CT_DoLog EXTRA "Canadian Cross/Cross-native unable to confirm multilibs configuration "\
- "directly; will use build-compiler for housekeeping."
- # Since we cannot run the desired compiler, substitute build-CC with the assumption
- # that the host-CC is configured in the same way.
- cc="${CT_BUILDTOOLS_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}"
- fi
-
- CT_IterateMultilibs evaluate_multilib_cflags evaluate_cflags
-
- # Filtering out some of the options provided in CT-NG config. Then *prepend*
- # them to CT_TARGET_CFLAGS, like scripts/crosstool-NG.sh does. Zero out
- # the stashed MULTILIB flags so that we don't process them again in the passes
- # that follow.
- CT_DoLog DEBUG "Configured target CFLAGS: '${CT_ARCH_TARGET_CFLAGS_MULTILIB}'"
- ml_unknown= # Pass through anything we don't know about
- for f in ${CT_ARCH_TARGET_CFLAGS_MULTILIB}; do
- eval ml=\$ml_`cc_gcc_classify_opt ${f}`
- if [ "${ml}" != "seen" ]; then
- new_cflags="${new_cflags} ${f}"
- fi
- done
- CT_DoLog DEBUG "Filtered target CFLAGS: '${new_cflags}'"
- CT_EnvModify CT_TARGET_CFLAGS "${new_cflags} ${CT_TARGET_CFLAGS}"
- CT_EnvModify CT_ARCH_TARGET_CFLAGS_MULTILIB ""
-
- # Currently, the only LDFLAGS are endianness-related
- CT_DoLog DEBUG "Configured target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'"
- if [ "${ml_endian}" != "seen" ]; then
- CT_EnvModify CT_TARGET_LDFLAGS "${CT_ARCH_TARGET_LDFLAGS_MULTILIB} ${CT_TARGET_LDFLAGS}"
- CT_EnvModify CT_ARCH_TARGET_LDFLAGS_MULTILIB ""
- fi
- CT_DoLog DEBUG "Filtered target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'"
-}
-
-#------------------------------------------------------------------------------
-# Core gcc pass 1
-do_gcc_core_pass_1() {
- local -a core_opts
-
- if [ "${CT_CC_CORE_PASS_1_NEEDED}" != "y" ]; then
- return 0
- fi
-
- core_opts+=( "mode=static" )
- core_opts+=( "host=${CT_BUILD}" )
- core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
- core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
- core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
- core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
- core_opts+=( "lang_list=c" )
- core_opts+=( "build_step=core1" )
-
- CT_DoStep INFO "Installing pass-1 core C gcc compiler"
- CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-1"
-
- do_gcc_core_backend "${core_opts[@]}"
-
- CT_Popd
- CT_EndStep
-}
-
-# Core gcc pass 2
-do_gcc_core_pass_2() {
- local -a core_opts
-
- if [ "${CT_CC_CORE_PASS_2_NEEDED}" != "y" ]; then
- return 0
- fi
-
- # Common options:
- core_opts+=( "host=${CT_BUILD}" )
- core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
- core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
- core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
- core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
- core_opts+=( "lang_list=c" )
- core_opts+=( "build_step=core2" )
-
- # Different conditions are at stake here:
- # - In case the threading model is NPTL, we need a shared-capable core
- # gcc; in all other cases, we need a static-only core gcc.
- # - In case the threading model is NPTL or win32, or gcc is 4.3 or
- # later, we need to build libgcc
- case "${CT_THREADS}" in
- nptl)
- core_opts+=( "mode=shared" )
- core_opts+=( "build_libgcc=yes" )
- ;;
- win32)
- core_opts+=( "mode=static" )
- core_opts+=( "build_libgcc=yes" )
- ;;
- *)
- core_opts+=( "mode=static" )
- core_opts+=( "build_libgcc=yes" )
- ;;
- esac
-
- CT_DoStep INFO "Installing pass-2 core C gcc compiler"
- CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-2"
-
- do_gcc_core_backend "${core_opts[@]}"
-
- CT_Popd
- CT_EndStep
-}
-
-#------------------------------------------------------------------------------
-# Build core gcc
-# This function is used to build the core C compiler.
-# Usage: do_gcc_core_backend param=value [...]
-# Parameter : Definition : Type : Default
-# mode : build a 'static', 'shared' or 'baremetal' : string : (none)
-# host : the machine the core will run on : tuple : (none)
-# prefix : dir prefix to install into : dir : (none)
-# complibs : dir where complibs are installed : dir : (none)
-# lang_list : the list of languages to build : string : (empty)
-# build_libgcc : build libgcc or not : bool : no
-# build_libstdcxx : build libstdc++ or not : bool : no
-# build_libgfortran : build libgfortran or not : bool : no
-# build_staticlinked : build statically linked or not : bool : no
-# build_manuals : whether to build manuals or not : bool : no
-# cflags : cflags to use : string : (empty)
-# ldflags : ldflags to use : string : (empty)
-# build_step : build step 'core1', 'core2', 'gcc_build'
-# or 'gcc_host' : string : (none)
-# Usage: do_gcc_core_backend mode=[static|shared|baremetal] build_libgcc=[yes|no] build_staticlinked=[yes|no]
-do_gcc_core_backend() {
- local mode
- local build_libgcc=no
- local build_libstdcxx=no
- local build_libgfortran=no
- local build_staticlinked=no
- local build_manuals=no
- local host
- local prefix
- local complibs
- local lang_list
- local cflags
- local cflags_for_build
- local ldflags
- local build_step
- local log_txt
- local tmp
- local -a host_libstdcxx_flags
- local -a extra_config
- local -a core_LDFLAGS
- local -a core_targets
- local -a core_targets_all
- local -a core_targets_install
- local -a extra_user_config
- local arg
-
- for arg in "$@"; do
- eval "${arg// /\\ }"
- done
-
- # This function gets called in case of a bare metal compiler for the final gcc, too.
- case "${build_step}" in
- core1|core2)
- CT_DoLog EXTRA "Configuring core C gcc compiler"
- log_txt="gcc"
- extra_user_config=( "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
- ;;
- gcc_build|gcc_host)
- CT_DoLog EXTRA "Configuring final gcc compiler"
- extra_user_config=( "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" )
- log_txt="final gcc compiler"
- # to inhibit the libiberty and libgcc tricks later on
- build_libgcc=no
- ;;
- *)
- CT_Abort "Internal Error: 'build_step' must be one of: 'core1', 'core2', 'gcc_build' or 'gcc_host', not '${build_step:-(empty)}'"
- ;;
- esac
-
- case "${mode}" in
- static)
- extra_config+=("--with-newlib")
- extra_config+=("--enable-threads=no")
- extra_config+=("--disable-shared")
- ;;
- shared)
- extra_config+=("--enable-shared")
- ;;
- baremetal)
- extra_config+=("--with-newlib")
- extra_config+=("--enable-threads=no")
- extra_config+=("--disable-shared")
- ;;
- *)
- CT_Abort "Internal Error: 'mode' must be one of: 'static', 'shared' or 'baremetal', not '${mode:-(empty)}'"
- ;;
- esac
-
- # This is only needed when building libstdc++ in a canadian environment with
- # this function being used for final step (i.e., when building for bare metal).
- if [ "${build_step}" = "gcc_build" ]; then
- CT_DoLog DEBUG "Copying headers to install area of core C compiler"
- CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include"
- fi
-
- for tmp in ARCH ABI CPU TUNE FPU FLOAT; do
- eval tmp="\${CT_ARCH_WITH_${tmp}}"
- if [ -n "${tmp}" ]; then
- extra_config+=("${tmp}")
- fi
- done
-
- extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
- [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
-
- if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
- extra_config+=("--enable-__cxa_atexit")
- else
- extra_config+=("--disable-__cxa_atexit")
- fi
-
- if [ -n "${CT_CC_GCC_ENABLE_CXX_FLAGS}" \
- -a "${mode}" = "baremetal" ]; then
- extra_config+=("--enable-cxx-flags=${CT_CC_GCC_ENABLE_CXX_FLAGS}")
- fi
-
- extra_config+=(--disable-libgomp)
- extra_config+=(--disable-libmudflap)
- extra_config+=(--disable-libmpx)
-
- if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then
- extra_config+=(--enable-libssp)
- else
- extra_config+=(--disable-libssp)
- fi
- if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then
- extra_config+=(--enable-libquadmath)
- extra_config+=(--enable-libquadmath-support)
- else
- extra_config+=(--disable-libquadmath)
- extra_config+=(--disable-libquadmath-support)
- fi
-
- core_LDFLAGS+=("${ldflags}")
-
- # *** WARNING ! ***
- # Keep this full if-else-if-elif-fi-fi block in sync
- # with the same block in do_gcc_backend, below.
- if [ "${build_staticlinked}" = "yes" ]; then
- core_LDFLAGS+=("-static")
- host_libstdcxx_flags+=("-static-libgcc")
- host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++")
- host_libstdcxx_flags+=("-lm")
- # Companion libraries are build static (eg !shared), so
- # the libstdc++ is not pulled automatically, although it
- # is needed. Shoe-horn it in our LDFLAGS
- # Ditto libm on some Fedora boxen
- core_LDFLAGS+=("-lstdc++")
- core_LDFLAGS+=("-lm")
- else
- if [ "${CT_CC_GCC_STATIC_LIBSTDCXX}" = "y" ]; then
- # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2
- # build script
- # INFO: if the host gcc is gcc-4.5 then presumably we could use -static-libstdc++,
- # see http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01635.html
- host_libstdcxx_flags+=("-static-libgcc")
- host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++,-Bdynamic")
- host_libstdcxx_flags+=("-lm")
- fi
- # When companion libraries are build static (eg !shared),
- # the libstdc++ is not pulled automatically, although it
- # is needed. Shoe-horn it in our LDFLAGS
- # Ditto libm on some Fedora boxen
- core_LDFLAGS+=("-lstdc++")
- core_LDFLAGS+=("-lm")
- fi
-
- extra_config+=("--with-gmp=${complibs}")
- extra_config+=("--with-mpfr=${complibs}")
- extra_config+=("--with-mpc=${complibs}")
- if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then
- if [ "${CT_ISL}" = "y" ]; then
- extra_config+=("--with-isl=${complibs}")
- fi
- if [ "${CT_CLOOG}" = "y" ]; then
- extra_config+=("--with-cloog=${complibs}")
- fi
- else
- extra_config+=("--with-isl=no")
- extra_config+=("--with-cloog=no")
- fi
- if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then
- extra_config+=("--enable-lto")
- else
- extra_config+=("--disable-lto")
- fi
-
- if [ ${#host_libstdcxx_flags[@]} -ne 0 ]; then
- extra_config+=("--with-host-libstdcxx=${host_libstdcxx_flags[*]}")
- fi
-
- if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
- extra_config+=("--enable-target-optspace")
- fi
- if [ "${CT_CC_GCC_DISABLE_PCH}" = "y" ]; then
- extra_config+=("--disable-libstdcxx-pch")
- fi
-
- case "${CT_CC_GCC_LDBL_128}" in
- y) extra_config+=("--with-long-double-128");;
- m) ;;
- "") extra_config+=("--without-long-double-128");;
- esac
-
- if [ "${CT_CC_GCC_BUILD_ID}" = "y" ]; then
- extra_config+=( --enable-linker-build-id )
- fi
-
- case "${CT_CC_GCC_LNK_HASH_STYLE}" in
- "") ;;
- *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
- esac
-
- case "${CT_CC_GCC_DEC_FLOATS}" in
- "") ;;
- *) extra_config+=( "--enable-decimal-float=${CT_CC_GCC_DEC_FLOATS}" );;
- esac
-
- case "${CT_ARCH}" in
- mips)
- case "${CT_CC_GCC_mips_llsc}" in
- y) extra_config+=( --with-llsc );;
- m) ;;
- *) extra_config+=( --without-llsc );;
- esac
- case "${CT_CC_GCC_mips_synci}" in
- y) extra_config+=( --with-synci );;
- m) ;;
- *) extra_config+=( --without-synci );;
- esac
- if [ "${CT_CC_GCC_mips_plt}" ]; then
- extra_config+=( --with-mips-plt )
- fi
- ;; # ARCH is mips
- esac
-
- if [ "${CT_TOOLCHAIN_ENABLE_NLS}" = "y" ]; then
- extra_config+=("--with-libintl-prefix=${complibs}")
- else
- extra_config+=("--disable-nls")
- fi
-
- if [ "${CT_CC_GCC_SYSTEM_ZLIB}" = "y" ]; then
- extra_config+=("--with-system-zlib")
- fi
-
- case "${CT_CC_GCC_CONFIG_TLS}" in
- y) extra_config+=("--enable-tls");;
- m) ;;
- "") extra_config+=("--disable-tls");;
- esac
-
- # Some versions of gcc have a defective --enable-multilib.
- # Since that's the default, only pass --disable-multilib. For multilib,
- # also enable multiarch. Without explicit --enable-multiarch, pass-1
- # compiler is configured as multilib/no-multiarch and pass-2/final
- # are multilib/multiarch (because gcc autodetects multiarch based on
- # multiple instances of crt*.o in the install directory - which do
- # not exist in pass-1).
- if [ "${CT_MULTILIB}" != "y" ]; then
- extra_config+=("--disable-multilib")
- else
- extra_config+=("--enable-multiarch")
- if [ -n "${CT_CC_GCC_MULTILIB_LIST}" ]; then
- extra_config+=("--with-multilib-list=${CT_CC_GCC_MULTILIB_LIST}")
- fi
- fi
-
- CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
-
- # We may need to modify host/build CFLAGS separately below
- cflags_for_build="${CT_CFLAGS_FOR_BUILD}"
-
- # Clang's default bracket-depth is 256, and building GCC
- # requires somewhere between 257 and 512.
- if [ "${host}" = "${CT_BUILD}" ]; then
- if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then
- cflags="$cflags "-fbracket-depth=512
- cflags_for_build="$cflags_for_build "-fbracket-depth=512
- fi
- else
- # FIXME we currently don't support clang as host compiler, only as build
- if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then
- cflags_for_build="$cflags_for_build "-fbracket-depth=512
- fi
- fi
-
- # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
- CT_DoExecLog CFG \
- CC_FOR_BUILD="${CT_BUILD}-gcc" \
- CFLAGS="${cflags}" \
- CFLAGS_FOR_BUILD="${cflags_for_build}" \
- CXXFLAGS="${cflags}" \
- CXXFLAGS_FOR_BUILD="${cflags_for_build}" \
- LDFLAGS="${core_LDFLAGS[*]}" \
- CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \
- CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \
- LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \
- ${CONFIG_SHELL} \
- "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/configure" \
- --build=${CT_BUILD} \
- --host=${host} \
- --target=${CT_TARGET} \
- --prefix="${prefix}" \
- --with-local-prefix="${CT_SYSROOT_DIR}" \
- ${CC_CORE_SYSROOT_ARG} \
- "${extra_config[@]}" \
- --enable-languages="${lang_list}" \
- "${extra_user_config[@]}"
-
- if [ "${build_libgcc}" = "yes" ]; then
- # HACK: we need to override SHLIB_LC from gcc/config/t-slibgcc-elf-ver or
- # gcc/config/t-libunwind so -lc is removed from the link for
- # libgcc_s.so, as we do not have a target -lc yet.
- # This is not as ugly as it appears to be ;-) All symbols get resolved
- # during the glibc build, and we provide a proper libgcc_s.so for the
- # cross toolchain during the final gcc build.
- #
- # As we cannot modify the source tree, nor override SHLIB_LC itself
- # during configure or make, we have to edit the resultant
- # gcc/libgcc.mk itself to remove -lc from the link.
- # This causes us to have to jump through some hoops...
- #
- # To produce libgcc.mk to edit we firstly require libiberty.a,
- # so we configure then build it.
- # Next we have to configure gcc, create libgcc.mk then edit it...
- # So much easier if we just edit the source tree, but hey...
- if [ ! -f "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" ]; then
- CT_DoExecLog CFG make ${JOBSFLAGS} configure-libiberty
- CT_DoExecLog ALL make ${JOBSFLAGS} -C libiberty libiberty.a
- CT_DoExecLog CFG make ${JOBSFLAGS} configure-gcc configure-libcpp
- CT_DoExecLog ALL make ${JOBSFLAGS} all-libcpp
- else
- CT_DoExecLog CFG make ${JOBSFLAGS} configure-gcc configure-libcpp configure-build-libiberty
- CT_DoExecLog ALL make ${JOBSFLAGS} all-libcpp all-build-libiberty
- fi
- # HACK: gcc-4.2 uses libdecnumber to build libgcc.mk, so build it here.
- if [ -d "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/libdecnumber" ]; then
- CT_DoExecLog CFG make ${JOBSFLAGS} configure-libdecnumber
- CT_DoExecLog ALL make ${JOBSFLAGS} -C libdecnumber libdecnumber.a
- fi
- # HACK: gcc-4.8 uses libbacktrace to make libgcc.mvars, so make it here.
- if [ -d "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/libbacktrace" ]; then
- CT_DoExecLog CFG make ${JOBSFLAGS} configure-libbacktrace
- CT_DoExecLog ALL make ${JOBSFLAGS} -C libbacktrace
- fi
-
- libgcc_rule="libgcc.mvars"
- core_targets=( gcc target-libgcc )
-
- # On bare metal and canadian build the host-compiler is used when
- # actually the build-system compiler is required. Choose the correct
- # compilers for canadian build and use the defaults on other
- # configurations.
- if [ "${CT_BARE_METAL},${CT_CANADIAN}" = "y,y" ]; then
- repair_cc="CC_FOR_BUILD=${CT_BUILD}-gcc \
- CXX_FOR_BUILD=${CT_BUILD}-g++ \
- GCC_FOR_TARGET=${CT_TARGET}-${CT_CC}"
- else
- repair_cc=""
- fi
-
- CT_DoExecLog ALL make ${JOBSFLAGS} -C gcc ${libgcc_rule} \
- ${repair_cc}
- sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule}
- else # build_libgcc
- core_targets=( gcc )
- fi # ! build libgcc
- if [ "${build_libstdcxx}" = "yes" \
- -a "${CT_CC_LANG_CXX}" = "y" \
- ]; then
- core_targets+=( target-libstdc++-v3 )
- fi
-
- if [ "${build_libgfortran}" = "yes" \
- -a "${CT_CC_LANG_FORTRAN}" = "y" \
- ]; then
- core_targets+=( target-libgfortran )
- fi
-
- core_targets_all="${core_targets[@]/#/all-}"
- core_targets_install="${core_targets[@]/#/install-}"
-
- case "${build_step}" in
- gcc_build|gcc_host)
- core_targets_all=all
- core_targets_install=install
- ;;
- esac
-
- CT_DoLog EXTRA "Building ${log_txt}"
- CT_DoExecLog ALL make ${JOBSFLAGS} ${core_targets_all}
-
- # Do not pass ${JOBSFLAGS} here: recent GCC builds have been failing
- # in parallel 'make install' at random locations: libitm, libcilk,
- # always for the files that are installed more than once to the same
- # location (such as libitm.info).
- # The symptom is that the install command fails with "File exists"
- # error; running the same command manually succeeds. It looks like
- # attempts to remove the destination and re-create it, but another
- # install gets in the way.
- CT_DoLog EXTRA "Installing ${log_txt}"
- CT_DoExecLog ALL make ${core_targets_install}
-
- # Remove the libtool "pseudo-libraries": having them in the installed
- # tree makes the libtoolized utilities that are built next assume
- # that, for example, libsupc++ is an "accessory library", and not include
- # -lsupc++ to the link flags. That breaks ltrace, for example.
- CT_DoLog EXTRA "Housekeeping for core gcc compiler"
- CT_Pushd "${prefix}"
- find . -type f -name "*.la" -exec rm {} \; |CT_DoLog ALL
- CT_Popd
-
- if [ "${build_manuals}" = "yes" ]; then
- CT_DoLog EXTRA "Building the GCC manuals"
- CT_DoExecLog ALL make pdf html
- CT_DoLog EXTRA "Installing the GCC manuals"
- CT_DoExecLog ALL make install-{pdf,html}-gcc
- fi
-
- # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-${CT_CC} to always be able
- # to call the C compiler with the same, somewhat canonical name.
- # check whether compiler has an extension
- file="$( ls -1 "${prefix}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )"
- [ -z "${file}" ] || ext=".${file##*.}"
- if [ -f "${prefix}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then
- CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
- fi
-
- cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \
- host="${host}"
-}
-
-#------------------------------------------------------------------------------
-# Build complete gcc to run on build
-do_gcc_for_build() {
- local -a build_final_opts
- local build_final_backend
-
- # If native or simple cross toolchain is being built, then build==host;
- # nothing to do.
- case "${CT_TOOLCHAIN_TYPE}" in
- native|cross) return 0;;
- esac
-
- build_final_opts+=( "host=${CT_BUILD}" )
- build_final_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
- build_final_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
- build_final_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
- build_final_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
- build_final_opts+=( "lang_list=$( cc_gcc_lang_list )" )
- build_final_opts+=( "build_step=gcc_build" )
- if [ "${CT_BARE_METAL}" = "y" ]; then
- # In the tests I've done, bare-metal was not impacted by the
- # lack of such a compiler, but better safe than sorry...
- build_final_opts+=( "mode=baremetal" )
- build_final_opts+=( "build_libgcc=yes" )
- build_final_opts+=( "build_libstdcxx=yes" )
- build_final_opts+=( "build_libgfortran=yes" )
- if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
- build_final_opts+=( "build_staticlinked=yes" )
- fi
- build_final_backend=do_gcc_core_backend
- else
- build_final_backend=do_gcc_backend
- fi
-
- CT_DoStep INFO "Installing final gcc compiler for build"
- CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final-build-${CT_BUILD}"
-
- "${build_final_backend}" "${build_final_opts[@]}"
-
- CT_Popd
- CT_EndStep
-}
-
-gcc_movelibs() {
- local multi_flags multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_index multi_count
- local gcc_dir dst_dir
- local rel
-
- for arg in "$@"; do
- eval "${arg// /\\ }"
- done
-
- # Move only files, directories are for other multilibs. We're looking inside
- # GCC's directory structure, thus use unmangled multi_os_dir that GCC reports.
- gcc_dir="${CT_PREFIX_DIR}/${CT_TARGET}/lib/${multi_os_dir_gcc}"
- if [ ! -d "${gcc_dir}" ]; then
- # GCC didn't install anything outside of sysroot
- return
- fi
- # Depending on the selected libc, we may or may not have the ${multi_os_dir_gcc}
- # created by libc installation. If we do, use it. If we don't, use ${multi_os_dir}
- # to avoid creating an otherwise empty directory.
- dst_dir="${multi_root}/lib/${multi_os_dir_gcc}"
- if [ ! -d "${dst_dir}" ]; then
- dst_dir="${multi_root}/lib/${multi_os_dir}"
- fi
- CT_SanitizeVarDir dst_dir gcc_dir
- rel=$( echo "${gcc_dir#${CT_PREFIX_DIR}/}" | sed 's#[^/]\{1,\}#..#g' )
-
- ls "${gcc_dir}" | while read f; do
- case "${f}" in
- *.ld)
- # Linker scripts remain in GCC's directory; elf2flt insists on
- # finding them there.
- continue
- ;;
- esac
- if [ -f "${gcc_dir}/${f}" ]; then
- CT_DoExecLog ALL mkdir -p "${dst_dir}"
- CT_DoExecLog ALL mv "${gcc_dir}/${f}" "${dst_dir}/${f}"
- CT_DoExecLog ALL ln -sf "${rel}/${dst_dir#${CT_PREFIX_DIR}/}/${f}" "${gcc_dir}/${f}"
- fi
- done
-}
-
-#------------------------------------------------------------------------------
-# Build final gcc to run on host
-do_gcc_for_host() {
- local -a final_opts
- local final_backend
-
- final_opts+=( "host=${CT_HOST}" )
- final_opts+=( "prefix=${CT_PREFIX_DIR}" )
- final_opts+=( "complibs=${CT_HOST_COMPLIBS_DIR}" )
- final_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
- final_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
- final_opts+=( "lang_list=$( cc_gcc_lang_list )" )
- final_opts+=( "build_step=gcc_host" )
- if [ "${CT_BUILD_MANUALS}" = "y" ]; then
- final_opts+=( "build_manuals=yes" )
- fi
- if [ "${CT_BARE_METAL}" = "y" ]; then
- final_opts+=( "mode=baremetal" )
- final_opts+=( "build_libgcc=yes" )
- final_opts+=( "build_libstdcxx=yes" )
- final_opts+=( "build_libgfortran=yes" )
- if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
- final_opts+=( "build_staticlinked=yes" )
- fi
- final_backend=do_gcc_core_backend
- else
- final_backend=do_gcc_backend
- fi
-
- CT_DoStep INFO "Installing final gcc compiler"
- CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final"
- "${final_backend}" "${final_opts[@]}"
- CT_Popd
-
- # GCC installs stuff (including libgcc) into its own /lib dir,
- # outside of sysroot, breaking linking with -static-libgcc.
- # Fix up by moving the libraries into the sysroot.
- if [ "${CT_USE_SYSROOT}" = "y" ]; then
- CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final-movelibs"
- CT_IterateMultilibs gcc_movelibs movelibs
- CT_Popd
- fi
-
- CT_EndStep
-}
-
-#------------------------------------------------------------------------------
-# Build the final gcc
-# Usage: do_gcc_backend param=value [...]
-# Parameter : Definition : Type : Default
-# host : the host we run onto : tuple : (none)
-# prefix : the runtime prefix : dir : (none)
-# complibs : the companion libraries prefix : dir : (none)
-# cflags : cflags to use : string : (empty)
-# ldflags : ldflags to use : string : (empty)
-# lang_list : the list of languages to build : string : (empty)
-# build_manuals : whether to build manuals or not : bool : no
-do_gcc_backend() {
- local host
- local prefix
- local complibs
- local lang_list
- local cflags
- local cflags_for_build
- local ldflags
- local build_manuals
- local -a host_libstdcxx_flags
- local -a extra_config
- local -a final_LDFLAGS
- local tmp
- local arg
-
- for arg in "$@"; do
- eval "${arg// /\\ }"
- done
-
- CT_DoLog EXTRA "Configuring final gcc compiler"
-
- # Enable selected languages
- extra_config+=("--enable-languages=${lang_list}")
-
- for tmp in ARCH ABI CPU TUNE FPU FLOAT; do
- eval tmp="\${CT_ARCH_WITH_${tmp}}"
- if [ -n "${tmp}" ]; then
- extra_config+=("${tmp}")
- fi
- done
-
- [ "${CT_SHARED_LIBS}" = "y" ] || extra_config+=("--disable-shared")
- extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
- [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
-
- case "${CT_CC_GCC_SJLJ_EXCEPTIONS}" in
- y) extra_config+=("--enable-sjlj-exceptions");;
- m) ;;
- "") extra_config+=("--disable-sjlj-exceptions");;
- esac
- if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
- extra_config+=("--enable-__cxa_atexit")
- else
- extra_config+=("--disable-__cxa_atexit")
- fi
-
- if [ -n "${CT_CC_GCC_ENABLE_CXX_FLAGS}" ]; then
- extra_config+=("--enable-cxx-flags=${CT_CC_GCC_ENABLE_CXX_FLAGS}")
- fi
-
- if [ "${CT_THREADS}" = "none" ]; then
- extra_config+=(--disable-libatomic)
- fi
- if [ "${CT_CC_GCC_LIBMUDFLAP}" = "y" ]; then
- extra_config+=(--enable-libmudflap)
- else
- extra_config+=(--disable-libmudflap)
- fi
- if [ "${CT_CC_GCC_LIBGOMP}" = "y" ]; then
- extra_config+=(--enable-libgomp)
- else
- extra_config+=(--disable-libgomp)
- fi
- if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then
- extra_config+=(--enable-libssp)
- else
- extra_config+=(--disable-libssp)
- fi
- if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then
- extra_config+=(--enable-libquadmath)
- extra_config+=(--enable-libquadmath-support)
- else
- extra_config+=(--disable-libquadmath)
- extra_config+=(--disable-libquadmath-support)
- fi
-
- if [ "${CT_CC_GCC_LIBSANITIZER}" = "y" ]; then
- extra_config+=(--enable-libsanitizer)
- else
- extra_config+=(--disable-libsanitizer)
- fi
-
- if [ "${CT_CC_GCC_HAS_LIBMPX}" = "y" ]; then
- if [ "${CT_CC_GCC_LIBMPX}" = "y" ]; then
- extra_config+=(--enable-libmpx)
- else
- extra_config+=(--disable-libmpx)
- fi
- fi
-
- final_LDFLAGS+=("${ldflags}")
-
- # *** WARNING ! ***
- # Keep this full if-else-if-elif-fi-fi block in sync
- # with the same block in do_gcc_core_backend, above.
- if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
- final_LDFLAGS+=("-static")
- host_libstdcxx_flags+=("-static-libgcc")
- host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++")
- host_libstdcxx_flags+=("-lm")
- # Companion libraries are build static (eg !shared), so
- # the libstdc++ is not pulled automatically, although it
- # is needed. Shoe-horn it in our LDFLAGS
- # Ditto libm on some Fedora boxen
- final_LDFLAGS+=("-lstdc++")
- final_LDFLAGS+=("-lm")
- else
- if [ "${CT_CC_GCC_STATIC_LIBSTDCXX}" = "y" ]; then
- # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2
- # build script
- # INFO: if the host gcc is gcc-4.5 then presumably we could use -static-libstdc++,
- # see http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01635.html
- host_libstdcxx_flags+=("-static-libgcc")
- host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++,-Bdynamic")
- host_libstdcxx_flags+=("-lm")
- fi
- # When companion libraries are build static (eg !shared),
- # the libstdc++ is not pulled automatically, although it
- # is needed. Shoe-horn it in our LDFLAGS
- # Ditto libm on some Fedora boxen
- final_LDFLAGS+=("-lstdc++")
- final_LDFLAGS+=("-lm")
- fi
-
- extra_config+=("--with-gmp=${complibs}")
- extra_config+=("--with-mpfr=${complibs}")
- extra_config+=("--with-mpc=${complibs}")
- if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then
- if [ "${CT_ISL}" = "y" ]; then
- extra_config+=("--with-isl=${complibs}")
- fi
- if [ "${CT_CLOOG}" = "y" ]; then
- extra_config+=("--with-cloog=${complibs}")
- fi
- else
- extra_config+=("--with-isl=no")
- extra_config+=("--with-cloog=no")
- fi
- if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then
- extra_config+=("--enable-lto")
- else
- extra_config+=("--disable-lto")
- fi
-
- if [ ${#host_libstdcxx_flags[@]} -ne 0 ]; then
- extra_config+=("--with-host-libstdcxx=${host_libstdcxx_flags[*]}")
- fi
-
- if [ "${CT_THREADS}" = "none" ]; then
- extra_config+=("--disable-threads")
- else
- if [ "${CT_THREADS}" = "win32" ]; then
- extra_config+=("--enable-threads=win32")
- extra_config+=("--disable-win32-registry")
- else
- extra_config+=("--enable-threads=posix")
- fi
- fi
-
- if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
- extra_config+=("--enable-target-optspace")
- fi
- if [ "${CT_CC_GCC_DISABLE_PCH}" = "y" ]; then
- extra_config+=("--disable-libstdcxx-pch")
- fi
-
- case "${CT_CC_GCC_LDBL_128}" in
- y) extra_config+=("--with-long-double-128");;
- m) ;;
- "") extra_config+=("--without-long-double-128");;
- esac
-
- if [ "${CT_CC_GCC_BUILD_ID}" = "y" ]; then
- extra_config+=( --enable-linker-build-id )
- fi
-
- case "${CT_CC_GCC_LNK_HASH_STYLE}" in
- "") ;;
- *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
- esac
-
- case "${CT_CC_GCC_DEC_FLOATS}" in
- "") ;;
- *) extra_config+=( "--enable-decimal-float=${CT_CC_GCC_DEC_FLOATS}" );;
- esac
-
- if [ "${CT_CC_GCC_ENABLE_PLUGINS}" = "y" ]; then
- extra_config+=( --enable-plugin )
- else
- extra_config+=( --disable-plugin )
- fi
- if [ "${CT_CC_GCC_GOLD}" = "y" ]; then
- extra_config+=( --enable-gold )
- fi
-
- case "${CT_ARCH}" in
- mips)
- case "${CT_CC_GCC_mips_llsc}" in
- y) extra_config+=( --with-llsc );;
- m) ;;
- *) extra_config+=( --without-llsc );;
- esac
- case "${CT_CC_GCC_mips_synci}" in
- y) extra_config+=( --with-synci );;
- m) ;;
- *) extra_config+=( --without-synci );;
- esac
- if [ "${CT_CC_GCC_mips_plt}" ]; then
- extra_config+=( --with-mips-plt )
- fi
- ;; # ARCH is mips
- esac
-
- if [ "${CT_TOOLCHAIN_ENABLE_NLS}" = "y" ]; then
- extra_config+=("--with-libintl-prefix=${complibs}")
- else
- extra_config+=("--disable-nls")
- fi
-
- if [ "${CT_CC_GCC_SYSTEM_ZLIB}" = "y" ]; then
- extra_config+=("--with-system-zlib")
- fi
-
- case "${CT_CC_GCC_CONFIG_TLS}" in
- y) extra_config+=("--enable-tls");;
- m) ;;
- "") extra_config+=("--disable-tls");;
- esac
-
- # Some versions of gcc have a defective --enable-multilib.
- # Since that's the default, only pass --disable-multilib.
- if [ "${CT_MULTILIB}" != "y" ]; then
- extra_config+=("--disable-multilib")
- else
- extra_config+=("--enable-multiarch")
- if [ -n "${CT_CC_GCC_MULTILIB_LIST}" ]; then
- extra_config+=("--with-multilib-list=${CT_CC_GCC_MULTILIB_LIST}")
- fi
- fi
-
- CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
-
- # We may need to modify host/build CFLAGS separately below
- cflags_for_build="${cflags}"
-
- # Clang's default bracket-depth is 256, and building GCC
- # requires somewhere between 257 and 512.
- if [ "${host}" = "${CT_BUILD}" ]; then
- if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then
- cflags="$cflags "-fbracket-depth=512
- cflags_for_build="$cflags_for_build "-fbracket-depth=512
- fi
- else
- # FIXME we currently don't support clang as host compiler, only as build
- if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then
- cflags_for_build="$cflags_for_build "-fbracket-depth=512
- fi
- fi
-
- CT_DoExecLog CFG \
- CC_FOR_BUILD="${CT_BUILD}-gcc" \
- CFLAGS="${cflags}" \
- CFLAGS_FOR_BUILD="${cflags_for_build}" \
- CXXFLAGS="${cflags}" \
- CXXFLAGS_FOR_BUILD="${cflags_for_build}" \
- LDFLAGS="${final_LDFLAGS[*]}" \
- CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \
- CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \
- LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \
- ${CONFIG_SHELL} \
- "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/configure" \
- --build=${CT_BUILD} \
- --host=${host} \
- --target=${CT_TARGET} \
- --prefix="${prefix}" \
- ${CC_SYSROOT_ARG} \
- "${extra_config[@]}" \
- --with-local-prefix="${CT_SYSROOT_DIR}" \
- --enable-long-long \
- "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}"
-
- if [ "${CT_CANADIAN}" = "y" ]; then
- CT_DoLog EXTRA "Building libiberty"
- CT_DoExecLog ALL make ${JOBSFLAGS} all-build-libiberty
- fi
-
- CT_DoLog EXTRA "Building final gcc compiler"
- CT_DoExecLog ALL make ${JOBSFLAGS} all
-
- # See the note on issues with parallel 'make install' in GCC above.
- CT_DoLog EXTRA "Installing final gcc compiler"
- if [ "${CT_STRIP_TARGET_TOOLCHAIN_EXECUTABLES}" = "y" ]; then
- CT_DoExecLog ALL make install-strip
- else
- CT_DoExecLog ALL make install
- fi
-
- # Remove the libtool "pseudo-libraries": having them in the installed
- # tree makes the libtoolized utilities that are built next assume
- # that, for example, libsupc++ is an "accessory library", and not include
- # -lsupc++ to the link flags. That breaks ltrace, for example.
- CT_DoLog EXTRA "Housekeeping for final gcc compiler"
- CT_Pushd "${prefix}"
- find . -type f -name "*.la" -exec rm {} \; |CT_DoLog ALL
- CT_Popd
-
- if [ "${build_manuals}" = "yes" ]; then
- CT_DoLog EXTRA "Building the GCC manuals"
- CT_DoExecLog ALL make pdf html
- CT_DoLog EXTRA "Installing the GCC manuals"
- CT_DoExecLog ALL make install-{pdf,html}-gcc
- fi
-
- # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-${CT_CC} to always be able
- # to call the C compiler with the same, somewhat canonical name.
- # check whether compiler has an extension
- file="$( ls -1 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )"
- [ -z "${file}" ] || ext=".${file##*.}"
- if [ -f "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then
- CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
- fi
-
- cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \
- host="${host}"
-}
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
new file mode 100644
index 0000000..5430341
--- /dev/null
+++ b/scripts/build/cc/gcc.sh
@@ -0,0 +1,1176 @@
+# This file adds the function to build the gcc C compiler
+# Copyright 2007 Yann E. MORIN
+# Licensed under the GPL v2. See COPYING in the root of this package
+
+# Download gcc
+do_cc_get() {
+ local linaro_version=""
+ local linaro_series=""
+
+ CT_Fetch GCC
+
+ # Starting with GCC 4.3, ecj is used for Java, and will only be
+ # built if the configure script finds ecj.jar at the top of the
+ # 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 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"
+ fi
+ fi
+}
+
+# Extract gcc
+do_cc_extract() {
+ CT_ExtractPatch GCC
+
+ # Copy ecj-latest.jar to ecj.jar at the top of the GCC source tree
+ if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" -a ! -f "${CT_SRC_DIR}/gcc/ecj.jar" ]; then
+ CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/ecj-latest.jar" "${CT_SRC_DIR}/gcc/ecj.jar"
+ fi
+}
+
+#------------------------------------------------------------------------------
+# This function builds up the set of languages to enable
+# No argument expected, returns the comma-separated language list on stdout
+cc_gcc_lang_list() {
+ local lang_list
+
+ lang_list="c"
+ [ "${CT_CC_LANG_CXX}" = "y" ] && lang_list+=",c++"
+ [ "${CT_CC_LANG_FORTRAN}" = "y" ] && lang_list+=",fortran"
+ [ "${CT_CC_LANG_ADA}" = "y" ] && lang_list+=",ada"
+ [ "${CT_CC_LANG_JAVA}" = "y" ] && lang_list+=",java"
+ [ "${CT_CC_LANG_OBJC}" = "y" ] && lang_list+=",objc"
+ [ "${CT_CC_LANG_OBJCXX}" = "y" ] && lang_list+=",obj-c++"
+ [ "${CT_CC_LANG_GOLANG}" = "y" ] && lang_list+=",go"
+ lang_list+="${CT_CC_LANG_OTHERS:+,${CT_CC_LANG_OTHERS}}"
+
+ printf "%s" "${lang_list}"
+}
+
+#------------------------------------------------------------------------------
+# Report the type of a GCC option
+cc_gcc_classify_opt() {
+ # Options present in multiple architectures
+ case "${1}" in
+ -march=*) echo "arch"; return;;
+ -mabi=*) echo "abi"; return;;
+ -mcpu=*|-mmcu=*) echo "cpu"; return;;
+ -mtune=*) echo "tune"; return;;
+ -mfpu=*) echo "fpu"; return;;
+ -mhard-float|-msoft-float|-mno-soft-float|-mno-float|-mfloat-abi=*|\
+ -mfpu|-mno-fpu) echo "float"; return;;
+ -EB|-EL|-mbig-endian|-mlittle-endian|-mbig|-mlittle|-meb|-mel|-mb|-ml) echo "endian"; return;;
+ -mthumb|-marm) echo "mode"; return;;
+ esac
+
+ # Arch-specific options and aliases
+ case "${CT_ARCH}" in
+ m68k)
+ case "${1}" in
+ -m68881) echo "float"; return;;
+ -m5[234]*|-mcfv4e) echo "cpu"; return;;
+ -m68*|-mc68*) echo "arch"; return;;
+ esac
+ ;;
+ mips)
+ case "${1}" in
+ -mips[1234]|-mips32|-mips32r*|-mips64|-mips64r*) echo "cpu"; return;;
+ esac
+ ;;
+ sh)
+ case "${1}" in
+ -m[12345]*) echo "cpu"; return;;
+ esac
+ esac
+
+ # All tried and failed
+ echo "unknown"
+}
+
+evaluate_multilib_cflags()
+{
+ local multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_flags multi_index multi_count
+ local mdir mdir_os dirtop
+ local f
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ mdir="lib/${multi_dir}"
+ mdir_os="lib/${multi_os_dir_gcc}"
+ CT_SanitizeVarDir mdir mdir_os
+ CT_DoLog EXTRA " '${multi_flags}' --> ${mdir} (gcc) ${mdir_os} (os)"
+ for f in ${multi_flags}; do
+ eval ml_`cc_gcc_classify_opt ${f}`=seen
+ done
+ if [ "${CT_DEMULTILIB}" = "y" -a "${CT_USE_SYSROOT}" = "y" ]; then
+ case "${mdir_os}" in
+ lib/*)
+ ;;
+ *)
+ dirtop="${mdir_os%%/*}"
+ if [ ! -e "${multi_root}/${mdir_os}" ]; then
+ CT_DoExecLog ALL ln -sfv lib "${multi_root}/${mdir_os}"
+ fi
+ if [ ! -e "${multi_root}/usr/${mdir_os}" ]; then
+ CT_DoExecLog ALL ln -sfv lib "${multi_root}/usr/${mdir_os}"
+ fi
+ ;;
+ esac
+ fi
+}
+
+#------------------------------------------------------------------------------
+# This function lists the multilibs configured in the compiler (even if multilib
+# is disabled - so that it lists the default GCC/OS directory, which may differ
+# from the default 'lib'). It then performs a few multilib checks/quirks:
+#
+# 1. On MIPS target, gcc (or rather, ld, which it invokes under the hood) chokes
+# if supplied with two -mabi=* options. I.e., 'gcc -mabi=n32' and 'gcc -mabi=32' both
+# work, but 'gcc -mabi=32 -mabi=n32' produces an internal error in ld. Thus we do
+# not supply target's CFLAGS in multilib builds - and after compiling pass-1 gcc,
+# attempt to determine which CFLAGS need to be filtered out.
+#
+# 2. If "demultilibing" is in effect, create top-level directories for any
+# multilibs not in lib/ as symlinks to lib.
+cc_gcc_multilib_housekeeping() {
+ local cc host
+ local ml_arch ml_abi ml_cpu ml_tune ml_fpu ml_float ml_endian ml_mode ml_unknown ml
+ local new_cflags
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ if [ \( "${CT_CANADIAN}" = "y" -o "${CT_CROSS_NATIVE}" = "y" \) -a "${host}" = "${CT_HOST}" ]; then
+ CT_DoLog EXTRA "Canadian Cross/Cross-native unable to confirm multilibs configuration "\
+ "directly; will use build-compiler for housekeeping."
+ # Since we cannot run the desired compiler, substitute build-CC with the assumption
+ # that the host-CC is configured in the same way.
+ cc="${CT_BUILDTOOLS_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}"
+ fi
+
+ CT_IterateMultilibs evaluate_multilib_cflags evaluate_cflags
+
+ # Filtering out some of the options provided in CT-NG config. Then *prepend*
+ # them to CT_TARGET_CFLAGS, like scripts/crosstool-NG.sh does. Zero out
+ # the stashed MULTILIB flags so that we don't process them again in the passes
+ # that follow.
+ CT_DoLog DEBUG "Configured target CFLAGS: '${CT_ARCH_TARGET_CFLAGS_MULTILIB}'"
+ ml_unknown= # Pass through anything we don't know about
+ for f in ${CT_ARCH_TARGET_CFLAGS_MULTILIB}; do
+ eval ml=\$ml_`cc_gcc_classify_opt ${f}`
+ if [ "${ml}" != "seen" ]; then
+ new_cflags="${new_cflags} ${f}"
+ fi
+ done
+ CT_DoLog DEBUG "Filtered target CFLAGS: '${new_cflags}'"
+ CT_EnvModify CT_TARGET_CFLAGS "${new_cflags} ${CT_TARGET_CFLAGS}"
+ CT_EnvModify CT_ARCH_TARGET_CFLAGS_MULTILIB ""
+
+ # Currently, the only LDFLAGS are endianness-related
+ CT_DoLog DEBUG "Configured target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'"
+ if [ "${ml_endian}" != "seen" ]; then
+ CT_EnvModify CT_TARGET_LDFLAGS "${CT_ARCH_TARGET_LDFLAGS_MULTILIB} ${CT_TARGET_LDFLAGS}"
+ CT_EnvModify CT_ARCH_TARGET_LDFLAGS_MULTILIB ""
+ fi
+ CT_DoLog DEBUG "Filtered target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'"
+}
+
+#------------------------------------------------------------------------------
+# Core gcc pass 1
+do_cc_core_pass_1() {
+ local -a core_opts
+
+ if [ "${CT_CC_CORE_PASS_1_NEEDED}" != "y" ]; then
+ return 0
+ fi
+
+ core_opts+=( "mode=static" )
+ core_opts+=( "host=${CT_BUILD}" )
+ core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
+ core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
+ core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
+ core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
+ core_opts+=( "lang_list=c" )
+ core_opts+=( "build_step=core1" )
+
+ CT_DoStep INFO "Installing pass-1 core C gcc compiler"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-1"
+
+ do_gcc_core_backend "${core_opts[@]}"
+
+ CT_Popd
+ CT_EndStep
+}
+
+# Core gcc pass 2
+do_cc_core_pass_2() {
+ local -a core_opts
+
+ if [ "${CT_CC_CORE_PASS_2_NEEDED}" != "y" ]; then
+ return 0
+ fi
+
+ # Common options:
+ core_opts+=( "host=${CT_BUILD}" )
+ core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
+ core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
+ core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
+ core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
+ core_opts+=( "lang_list=c" )
+ core_opts+=( "build_step=core2" )
+
+ # Different conditions are at stake here:
+ # - In case the threading model is NPTL, we need a shared-capable core
+ # gcc; in all other cases, we need a static-only core gcc.
+ # - In case the threading model is NPTL or win32, or gcc is 4.3 or
+ # later, we need to build libgcc
+ case "${CT_THREADS}" in
+ nptl)
+ if [ "${CT_SHARED_LIBS}" = "y" ]; then
+ core_opts+=( "mode=shared" )
+ else
+ core_opts+=( "mode=static" )
+ fi
+ core_opts+=( "build_libgcc=yes" )
+ ;;
+ win32)
+ core_opts+=( "mode=static" )
+ core_opts+=( "build_libgcc=yes" )
+ ;;
+ *)
+ core_opts+=( "mode=static" )
+ core_opts+=( "build_libgcc=yes" )
+ ;;
+ esac
+
+ CT_DoStep INFO "Installing pass-2 core C gcc compiler"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-2"
+
+ do_gcc_core_backend "${core_opts[@]}"
+
+ CT_Popd
+ CT_EndStep
+}
+
+#------------------------------------------------------------------------------
+# Build core gcc
+# This function is used to build the core C compiler.
+# Usage: do_gcc_core_backend param=value [...]
+# Parameter : Definition : Type : Default
+# mode : build a 'static', 'shared' or 'baremetal' : string : (none)
+# host : the machine the core will run on : tuple : (none)
+# prefix : dir prefix to install into : dir : (none)
+# complibs : dir where complibs are installed : dir : (none)
+# lang_list : the list of languages to build : string : (empty)
+# build_libgcc : build libgcc or not : bool : no
+# build_libstdcxx : build libstdc++ or not : bool : no
+# build_libgfortran : build libgfortran or not : bool : no
+# build_staticlinked : build statically linked or not : bool : no
+# build_manuals : whether to build manuals or not : bool : no
+# cflags : cflags to use : string : (empty)
+# ldflags : ldflags to use : string : (empty)
+# build_step : build step 'core1', 'core2', 'gcc_build'
+# or 'gcc_host' : string : (none)
+# Usage: do_gcc_core_backend mode=[static|shared|baremetal] build_libgcc=[yes|no] build_staticlinked=[yes|no]
+do_gcc_core_backend() {
+ local mode
+ local build_libgcc=no
+ local build_libstdcxx=no
+ local build_libgfortran=no
+ local build_staticlinked=no
+ local build_manuals=no
+ local host
+ local prefix
+ local complibs
+ local lang_list
+ local cflags
+ local cflags_for_build
+ local ldflags
+ local build_step
+ local log_txt
+ local tmp
+ local -a host_libstdcxx_flags
+ local -a extra_config
+ local -a core_LDFLAGS
+ local -a core_targets
+ local -a core_targets_all
+ local -a core_targets_install
+ local -a extra_user_config
+ local arg
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ # This function gets called in case of a bare metal compiler for the final gcc, too.
+ case "${build_step}" in
+ core1|core2)
+ CT_DoLog EXTRA "Configuring core C gcc compiler"
+ log_txt="gcc"
+ extra_user_config=( "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
+ ;;
+ gcc_build|gcc_host)
+ CT_DoLog EXTRA "Configuring final gcc compiler"
+ extra_user_config=( "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" )
+ log_txt="final gcc compiler"
+ # to inhibit the libiberty and libgcc tricks later on
+ build_libgcc=no
+ ;;
+ *)
+ CT_Abort "Internal Error: 'build_step' must be one of: 'core1', 'core2', 'gcc_build' or 'gcc_host', not '${build_step:-(empty)}'"
+ ;;
+ esac
+
+ case "${mode}" in
+ static)
+ extra_config+=("--with-newlib")
+ extra_config+=("--enable-threads=no")
+ extra_config+=("--disable-shared")
+ ;;
+ shared)
+ extra_config+=("--enable-shared")
+ ;;
+ baremetal)
+ extra_config+=("--with-newlib")
+ extra_config+=("--enable-threads=no")
+ extra_config+=("--disable-shared")
+ ;;
+ *)
+ CT_Abort "Internal Error: 'mode' must be one of: 'static', 'shared' or 'baremetal', not '${mode:-(empty)}'"
+ ;;
+ esac
+
+ # This is only needed when building libstdc++ in a canadian environment with
+ # this function being used for final step (i.e., when building for bare metal).
+ if [ "${build_step}" = "gcc_build" ]; then
+ CT_DoLog DEBUG "Copying headers to install area of core C compiler"
+ CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include"
+ fi
+
+ for tmp in ARCH ABI CPU TUNE FPU FLOAT ENDIAN; do
+ eval tmp="\${CT_ARCH_WITH_${tmp}}"
+ if [ -n "${tmp}" ]; then
+ extra_config+=("${tmp}")
+ fi
+ done
+
+ [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
+ [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
+
+ if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
+ extra_config+=("--enable-__cxa_atexit")
+ else
+ extra_config+=("--disable-__cxa_atexit")
+ fi
+
+ if [ -n "${CT_CC_GCC_ENABLE_CXX_FLAGS}" \
+ -a "${mode}" = "baremetal" ]; then
+ extra_config+=("--enable-cxx-flags=${CT_CC_GCC_ENABLE_CXX_FLAGS}")
+ fi
+
+ extra_config+=(--disable-libgomp)
+ extra_config+=(--disable-libmudflap)
+ extra_config+=(--disable-libmpx)
+
+ if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then
+ extra_config+=(--enable-libssp)
+ else
+ extra_config+=(--disable-libssp)
+ fi
+ if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then
+ extra_config+=(--enable-libquadmath)
+ extra_config+=(--enable-libquadmath-support)
+ else
+ extra_config+=(--disable-libquadmath)
+ extra_config+=(--disable-libquadmath-support)
+ fi
+
+ core_LDFLAGS+=("${ldflags}")
+
+ # *** WARNING ! ***
+ # Keep this full if-else-if-elif-fi-fi block in sync
+ # with the same block in do_gcc_backend, below.
+ if [ "${build_staticlinked}" = "yes" ]; then
+ core_LDFLAGS+=("-static")
+ host_libstdcxx_flags+=("-static-libgcc")
+ host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++")
+ host_libstdcxx_flags+=("-lm")
+ # Companion libraries are build static (eg !shared), so
+ # the libstdc++ is not pulled automatically, although it
+ # is needed. Shoe-horn it in our LDFLAGS
+ # Ditto libm on some Fedora boxen
+ core_LDFLAGS+=("-lstdc++")
+ core_LDFLAGS+=("-lm")
+ else
+ if [ "${CT_CC_GCC_STATIC_LIBSTDCXX}" = "y" ]; then
+ # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2
+ # build script
+ # INFO: if the host gcc is gcc-4.5 then presumably we could use -static-libstdc++,
+ # see http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01635.html
+ host_libstdcxx_flags+=("-static-libgcc")
+ host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++,-Bdynamic")
+ host_libstdcxx_flags+=("-lm")
+ fi
+ # When companion libraries are build static (eg !shared),
+ # the libstdc++ is not pulled automatically, although it
+ # is needed. Shoe-horn it in our LDFLAGS
+ # Ditto libm on some Fedora boxen
+ core_LDFLAGS+=("-lstdc++")
+ core_LDFLAGS+=("-lm")
+ fi
+
+ extra_config+=("--with-gmp=${complibs}")
+ extra_config+=("--with-mpfr=${complibs}")
+ extra_config+=("--with-mpc=${complibs}")
+ if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then
+ if [ "${CT_ISL}" = "y" ]; then
+ extra_config+=("--with-isl=${complibs}")
+ fi
+ if [ "${CT_CLOOG}" = "y" ]; then
+ extra_config+=("--with-cloog=${complibs}")
+ fi
+ else
+ extra_config+=("--with-isl=no")
+ extra_config+=("--with-cloog=no")
+ fi
+ if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then
+ extra_config+=("--enable-lto")
+ else
+ extra_config+=("--disable-lto")
+ fi
+
+ if [ ${#host_libstdcxx_flags[@]} -ne 0 ]; then
+ extra_config+=("--with-host-libstdcxx=${host_libstdcxx_flags[*]}")
+ fi
+
+ if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
+ extra_config+=("--enable-target-optspace")
+ fi
+ if [ "${CT_CC_GCC_DISABLE_PCH}" = "y" ]; then
+ 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) ;;
+ "") extra_config+=("--without-long-double-128");;
+ esac
+
+ if [ "${CT_CC_GCC_BUILD_ID}" = "y" ]; then
+ extra_config+=( --enable-linker-build-id )
+ fi
+
+ case "${CT_CC_GCC_LNK_HASH_STYLE}" in
+ "") ;;
+ *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
+ esac
+
+ case "${CT_CC_GCC_DEC_FLOATS}" in
+ "") ;;
+ *) extra_config+=( "--enable-decimal-float=${CT_CC_GCC_DEC_FLOATS}" );;
+ esac
+
+ case "${CT_ARCH}" in
+ mips)
+ case "${CT_CC_GCC_mips_llsc}" in
+ y) extra_config+=( --with-llsc );;
+ m) ;;
+ *) extra_config+=( --without-llsc );;
+ esac
+ case "${CT_CC_GCC_mips_synci}" in
+ y) extra_config+=( --with-synci );;
+ m) ;;
+ *) extra_config+=( --without-synci );;
+ esac
+ if [ "${CT_CC_GCC_mips_plt}" ]; then
+ extra_config+=( --with-mips-plt )
+ fi
+ ;; # ARCH is mips
+ esac
+
+ if [ "${CT_TOOLCHAIN_ENABLE_NLS}" = "y" ]; then
+ extra_config+=("--with-libintl-prefix=${complibs}")
+ else
+ extra_config+=("--disable-nls")
+ fi
+
+ if [ "${CT_CC_GCC_SYSTEM_ZLIB}" = "y" ]; then
+ extra_config+=("--with-system-zlib")
+ fi
+
+ case "${CT_CC_GCC_CONFIG_TLS}" in
+ y) extra_config+=("--enable-tls");;
+ m) ;;
+ "") extra_config+=("--disable-tls");;
+ esac
+
+ # Some versions of gcc have a defective --enable-multilib.
+ # Since that's the default, only pass --disable-multilib. For multilib,
+ # also enable multiarch. Without explicit --enable-multiarch, pass-1
+ # compiler is configured as multilib/no-multiarch and pass-2/final
+ # are multilib/multiarch (because gcc autodetects multiarch based on
+ # multiple instances of crt*.o in the install directory - which do
+ # not exist in pass-1).
+ if [ "${CT_MULTILIB}" != "y" ]; then
+ extra_config+=("--disable-multilib")
+ else
+ extra_config+=("--enable-multiarch")
+ if [ -n "${CT_CC_GCC_MULTILIB_LIST}" ]; then
+ extra_config+=("--with-multilib-list=${CT_CC_GCC_MULTILIB_LIST}")
+ fi
+ fi
+
+ CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
+
+ # We may need to modify host/build CFLAGS separately below
+ cflags_for_build="${CT_CFLAGS_FOR_BUILD}"
+
+ # Clang's default bracket-depth is 256, and building GCC
+ # requires somewhere between 257 and 512.
+ if [ "${host}" = "${CT_BUILD}" ]; then
+ if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then
+ cflags="$cflags "-fbracket-depth=512
+ cflags_for_build="$cflags_for_build "-fbracket-depth=512
+ fi
+ else
+ # FIXME we currently don't support clang as host compiler, only as build
+ if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then
+ cflags_for_build="$cflags_for_build "-fbracket-depth=512
+ fi
+ fi
+
+ # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
+ CT_DoExecLog CFG \
+ CC_FOR_BUILD="${CT_BUILD}-gcc" \
+ CFLAGS="${cflags}" \
+ CFLAGS_FOR_BUILD="${cflags_for_build}" \
+ CXXFLAGS="${cflags}" \
+ CXXFLAGS_FOR_BUILD="${cflags_for_build}" \
+ LDFLAGS="${core_LDFLAGS[*]}" \
+ CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \
+ CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \
+ LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \
+ ${CONFIG_SHELL} \
+ "${CT_SRC_DIR}/gcc/configure" \
+ --build=${CT_BUILD} \
+ --host=${host} \
+ --target=${CT_TARGET} \
+ --prefix="${prefix}" \
+ --with-local-prefix="${CT_SYSROOT_DIR}" \
+ ${CT_CC_CORE_SYSROOT_ARG} \
+ "${extra_config[@]}" \
+ --enable-languages="${lang_list}" \
+ "${extra_user_config[@]}"
+
+ if [ "${build_libgcc}" = "yes" ]; then
+ # HACK: we need to override SHLIB_LC from gcc/config/t-slibgcc-elf-ver or
+ # gcc/config/t-libunwind so -lc is removed from the link for
+ # libgcc_s.so, as we do not have a target -lc yet.
+ # This is not as ugly as it appears to be ;-) All symbols get resolved
+ # during the glibc build, and we provide a proper libgcc_s.so for the
+ # cross toolchain during the final gcc build.
+ #
+ # As we cannot modify the source tree, nor override SHLIB_LC itself
+ # during configure or make, we have to edit the resultant
+ # gcc/libgcc.mk itself to remove -lc from the link.
+ # This causes us to have to jump through some hoops...
+ #
+ # To produce libgcc.mk to edit we firstly require libiberty.a,
+ # so we configure then build it.
+ # Next we have to configure gcc, create libgcc.mk then edit it...
+ # So much easier if we just edit the source tree, but hey...
+ if [ ! -f "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ]; then
+ CT_DoExecLog CFG make ${JOBSFLAGS} configure-libiberty
+ CT_DoExecLog ALL make ${JOBSFLAGS} -C libiberty libiberty.a
+ CT_DoExecLog CFG make ${JOBSFLAGS} configure-gcc configure-libcpp
+ CT_DoExecLog ALL make ${JOBSFLAGS} all-libcpp
+ else
+ CT_DoExecLog CFG make ${JOBSFLAGS} configure-gcc configure-libcpp configure-build-libiberty
+ CT_DoExecLog ALL make ${JOBSFLAGS} all-libcpp all-build-libiberty
+ fi
+ # HACK: gcc-4.2 uses libdecnumber to build libgcc.mk, so build it here.
+ if [ -d "${CT_SRC_DIR}/gcc/libdecnumber" ]; then
+ CT_DoExecLog CFG make ${JOBSFLAGS} configure-libdecnumber
+ CT_DoExecLog ALL make ${JOBSFLAGS} -C libdecnumber libdecnumber.a
+ fi
+ # HACK: gcc-4.8 uses libbacktrace to make libgcc.mvars, so make it here.
+ if [ -d "${CT_SRC_DIR}/gcc/libbacktrace" ]; then
+ CT_DoExecLog CFG make ${JOBSFLAGS} configure-libbacktrace
+ CT_DoExecLog ALL make ${JOBSFLAGS} -C libbacktrace
+ fi
+
+ libgcc_rule="libgcc.mvars"
+ core_targets=( gcc target-libgcc )
+
+ # On bare metal and canadian build the host-compiler is used when
+ # actually the build-system compiler is required. Choose the correct
+ # compilers for canadian build and use the defaults on other
+ # configurations.
+ if [ "${CT_BARE_METAL},${CT_CANADIAN}" = "y,y" ]; then
+ repair_cc="CC_FOR_BUILD=${CT_BUILD}-gcc \
+ CXX_FOR_BUILD=${CT_BUILD}-g++ \
+ GCC_FOR_TARGET=${CT_TARGET}-${CT_CC}"
+ else
+ repair_cc=""
+ fi
+
+ CT_DoExecLog ALL make ${JOBSFLAGS} -C gcc ${libgcc_rule} \
+ ${repair_cc}
+ sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule}
+ else # build_libgcc
+ core_targets=( gcc )
+ fi # ! build libgcc
+ if [ "${build_libstdcxx}" = "yes" \
+ -a "${CT_CC_LANG_CXX}" = "y" \
+ ]; then
+ core_targets+=( target-libstdc++-v3 )
+ fi
+
+ if [ "${build_libgfortran}" = "yes" \
+ -a "${CT_CC_LANG_FORTRAN}" = "y" \
+ ]; then
+ core_targets+=( target-libgfortran )
+ fi
+
+ core_targets_all="${core_targets[@]/#/all-}"
+ core_targets_install="${core_targets[@]/#/install-}"
+
+ case "${build_step}" in
+ gcc_build|gcc_host)
+ core_targets_all=all
+ core_targets_install=install
+ ;;
+ esac
+
+ CT_DoLog EXTRA "Building ${log_txt}"
+ CT_DoExecLog ALL make ${JOBSFLAGS} ${core_targets_all}
+
+ # Do not pass ${JOBSFLAGS} here: recent GCC builds have been failing
+ # in parallel 'make install' at random locations: libitm, libcilk,
+ # always for the files that are installed more than once to the same
+ # location (such as libitm.info).
+ # The symptom is that the install command fails with "File exists"
+ # error; running the same command manually succeeds. It looks like
+ # attempts to remove the destination and re-create it, but another
+ # install gets in the way.
+ CT_DoLog EXTRA "Installing ${log_txt}"
+ CT_DoExecLog ALL make ${core_targets_install}
+
+ # Remove the libtool "pseudo-libraries": having them in the installed
+ # tree makes the libtoolized utilities that are built next assume
+ # that, for example, libsupc++ is an "accessory library", and not include
+ # -lsupc++ to the link flags. That breaks ltrace, for example.
+ CT_DoLog EXTRA "Housekeeping for core gcc compiler"
+ CT_Pushd "${prefix}"
+ find . -type f -name "*.la" -exec rm {} \; |CT_DoLog ALL
+ CT_Popd
+
+ if [ "${build_manuals}" = "yes" ]; then
+ CT_DoLog EXTRA "Building the GCC manuals"
+ CT_DoExecLog ALL make pdf html
+ CT_DoLog EXTRA "Installing the GCC manuals"
+ CT_DoExecLog ALL make install-{pdf,html}-gcc
+ fi
+
+ # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-${CT_CC} to always be able
+ # to call the C compiler with the same, somewhat canonical name.
+ # check whether compiler has an extension
+ file="$( ls -1 "${prefix}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )"
+ [ -z "${file}" ] || ext=".${file##*.}"
+ if [ -f "${prefix}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then
+ CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
+ fi
+
+ cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \
+ host="${host}"
+}
+
+#------------------------------------------------------------------------------
+# Build complete gcc to run on build
+do_cc_for_build() {
+ local -a build_final_opts
+ local build_final_backend
+
+ # If native or simple cross toolchain is being built, then build==host;
+ # nothing to do.
+ case "${CT_TOOLCHAIN_TYPE}" in
+ native|cross) return 0;;
+ esac
+
+ build_final_opts+=( "host=${CT_BUILD}" )
+ build_final_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
+ build_final_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
+ build_final_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
+ build_final_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
+ build_final_opts+=( "lang_list=$( cc_gcc_lang_list )" )
+ build_final_opts+=( "build_step=gcc_build" )
+ if [ "${CT_BARE_METAL}" = "y" ]; then
+ # In the tests I've done, bare-metal was not impacted by the
+ # lack of such a compiler, but better safe than sorry...
+ build_final_opts+=( "mode=baremetal" )
+ build_final_opts+=( "build_libgcc=yes" )
+ build_final_opts+=( "build_libstdcxx=yes" )
+ build_final_opts+=( "build_libgfortran=yes" )
+ if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
+ build_final_opts+=( "build_staticlinked=yes" )
+ fi
+ build_final_backend=do_gcc_core_backend
+ else
+ build_final_backend=do_gcc_backend
+ fi
+
+ CT_DoStep INFO "Installing final gcc compiler for build"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final-build-${CT_BUILD}"
+
+ "${build_final_backend}" "${build_final_opts[@]}"
+
+ CT_Popd
+ CT_EndStep
+}
+
+gcc_movelibs() {
+ local multi_flags multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_index multi_count
+ local gcc_dir dst_dir
+ local rel
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ # Move only files, directories are for other multilibs. We're looking inside
+ # GCC's directory structure, thus use unmangled multi_os_dir that GCC reports.
+ gcc_dir="${CT_PREFIX_DIR}/${CT_TARGET}/lib/${multi_os_dir_gcc}"
+ if [ ! -d "${gcc_dir}" ]; then
+ # GCC didn't install anything outside of sysroot
+ return
+ fi
+ # Depending on the selected libc, we may or may not have the ${multi_os_dir_gcc}
+ # created by libc installation. If we do, use it. If we don't, use ${multi_os_dir}
+ # to avoid creating an otherwise empty directory.
+ dst_dir="${multi_root}/lib/${multi_os_dir_gcc}"
+ if [ ! -d "${dst_dir}" ]; then
+ dst_dir="${multi_root}/lib/${multi_os_dir}"
+ fi
+ CT_SanitizeVarDir dst_dir gcc_dir
+ rel=$( echo "${gcc_dir#${CT_PREFIX_DIR}/}" | sed 's#[^/]\{1,\}#..#g' )
+
+ ls "${gcc_dir}" | while read f; do
+ case "${f}" in
+ *.ld)
+ # Linker scripts remain in GCC's directory; elf2flt insists on
+ # finding them there.
+ continue
+ ;;
+ esac
+ if [ -f "${gcc_dir}/${f}" ]; then
+ CT_DoExecLog ALL mkdir -p "${dst_dir}"
+ CT_DoExecLog ALL mv "${gcc_dir}/${f}" "${dst_dir}/${f}"
+ CT_DoExecLog ALL ln -sf "${rel}/${dst_dir#${CT_PREFIX_DIR}/}/${f}" "${gcc_dir}/${f}"
+ fi
+ done
+}
+
+#------------------------------------------------------------------------------
+# Build final gcc to run on host
+do_cc_for_host() {
+ local -a final_opts
+ local final_backend
+
+ final_opts+=( "host=${CT_HOST}" )
+ final_opts+=( "prefix=${CT_PREFIX_DIR}" )
+ final_opts+=( "complibs=${CT_HOST_COMPLIBS_DIR}" )
+ final_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
+ final_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
+ final_opts+=( "lang_list=$( cc_gcc_lang_list )" )
+ final_opts+=( "build_step=gcc_host" )
+ if [ "${CT_BUILD_MANUALS}" = "y" ]; then
+ final_opts+=( "build_manuals=yes" )
+ fi
+ if [ "${CT_BARE_METAL}" = "y" ]; then
+ final_opts+=( "mode=baremetal" )
+ final_opts+=( "build_libgcc=yes" )
+ final_opts+=( "build_libstdcxx=yes" )
+ final_opts+=( "build_libgfortran=yes" )
+ if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
+ final_opts+=( "build_staticlinked=yes" )
+ fi
+ final_backend=do_gcc_core_backend
+ else
+ final_backend=do_gcc_backend
+ fi
+
+ CT_DoStep INFO "Installing final gcc compiler"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final"
+ "${final_backend}" "${final_opts[@]}"
+ CT_Popd
+
+ # GCC installs stuff (including libgcc) into its own /lib dir,
+ # outside of sysroot, breaking linking with -static-libgcc.
+ # Fix up by moving the libraries into the sysroot.
+ if [ "${CT_USE_SYSROOT}" = "y" ]; then
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-final-movelibs"
+ CT_IterateMultilibs gcc_movelibs movelibs
+ CT_Popd
+ fi
+
+ CT_EndStep
+}
+
+#------------------------------------------------------------------------------
+# Build the final gcc
+# Usage: do_gcc_backend param=value [...]
+# Parameter : Definition : Type : Default
+# host : the host we run onto : tuple : (none)
+# prefix : the runtime prefix : dir : (none)
+# complibs : the companion libraries prefix : dir : (none)
+# cflags : cflags to use : string : (empty)
+# ldflags : ldflags to use : string : (empty)
+# lang_list : the list of languages to build : string : (empty)
+# build_manuals : whether to build manuals or not : bool : no
+do_gcc_backend() {
+ local host
+ local prefix
+ local complibs
+ local lang_list
+ local cflags
+ local cflags_for_build
+ local ldflags
+ local build_manuals
+ local -a host_libstdcxx_flags
+ local -a extra_config
+ local -a final_LDFLAGS
+ local tmp
+ local arg
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ CT_DoLog EXTRA "Configuring final gcc compiler"
+
+ # Enable selected languages
+ extra_config+=("--enable-languages=${lang_list}")
+
+ for tmp in ARCH ABI CPU TUNE FPU FLOAT; do
+ eval tmp="\${CT_ARCH_WITH_${tmp}}"
+ if [ -n "${tmp}" ]; then
+ extra_config+=("${tmp}")
+ fi
+ done
+
+ [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
+ [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
+
+ if [ "${CT_SHARED_LIBS}" != "y" ]; then
+ extra_config+=("--disable-shared")
+ fi
+
+ case "${CT_CC_GCC_SJLJ_EXCEPTIONS}" in
+ y) extra_config+=("--enable-sjlj-exceptions");;
+ m) ;;
+ "") extra_config+=("--disable-sjlj-exceptions");;
+ esac
+ if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
+ extra_config+=("--enable-__cxa_atexit")
+ else
+ extra_config+=("--disable-__cxa_atexit")
+ fi
+
+ if [ -n "${CT_CC_GCC_ENABLE_CXX_FLAGS}" ]; then
+ extra_config+=("--enable-cxx-flags=${CT_CC_GCC_ENABLE_CXX_FLAGS}")
+ fi
+
+ if [ "${CT_THREADS}" = "none" ]; then
+ extra_config+=(--disable-libatomic)
+ fi
+ if [ "${CT_CC_GCC_LIBMUDFLAP}" = "y" ]; then
+ extra_config+=(--enable-libmudflap)
+ else
+ extra_config+=(--disable-libmudflap)
+ fi
+ if [ "${CT_CC_GCC_LIBGOMP}" = "y" ]; then
+ extra_config+=(--enable-libgomp)
+ else
+ extra_config+=(--disable-libgomp)
+ fi
+ if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then
+ extra_config+=(--enable-libssp)
+ else
+ extra_config+=(--disable-libssp)
+ fi
+ if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then
+ extra_config+=(--enable-libquadmath)
+ extra_config+=(--enable-libquadmath-support)
+ else
+ extra_config+=(--disable-libquadmath)
+ extra_config+=(--disable-libquadmath-support)
+ fi
+
+ if [ "${CT_CC_GCC_LIBSANITIZER}" = "y" ]; then
+ extra_config+=(--enable-libsanitizer)
+ else
+ extra_config+=(--disable-libsanitizer)
+ fi
+
+ if [ "${CT_CC_GCC_HAS_LIBMPX}" = "y" ]; then
+ if [ "${CT_CC_GCC_LIBMPX}" = "y" ]; then
+ extra_config+=(--enable-libmpx)
+ else
+ extra_config+=(--disable-libmpx)
+ fi
+ fi
+
+ final_LDFLAGS+=("${ldflags}")
+
+ # *** WARNING ! ***
+ # Keep this full if-else-if-elif-fi-fi block in sync
+ # with the same block in do_gcc_core_backend, above.
+ if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
+ final_LDFLAGS+=("-static")
+ host_libstdcxx_flags+=("-static-libgcc")
+ host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++")
+ host_libstdcxx_flags+=("-lm")
+ # Companion libraries are build static (eg !shared), so
+ # the libstdc++ is not pulled automatically, although it
+ # is needed. Shoe-horn it in our LDFLAGS
+ # Ditto libm on some Fedora boxen
+ final_LDFLAGS+=("-lstdc++")
+ final_LDFLAGS+=("-lm")
+ else
+ if [ "${CT_CC_GCC_STATIC_LIBSTDCXX}" = "y" ]; then
+ # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2
+ # build script
+ # INFO: if the host gcc is gcc-4.5 then presumably we could use -static-libstdc++,
+ # see http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01635.html
+ host_libstdcxx_flags+=("-static-libgcc")
+ host_libstdcxx_flags+=("-Wl,-Bstatic,-lstdc++,-Bdynamic")
+ host_libstdcxx_flags+=("-lm")
+ fi
+ # When companion libraries are build static (eg !shared),
+ # the libstdc++ is not pulled automatically, although it
+ # is needed. Shoe-horn it in our LDFLAGS
+ # Ditto libm on some Fedora boxen
+ final_LDFLAGS+=("-lstdc++")
+ final_LDFLAGS+=("-lm")
+ fi
+
+ extra_config+=("--with-gmp=${complibs}")
+ extra_config+=("--with-mpfr=${complibs}")
+ extra_config+=("--with-mpc=${complibs}")
+ if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then
+ if [ "${CT_ISL}" = "y" ]; then
+ extra_config+=("--with-isl=${complibs}")
+ fi
+ if [ "${CT_CLOOG}" = "y" ]; then
+ extra_config+=("--with-cloog=${complibs}")
+ fi
+ else
+ extra_config+=("--with-isl=no")
+ extra_config+=("--with-cloog=no")
+ fi
+ if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then
+ extra_config+=("--enable-lto")
+ else
+ extra_config+=("--disable-lto")
+ fi
+
+ if [ ${#host_libstdcxx_flags[@]} -ne 0 ]; then
+ extra_config+=("--with-host-libstdcxx=${host_libstdcxx_flags[*]}")
+ fi
+
+ if [ "${CT_THREADS}" = "none" ]; then
+ extra_config+=("--disable-threads")
+ else
+ if [ "${CT_THREADS}" = "win32" ]; then
+ extra_config+=("--enable-threads=win32")
+ extra_config+=("--disable-win32-registry")
+ else
+ extra_config+=("--enable-threads=posix")
+ fi
+ fi
+
+ if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
+ extra_config+=("--enable-target-optspace")
+ fi
+ if [ "${CT_CC_GCC_DISABLE_PCH}" = "y" ]; then
+ extra_config+=("--disable-libstdcxx-pch")
+ fi
+
+ case "${CT_CC_GCC_LDBL_128}" in
+ y) extra_config+=("--with-long-double-128");;
+ m) ;;
+ "") extra_config+=("--without-long-double-128");;
+ esac
+
+ if [ "${CT_CC_GCC_BUILD_ID}" = "y" ]; then
+ extra_config+=( --enable-linker-build-id )
+ fi
+
+ case "${CT_CC_GCC_LNK_HASH_STYLE}" in
+ "") ;;
+ *) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
+ esac
+
+ case "${CT_CC_GCC_DEC_FLOATS}" in
+ "") ;;
+ *) extra_config+=( "--enable-decimal-float=${CT_CC_GCC_DEC_FLOATS}" );;
+ esac
+
+ if [ "${CT_CC_GCC_ENABLE_PLUGINS}" = "y" ]; then
+ extra_config+=( --enable-plugin )
+ else
+ extra_config+=( --disable-plugin )
+ fi
+ if [ "${CT_CC_GCC_GOLD}" = "y" ]; then
+ extra_config+=( --enable-gold )
+ fi
+
+ case "${CT_ARCH}" in
+ mips)
+ case "${CT_CC_GCC_mips_llsc}" in
+ y) extra_config+=( --with-llsc );;
+ m) ;;
+ *) extra_config+=( --without-llsc );;
+ esac
+ case "${CT_CC_GCC_mips_synci}" in
+ y) extra_config+=( --with-synci );;
+ m) ;;
+ *) extra_config+=( --without-synci );;
+ esac
+ if [ "${CT_CC_GCC_mips_plt}" ]; then
+ extra_config+=( --with-mips-plt )
+ fi
+ ;; # ARCH is mips
+ esac
+
+ if [ "${CT_TOOLCHAIN_ENABLE_NLS}" = "y" ]; then
+ extra_config+=("--with-libintl-prefix=${complibs}")
+ else
+ extra_config+=("--disable-nls")
+ fi
+
+ if [ "${CT_CC_GCC_SYSTEM_ZLIB}" = "y" ]; then
+ extra_config+=("--with-system-zlib")
+ fi
+
+ case "${CT_CC_GCC_CONFIG_TLS}" in
+ y) extra_config+=("--enable-tls");;
+ m) ;;
+ "") extra_config+=("--disable-tls");;
+ esac
+
+ # Some versions of gcc have a defective --enable-multilib.
+ # Since that's the default, only pass --disable-multilib.
+ if [ "${CT_MULTILIB}" != "y" ]; then
+ extra_config+=("--disable-multilib")
+ else
+ extra_config+=("--enable-multiarch")
+ if [ -n "${CT_CC_GCC_MULTILIB_LIST}" ]; then
+ extra_config+=("--with-multilib-list=${CT_CC_GCC_MULTILIB_LIST}")
+ fi
+ fi
+
+ CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
+
+ # We may need to modify host/build CFLAGS separately below
+ cflags_for_build="${cflags}"
+
+ # Clang's default bracket-depth is 256, and building GCC
+ # requires somewhere between 257 and 512.
+ if [ "${host}" = "${CT_BUILD}" ]; then
+ if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then
+ cflags="$cflags "-fbracket-depth=512
+ cflags_for_build="$cflags_for_build "-fbracket-depth=512
+ fi
+ else
+ # FIXME we currently don't support clang as host compiler, only as build
+ if ${CT_BUILD}-gcc --version 2>&1 | grep clang; then
+ cflags_for_build="$cflags_for_build "-fbracket-depth=512
+ fi
+ fi
+
+ CT_DoExecLog CFG \
+ CC_FOR_BUILD="${CT_BUILD}-gcc" \
+ CFLAGS="${cflags}" \
+ CFLAGS_FOR_BUILD="${cflags_for_build}" \
+ CXXFLAGS="${cflags}" \
+ CXXFLAGS_FOR_BUILD="${cflags_for_build}" \
+ LDFLAGS="${final_LDFLAGS[*]}" \
+ CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \
+ CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \
+ LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \
+ ${CONFIG_SHELL} \
+ "${CT_SRC_DIR}/gcc/configure" \
+ --build=${CT_BUILD} \
+ --host=${host} \
+ --target=${CT_TARGET} \
+ --prefix="${prefix}" \
+ ${CT_CC_SYSROOT_ARG} \
+ "${extra_config[@]}" \
+ --with-local-prefix="${CT_SYSROOT_DIR}" \
+ --enable-long-long \
+ "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}"
+
+ if [ "${CT_CANADIAN}" = "y" ]; then
+ CT_DoLog EXTRA "Building libiberty"
+ CT_DoExecLog ALL make ${JOBSFLAGS} all-build-libiberty
+ fi
+
+ CT_DoLog EXTRA "Building final gcc compiler"
+ CT_DoExecLog ALL make ${JOBSFLAGS} all
+
+ # See the note on issues with parallel 'make install' in GCC above.
+ CT_DoLog EXTRA "Installing final gcc compiler"
+ if [ "${CT_STRIP_TARGET_TOOLCHAIN_EXECUTABLES}" = "y" ]; then
+ CT_DoExecLog ALL make install-strip
+ else
+ CT_DoExecLog ALL make install
+ fi
+
+ # Remove the libtool "pseudo-libraries": having them in the installed
+ # tree makes the libtoolized utilities that are built next assume
+ # that, for example, libsupc++ is an "accessory library", and not include
+ # -lsupc++ to the link flags. That breaks ltrace, for example.
+ CT_DoLog EXTRA "Housekeeping for final gcc compiler"
+ CT_Pushd "${prefix}"
+ find . -type f -name "*.la" -exec rm {} \; |CT_DoLog ALL
+ CT_Popd
+
+ if [ "${build_manuals}" = "yes" ]; then
+ CT_DoLog EXTRA "Building the GCC manuals"
+ CT_DoExecLog ALL make pdf html
+ CT_DoLog EXTRA "Installing the GCC manuals"
+ CT_DoExecLog ALL make install-{pdf,html}-gcc
+ fi
+
+ # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-${CT_CC} to always be able
+ # to call the C compiler with the same, somewhat canonical name.
+ # check whether compiler has an extension
+ file="$( ls -1 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )"
+ [ -z "${file}" ] || ext=".${file##*.}"
+ if [ -f "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then
+ CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
+ fi
+
+ cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \
+ host="${host}"
+}
diff --git a/scripts/build/companion_libs/050-zlib.sh b/scripts/build/companion_libs/050-zlib.sh
index a3ba638..868bf3d 100644
--- a/scripts/build/companion_libs/050-zlib.sh
+++ b/scripts/build/companion_libs/050-zlib.sh
@@ -13,14 +13,12 @@ if [ "${CT_ZLIB}" = "y" ]; then
# Download zlib
do_zlib_get() {
- CT_GetFile "zlib-${CT_ZLIB_VERSION}" \
- "http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}"
+ CT_Fetch ZLIB
}
# Extract zlib
do_zlib_extract() {
- CT_Extract "zlib-${CT_ZLIB_VERSION}"
- CT_Patch "zlib" "${CT_ZLIB_VERSION}"
+ CT_ExtractPatch ZLIB
}
# Build zlib for running on build
@@ -87,7 +85,7 @@ do_zlib_backend() {
# zlib treats mingw host differently and requires using a different
# makefile rather than configure+make. It also does not support
# out-of-tree building.
- cp -av "${CT_SRC_DIR}/zlib-${CT_ZLIB_VERSION}/." .
+ cp -av "${CT_SRC_DIR}/zlib/." .
extra_make=( -f win32/Makefile.gcc \
PREFIX="${host}-" \
SHAREDLIB= \
@@ -107,7 +105,7 @@ do_zlib_backend() {
LDFLAGS="${ldflags}" \
CHOST="${host}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/zlib-${CT_ZLIB_VERSION}/configure" \
+ "${CT_SRC_DIR}/zlib/configure" \
--prefix="${prefix}" \
--static \
"${extra_config[@]}"
diff --git a/scripts/build/companion_libs/100-gmp.sh b/scripts/build/companion_libs/100-gmp.sh
index e6a4875..272af66 100644
--- a/scripts/build/companion_libs/100-gmp.sh
+++ b/scripts/build/companion_libs/100-gmp.sh
@@ -13,15 +13,12 @@ if [ "${CT_GMP}" = "y" ]; then
# Download GMP
do_gmp_get() {
- CT_GetFile "gmp-${CT_GMP_VERSION}" \
- https://gmplib.org/download/gmp \
- {http,ftp,https}://ftp.gnu.org/gnu/gmp
+ CT_Fetch GMP
}
# Extract GMP
do_gmp_extract() {
- CT_Extract "gmp-${CT_GMP_VERSION}"
- CT_Patch "gmp" "${CT_GMP_VERSION}"
+ CT_ExtractPatch GMP
}
# Build GMP for running on build
@@ -84,7 +81,9 @@ do_gmp_backend() {
CT_DoLog EXTRA "Configuring GMP"
- if [ ! "${CT_GMP_5_0_2_or_later}" = "y" ]; then
+ # FIXME is it needed even for older versions? They seem to compile fine
+ # without it.
+ if [ "${CT_GMP_HAS_MPBSD}" = "y" ]; then
extra_config+=("--enable-mpbsd")
fi
@@ -95,7 +94,7 @@ do_gmp_backend() {
CFLAGS="${cflags} -fexceptions" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
+ "${CT_SRC_DIR}/gmp/configure" \
--build=${CT_BUILD} \
--host=${host} \
--prefix="${prefix}" \
diff --git a/scripts/build/companion_libs/110-mpfr.sh b/scripts/build/companion_libs/110-mpfr.sh
index 5a89077..b4be3f4 100644
--- a/scripts/build/companion_libs/110-mpfr.sh
+++ b/scripts/build/companion_libs/110-mpfr.sh
@@ -13,16 +13,14 @@ if [ "${CT_MPFR}" = "y" ]; then
# Download MPFR
do_mpfr_get() {
- CT_GetFile "mpfr-${CT_MPFR_VERSION}" \
- {https,http,ftp}://ftp.gnu.org/gnu/mpfr \
- http://www.mpfr.org/mpfr-${CT_MPFR_VERSION}
+ CT_Fetch MPFR
}
# Extract MPFR
do_mpfr_extract() {
- CT_Extract "mpfr-${CT_MPFR_VERSION}"
- CT_Patch "mpfr" "${CT_MPFR_VERSION}"
+ CT_ExtractPatch MPFR
+ # TBD is it a problem with 2.4.x? The comment says it is not, yet the code is run
# OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the
# same version number. Unfortunately, some tarballs of MPFR are not
# built sanely, and thus ./configure fails on Gentoo.
@@ -115,7 +113,7 @@ do_mpfr_backend() {
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \
+ "${CT_SRC_DIR}/mpfr/configure" \
--build=${CT_BUILD} \
--host=${host} \
--prefix="${prefix}" \
diff --git a/scripts/build/companion_libs/121-isl.sh b/scripts/build/companion_libs/121-isl.sh
index ef93bbd..d96e9ce 100644
--- a/scripts/build/companion_libs/121-isl.sh
+++ b/scripts/build/companion_libs/121-isl.sh
@@ -13,14 +13,12 @@ if [ "${CT_ISL}" = "y" ]; then
# Download ISL
do_isl_get() {
- CT_GetFile "isl-${CT_ISL_VERSION}" \
- http://isl.gforge.inria.fr
+ CT_Fetch ISL
}
# Extract ISL
do_isl_extract() {
- CT_Extract "isl-${CT_ISL_VERSION}"
- CT_Patch "isl" "${CT_ISL_VERSION}"
+ CT_ExtractPatch ISL
}
# Build ISL for running on build
@@ -86,12 +84,12 @@ do_isl_backend() {
CT_DoLog EXTRA "Configuring ISL"
- if [ "${CT_ISL_V_0_12_or_later}" != "y" ]; then
+ if [ "${CT_ISL_NEEDS_WITH_GMP}" != "y" ]; then
extra_config+=("--with-libgmp-prefix=${prefix}")
extra_config+=("--with-libgmpxx-prefix=${prefix}")
fi
- if [ "${CT_ISL_V_0_14_or_later}" != "y" ]; then
+ if [ "${CT_ISL_HAS_WITH_PIPLIB}" != "y" ]; then
extra_config+=("--with-piplib=no")
fi
@@ -100,7 +98,7 @@ do_isl_backend() {
CXXFLAGS="${cxxflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/isl-${CT_ISL_VERSION}/configure" \
+ "${CT_SRC_DIR}/isl/configure" \
--build=${CT_BUILD} \
--host=${host} \
--prefix="${prefix}" \
diff --git a/scripts/build/companion_libs/130-cloog.sh b/scripts/build/companion_libs/130-cloog.sh
index b21b028..445d259 100644
--- a/scripts/build/companion_libs/130-cloog.sh
+++ b/scripts/build/companion_libs/130-cloog.sh
@@ -13,18 +13,12 @@ if [ "${CT_CLOOG}" = "y" ]; then
# Download CLooG
do_cloog_get() {
- CT_GetFile "cloog-${CT_CLOOG_VERSION}" \
- http://www.bastoul.net/cloog/pages/download \
- ftp://gcc.gnu.org/pub/gcc/infrastructure
+ CT_Fetch CLOOG
}
# Extract CLooG
do_cloog_extract() {
- CT_Extract "cloog-${CT_CLOOG_VERSION}"
- CT_Patch "cloog" "${CT_CLOOG_VERSION}"
-
- # Help the autostuff in case it thinks there are things to regenerate...
- CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/cloog-${CT_CLOOG_VERSION}/m4"
+ CT_ExtractPatch CLOOG
}
# Build CLooG for running on build
@@ -85,7 +79,7 @@ do_cloog_backend() {
eval "${arg// /\\ }"
done
- if [ "${CT_CLOOG_0_18_or_later}" = y ]; then
+ if [ "${CT_CLOOG_HAS_WITH_GMP_ISL_OSL}" = y ]; then
cloog_opts+=( --with-gmp=system --with-gmp-prefix="${prefix}" )
cloog_opts+=( --with-isl=system --with-isl-prefix="${prefix}" )
cloog_opts+=( --without-osl )
@@ -98,7 +92,7 @@ do_cloog_backend() {
LDFLAGS="${ldflags}" \
LIBS="-lm" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/cloog-${CT_CLOOG_VERSION}/configure" \
+ "${CT_SRC_DIR}/cloog/configure" \
--build=${CT_BUILD} \
--host=${host} \
--prefix="${prefix}" \
diff --git a/scripts/build/companion_libs/140-mpc.sh b/scripts/build/companion_libs/140-mpc.sh
index e6efb4f..3136ab4 100644
--- a/scripts/build/companion_libs/140-mpc.sh
+++ b/scripts/build/companion_libs/140-mpc.sh
@@ -13,15 +13,12 @@ if [ "${CT_MPC}" = "y" ]; then
# Download MPC
do_mpc_get() {
- CT_GetFile "mpc-${CT_MPC_VERSION}" .tar.gz \
- {http,ftp,https}://ftp.gnu.org/gnu/mpc \
- http://www.multiprecision.org/mpc/download
+ CT_Fetch MPC
}
# Extract MPC
do_mpc_extract() {
- CT_Extract "mpc-${CT_MPC_VERSION}"
- CT_Patch "mpc" "${CT_MPC_VERSION}"
+ CT_ExtractPatch MPC
}
# Build MPC for running on build
@@ -87,7 +84,7 @@ do_mpc_backend() {
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \
+ "${CT_SRC_DIR}/mpc/configure" \
--build=${CT_BUILD} \
--host=${host} \
--prefix="${prefix}" \
diff --git a/scripts/build/companion_libs/200-libelf.sh b/scripts/build/companion_libs/200-libelf.sh
index 807ce7e..d1ac0b4 100644
--- a/scripts/build/companion_libs/200-libelf.sh
+++ b/scripts/build/companion_libs/200-libelf.sh
@@ -9,15 +9,11 @@ do_libelf_for_target() { :; }
if [ "${CT_LIBELF}" = "y" -o "${CT_LIBELF_TARGET}" = "y" ]; then
do_libelf_get() {
- # The server hosting libelf will return an "HTTP 300 : Multiple Choices"
- # error code if we try to download a file that does not exists there.
- # So we have to request the file with an explicit extension.
- CT_GetFile "libelf-${CT_LIBELF_VERSION}" .tar.gz http://www.mr511.de/software/
+ CT_Fetch LIBELF
}
do_libelf_extract() {
- CT_Extract "libelf-${CT_LIBELF_VERSION}"
- CT_Patch "libelf" "${CT_LIBELF_VERSION}"
+ CT_ExtractPatch LIBELF
}
if [ "${CT_LIBELF}" = "y" ]; then
@@ -131,7 +127,7 @@ do_libelf_backend() {
CFLAGS="${cflags} -fPIC" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \
+ "${CT_SRC_DIR}/libelf/configure" \
--build=${CT_BUILD} \
--host=${host} \
--target=${CT_TARGET} \
diff --git a/scripts/build/companion_libs/210-expat.sh b/scripts/build/companion_libs/210-expat.sh
index 5aa8e31..dcb7208 100644
--- a/scripts/build/companion_libs/210-expat.sh
+++ b/scripts/build/companion_libs/210-expat.sh
@@ -9,13 +9,11 @@ do_expat_for_target() { :; }
if [ "${CT_EXPAT_TARGET}" = "y" -o "${CT_EXPAT}" = "y" ]; then
do_expat_get() {
- CT_GetFile "expat-${CT_EXPAT_VERSION}" .tar.gz \
- http://downloads.sourceforge.net/project/expat/expat/${CT_EXPAT_VERSION}
+ CT_Fetch EXPAT
}
do_expat_extract() {
- CT_Extract "expat-${CT_EXPAT_VERSION}"
- CT_Patch "expat" "${CT_EXPAT_VERSION}"
+ CT_ExtractPatch EXPAT
}
if [ "${CT_EXPAT}" = "y" ]; then
@@ -95,7 +93,7 @@ do_expat_backend() {
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/expat-${CT_EXPAT_VERSION}/configure" \
+ "${CT_SRC_DIR}/expat/configure" \
--build=${CT_BUILD} \
--host=${host} \
--prefix="${prefix}" \
diff --git a/scripts/build/companion_libs/220-ncurses.sh b/scripts/build/companion_libs/220-ncurses.sh
index 7a1379d..815cf4b 100644
--- a/scripts/build/companion_libs/220-ncurses.sh
+++ b/scripts/build/companion_libs/220-ncurses.sh
@@ -9,15 +9,11 @@ do_ncurses_for_target() { :; }
if [ "${CT_NCURSES_TARGET}" = "y" -o "${CT_NCURSES}" = "y" ]; then
do_ncurses_get() {
- CT_GetFile "ncurses-${CT_NCURSES_VERSION}" .tar.gz \
- {http,ftp,https}://ftp.gnu.org/pub/gnu/ncurses \
- ftp://invisible-island.net/ncurses
+ CT_Fetch NCURSES
}
do_ncurses_extract() {
- CT_Extract "ncurses-${CT_NCURSES_VERSION}"
- CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/ncurses-${CT_NCURSES_VERSION}"
- CT_Patch "ncurses" "${CT_NCURSES_VERSION}"
+ CT_ExtractPatch NCURSES
}
# We need tic that runs on the build when building ncurses for host/target
@@ -157,7 +153,7 @@ do_ncurses_backend() {
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/ncurses-${CT_NCURSES_VERSION}/configure" \
+ "${CT_SRC_DIR}/ncurses/configure" \
--build=${CT_BUILD} \
--host=${host} \
--prefix="${prefix}" \
diff --git a/scripts/build/companion_libs/320-libiconv.sh b/scripts/build/companion_libs/320-libiconv.sh
index f2f0bef..ad571a9 100644
--- a/scripts/build/companion_libs/320-libiconv.sh
+++ b/scripts/build/companion_libs/320-libiconv.sh
@@ -9,13 +9,11 @@ do_libiconv_for_target() { :; }
if [ "${CT_LIBICONV}" = "y" ]; then
do_libiconv_get() {
- CT_GetFile "libiconv-${CT_LIBICONV_VERSION}" \
- http://ftp.gnu.org/pub/gnu/libiconv/
+ CT_Fetch LIBICONV
}
do_libiconv_extract() {
- CT_Extract "libiconv-${CT_LIBICONV_VERSION}"
- CT_Patch "libiconv" "${CT_LIBICONV_VERSION}"
+ CT_ExtractPatch LIBICONV
}
# Build libiconv for running on build
@@ -93,7 +91,7 @@ do_libiconv_backend() {
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/libiconv-${CT_LIBICONV_VERSION}/configure" \
+ "${CT_SRC_DIR}/libiconv/configure" \
--build=${CT_BUILD} \
--host="${host}" \
--prefix="${prefix}" \
diff --git a/scripts/build/companion_libs/330-gettext.sh b/scripts/build/companion_libs/330-gettext.sh
index 8828e5d..f3f1497 100644
--- a/scripts/build/companion_libs/330-gettext.sh
+++ b/scripts/build/companion_libs/330-gettext.sh
@@ -9,13 +9,11 @@ do_gettext_for_target() { :; }
if [ "${CT_GETTEXT}" = "y" ]; then
do_gettext_get() {
- CT_GetFile "gettext-${CT_GETTEXT_VERSION}" \
- http://ftp.gnu.org/pub/gnu/gettext/
+ CT_Fetch GETTEXT
}
do_gettext_extract() {
- CT_Extract "gettext-${CT_GETTEXT_VERSION}"
- CT_Patch "gettext" "${CT_GETTEXT_VERSION}"
+ CT_ExtractPatch GETTEXT
}
# Build gettext for running on build
@@ -112,7 +110,7 @@ do_gettext_backend() {
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/gettext-${CT_GETTEXT_VERSION}/configure" \
+ "${CT_SRC_DIR}/gettext/configure" \
--build=${CT_BUILD} \
--host="${host}" \
--prefix="${prefix}" \
diff --git a/scripts/build/companion_tools.sh b/scripts/build/companion_tools.sh
index b190ed7..7776f64 100644
--- a/scripts/build/companion_tools.sh
+++ b/scripts/build/companion_tools.sh
@@ -5,7 +5,7 @@ CT_COMP_TOOLS_FACILITY_LIST=
for f in "${CT_LIB_DIR}/scripts/build/companion_tools/"*.sh; do
_f="$(basename "${f}" .sh)"
_f="${_f#???-}"
- __f="CT_COMP_TOOLS_${_f}"
+ __f="CT_COMP_TOOLS_${_f^^}"
if [ "${!__f}" = "y" ]; then
CT_DoLog DEBUG "Enabling companion tool '${_f}'"
. "${f}"
diff --git a/scripts/build/companion_tools/050-make.sh b/scripts/build/companion_tools/050-make.sh
index 76b24aa..3253f5b 100644
--- a/scripts/build/companion_tools/050-make.sh
+++ b/scripts/build/companion_tools/050-make.sh
@@ -1,14 +1,11 @@
# Build script for make
do_companion_tools_make_get() {
- CT_GetFile "make-${CT_MAKE_VERSION}" \
- {http,ftp,https}://ftp.gnu.org/gnu/make
+ CT_Fetch MAKE
}
do_companion_tools_make_extract() {
- CT_Extract "make-${CT_MAKE_VERSION}"
- CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/make-${CT_MAKE_VERSION}"
- CT_Patch "make" "${CT_MAKE_VERSION}"
+ CT_ExtractPatch MAKE
}
do_companion_tools_make_for_build() {
@@ -61,7 +58,7 @@ do_make_backend() {
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/make-${CT_MAKE_VERSION}/configure" \
+ "${CT_SRC_DIR}/make/configure" \
--host="${host}" \
--prefix="${prefix}" \
"${extra_config[@]}"
diff --git a/scripts/build/companion_tools/100-m4.sh b/scripts/build/companion_tools/100-m4.sh
index e0fccd7..1707d64 100644
--- a/scripts/build/companion_tools/100-m4.sh
+++ b/scripts/build/companion_tools/100-m4.sh
@@ -1,13 +1,11 @@
# Build script for m4
do_companion_tools_m4_get() {
- CT_GetFile "m4-${CT_M4_VERSION}" \
- {http,ftp,https}://ftp.gnu.org/gnu/m4
+ CT_Fetch M4
}
do_companion_tools_m4_extract() {
- CT_Extract "m4-${CT_M4_VERSION}"
- CT_Patch "m4" "${CT_M4_VERSION}"
+ CT_ExtractPatch M4
}
do_companion_tools_m4_for_build() {
@@ -58,7 +56,7 @@ do_m4_backend() {
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/m4-${CT_M4_VERSION}/configure" \
+ "${CT_SRC_DIR}/m4/configure" \
--host="${host}" \
--prefix="${prefix}"
diff --git a/scripts/build/companion_tools/200-autoconf.sh b/scripts/build/companion_tools/200-autoconf.sh
index bccef75..52149ea 100644
--- a/scripts/build/companion_tools/200-autoconf.sh
+++ b/scripts/build/companion_tools/200-autoconf.sh
@@ -1,14 +1,11 @@
# Build script for autoconf
do_companion_tools_autoconf_get() {
- CT_GetFile "autoconf-${CT_AUTOCONF_VERSION}" \
- {http,ftp,https}://ftp.gnu.org/gnu/autoconf
+ CT_Fetch AUTOCONF
}
do_companion_tools_autoconf_extract() {
- CT_Extract "autoconf-${CT_AUTOCONF_VERSION}"
- CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/autoconf-${CT_AUTOCONF_VERSION}"
- CT_Patch "autoconf" "${CT_AUTOCONF_VERSION}"
+ CT_ExtractPatch AUTOCONF
}
do_companion_tools_autoconf_for_build() {
@@ -42,7 +39,7 @@ do_autoconf_backend() {
CT_DoLog EXTRA "Configuring autoconf"
CT_DoExecLog CFG \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/autoconf-${CT_AUTOCONF_VERSION}/configure" \
+ "${CT_SRC_DIR}/autoconf/configure" \
--host="${host}" \
--prefix="${prefix}"
diff --git a/scripts/build/companion_tools/300-automake.sh b/scripts/build/companion_tools/300-automake.sh
index ee76463..2d7eded 100644
--- a/scripts/build/companion_tools/300-automake.sh
+++ b/scripts/build/companion_tools/300-automake.sh
@@ -1,14 +1,11 @@
# Build script for automake
do_companion_tools_automake_get() {
- CT_GetFile "automake-${CT_AUTOMAKE_VERSION}" \
- {http,ftp,https}://ftp.gnu.org/gnu/automake
+ CT_Fetch AUTOMAKE
}
do_companion_tools_automake_extract() {
- CT_Extract "automake-${CT_AUTOMAKE_VERSION}"
- CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/automake-${CT_AUTOMAKE_VERSION}"
- CT_Patch "automake" "${CT_AUTOMAKE_VERSION}"
+ CT_ExtractPatch AUTOMAKE
}
do_companion_tools_automake_for_build() {
@@ -38,7 +35,7 @@ do_automake_backend() {
CT_DoLog EXTRA "Configuring automake"
CT_DoExecLog CFG \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/automake-${CT_AUTOMAKE_VERSION}/configure" \
+ "${CT_SRC_DIR}/automake/configure" \
--host="${host}" \
--prefix="${prefix}"
diff --git a/scripts/build/companion_tools/400-libtool.sh b/scripts/build/companion_tools/400-libtool.sh
index 4461207..3733072 100644
--- a/scripts/build/companion_tools/400-libtool.sh
+++ b/scripts/build/companion_tools/400-libtool.sh
@@ -1,14 +1,11 @@
# Build script for libtool
do_companion_tools_libtool_get() {
- CT_GetFile "libtool-${CT_LIBTOOL_VERSION}" \
- {http,ftp,https}://ftp.gnu.org/gnu/libtool
+ CT_Fetch LIBTOOL
}
do_companion_tools_libtool_extract() {
- CT_Extract "libtool-${CT_LIBTOOL_VERSION}"
- CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/libtool-${CT_LIBTOOL_VERSION}"
- CT_Patch "libtool" "${CT_LIBTOOL_VERSION}"
+ CT_ExtractPatch LIBTOOL
}
do_companion_tools_libtool_for_build() {
@@ -38,7 +35,7 @@ do_libtool_backend() {
CT_DoLog EXTRA "Configuring libtool"
CT_DoExecLog CFG \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/libtool-${CT_LIBTOOL_VERSION}/configure" \
+ "${CT_SRC_DIR}/libtool/configure" \
--host="${host}" \
--prefix="${prefix}"
diff --git a/scripts/build/debug.sh b/scripts/build/debug.sh
index f07b295..f8178dd 100644
--- a/scripts/build/debug.sh
+++ b/scripts/build/debug.sh
@@ -5,7 +5,7 @@ CT_DEBUG_FACILITY_LIST=
for f in "${CT_LIB_DIR}/scripts/build/debug/"*.sh; do
_f="$(basename "${f}" .sh)"
_f="${_f#???-}"
- __f="CT_DEBUG_${_f}"
+ __f="CT_DEBUG_${_f^^}"
if [ "${!__f}" = "y" ]; then
CT_DoLog DEBUG "Enabling debug '${_f}'"
. "${f}"
diff --git a/scripts/build/debug/200-duma.sh b/scripts/build/debug/200-duma.sh
index 2a9b01f..bd35030 100644
--- a/scripts/build/debug/200-duma.sh
+++ b/scripts/build/debug/200-duma.sh
@@ -1,24 +1,11 @@
# Build script for D.U.M.A.
do_debug_duma_get() {
- local dl_base
-
- dl_base="http://downloads.sourceforge.net/project/duma/duma"
- dl_base+="/${CT_DUMA_VERSION//_/.}"
-
- # Downloading an non-existing file from sourceforge will give you an
- # HTML file containing an error message, instead of returning a 404.
- # Sigh...
- CT_GetFile "duma_${CT_DUMA_VERSION}" .tar.gz "${dl_base}"
- # Downloading from sourceforge may leave garbage, cleanup
- CT_DoExecLog ALL rm -f "${CT_TARBALLS_DIR}/showfiles.php"*
+ CT_Fetch DUMA
}
do_debug_duma_extract() {
- CT_Extract "duma_${CT_DUMA_VERSION}"
- CT_Pushd "${CT_SRC_DIR}/duma_${CT_DUMA_VERSION}"
- CT_Patch nochdir "duma" "${CT_DUMA_VERSION}"
- CT_Popd
+ CT_ExtractPatch DUMA
}
do_debug_duma_build() {
@@ -26,7 +13,7 @@ do_debug_duma_build() {
CT_DoStep INFO "Installing D.U.M.A."
CT_DoLog EXTRA "Copying sources"
- cp -a "${CT_SRC_DIR}/duma_${CT_DUMA_VERSION}/." "${CT_BUILD_DIR}/build-duma"
+ cp -a "${CT_SRC_DIR}/duma/." "${CT_BUILD_DIR}/build-duma"
CT_Pushd "${CT_BUILD_DIR}/build-duma"
make_args=(
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index e5276d0..e3a40d0 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -1,40 +1,17 @@
# Build script for the gdb debug facility
do_debug_gdb_get() {
- local linaro_version=""
- local linaro_series=""
-
- if [ "${CT_GDB_CUSTOM}" = "y" ]; then
- CT_GetCustom "gdb" "${CT_GDB_CUSTOM_VERSION}" \
- "${CT_GDB_CUSTOM_LOCATION}"
- else
- case "${CT_GDB_VERSION}" in
- linaro-*)
- CT_GetLinaro "gdb" "${CT_GDB_VERSION}"
- ;;
- *)
- CT_GetFile "gdb-${CT_GDB_VERSION}" \
- http://mirrors.kernel.org/sourceware/gdb \
- {http,ftp,https}://ftp.gnu.org/pub/gnu/gdb \
- ftp://{sourceware.org,gcc.gnu.org}/pub/gdb/releases
- ;;
- esac
- fi
+ CT_Fetch GDB
}
do_debug_gdb_extract() {
- CT_Extract "gdb-${CT_GDB_VERSION}"
- CT_Patch "gdb" "${CT_GDB_VERSION}"
-
- if [ -n "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then
- CT_ConfigureXtensa "gdb" "${CT_GDB_VERSION}"
- fi
+ CT_ExtractPatch GDB
}
do_debug_gdb_build() {
local -a extra_config
- gdb_src_dir="${CT_SRC_DIR}/gdb-${CT_GDB_VERSION}"
+ gdb_src_dir="${CT_SRC_DIR}/gdb"
# Version 6.3 and below behave badly with gdbmi
case "${CT_GDB_VERSION}" in
@@ -42,7 +19,7 @@ do_debug_gdb_build() {
esac
if [ "${CT_GDB_HAS_PKGVERSION_BUGURL}" = "y" ]; then
- extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
+ [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
fi
@@ -174,11 +151,12 @@ do_debug_gdb_build() {
if [ "${CT_GDB_INSTALL_GDBINIT}" = "y" ]; then
CT_DoLog EXTRA "Installing '.gdbinit' template"
# See in scripts/build/internals.sh for why we do this
- if [ -f "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" ]; then
- gcc_version=$( cat "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" )
+ # TBD GCC 3.x and older not supported
+ if [ -f "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ]; then
+ gcc_version=$( cat "${CT_SRC_DIR}/gcc/gcc/BASE-VER" )
else
gcc_version=$(sed -r -e '/version_string/!d; s/^.+= "([^"]+)".*$/\1/;' \
- "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/version.c" \
+ "${CT_SRC_DIR}/gcc/gcc/version.c" \
)
fi
sed -r \
diff --git a/scripts/build/debug/400-ltrace.sh b/scripts/build/debug/400-ltrace.sh
index 6b860e9..ce299c2 100644
--- a/scripts/build/debug/400-ltrace.sh
+++ b/scripts/build/debug/400-ltrace.sh
@@ -1,19 +1,11 @@
# Build script for ltrace
do_debug_ltrace_get() {
- CT_GetFile "ltrace_${CT_LTRACE_VERSION}.orig" .tar.gz \
- {http,ftp}://ftp.debian.org/debian/pool/main/l/ltrace/
- # Create a link so that the following steps are easier to do:
- CT_Pushd "${CT_TARBALLS_DIR}"
- ltrace_ext=$(CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig")
- ln -sf "ltrace_${CT_LTRACE_VERSION}.orig${ltrace_ext}" \
- "ltrace-${CT_LTRACE_VERSION}${ltrace_ext}"
- CT_Popd
+ CT_Fetch LTRACE
}
do_debug_ltrace_extract() {
- CT_Extract "ltrace-${CT_LTRACE_VERSION}"
- CT_Patch "ltrace" "${CT_LTRACE_VERSION}"
+ CT_ExtractPatch LTRACE
}
do_debug_ltrace_build() {
@@ -22,7 +14,7 @@ do_debug_ltrace_build() {
CT_DoStep INFO "Installing ltrace"
CT_DoLog EXTRA "Copying sources to build dir"
- CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}/." \
+ CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ltrace/." \
"${CT_BUILD_DIR}/build-ltrace"
CT_Pushd "${CT_BUILD_DIR}/build-ltrace"
@@ -63,4 +55,3 @@ do_debug_ltrace_build() {
CT_Popd
CT_EndStep
}
-
diff --git a/scripts/build/debug/500-strace.sh b/scripts/build/debug/500-strace.sh
index 6eb2357..cb4643a 100644
--- a/scripts/build/debug/500-strace.sh
+++ b/scripts/build/debug/500-strace.sh
@@ -1,15 +1,11 @@
# Build script for strace
do_debug_strace_get() {
- local base_url="http://downloads.sourceforge.net/project/strace/strace"
- CT_GetFile "strace-${CT_STRACE_VERSION}" "${base_url}/${CT_STRACE_VERSION}"
- # Downloading from sourceforge leaves garbage, cleanup
- CT_DoExecLog ALL rm -f "${CT_TARBALLS_DIR}/showfiles.php"*
+ CT_Fetch STRACE
}
do_debug_strace_extract() {
- CT_Extract "strace-${CT_STRACE_VERSION}"
- CT_Patch "strace" "${CT_STRACE_VERSION}"
+ CT_ExtractPatch STRACE
}
do_debug_strace_build() {
@@ -23,7 +19,7 @@ do_debug_strace_build() {
CPP="${CT_TARGET}-cpp" \
LD="${CT_TARGET}-ld" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/strace-${CT_STRACE_VERSION}/configure" \
+ "${CT_SRC_DIR}/strace/configure" \
--build=${CT_BUILD} \
--host=${CT_TARGET} \
--prefix=/usr
diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
index db9b1fd..e407de8 100644
--- a/scripts/build/internals.sh
+++ b/scripts/build/internals.sh
@@ -69,18 +69,19 @@ do_finish() {
CT_DoExecLog ALL "${CT_TARGET}-strip" ${strip_args} \
"${CT_TARGET}/debug-root/usr/bin/gdbserver${exe_suffix}"
fi
- if [ "${CT_CC_gcc}" = "y" ]; then
- # We can not use the version in CT_CC_GCC_VERSION because
+ if [ "${CT_CC_GCC}" = "y" ]; then
+ # TBD GCC 3.x/2.x is no longer supported by ctng
+ # We can not use the version in CT_GCC_VERSION because
# of the Linaro stuff. So, harvest the version string
# directly from the gcc sources...
# All gcc 4.x seem to have the version in gcc/BASE-VER
# while version prior to 4.x have the version in gcc/version.c
# Of course, here is not the better place to do that...
- if [ -f "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" ]; then
- gcc_version=$( cat "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/BASE-VER" )
+ if [ -f "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ]; then
+ gcc_version=$( cat "${CT_SRC_DIR}/gcc/gcc/BASE-VER" )
else
gcc_version=$(sed -r -e '/version_string/!d; s/^.+= "([^"]+)".*$/\1/;' \
- "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/version.c" \
+ "${CT_SRC_DIR}/gcc/gcc/version.c" \
)
fi
for _t in "bin/${CT_TARGET}-"* \
diff --git a/scripts/build/kernel/linux.sh b/scripts/build/kernel/linux.sh
index cd4a456..5ab4918 100644
--- a/scripts/build/kernel/linux.sh
+++ b/scripts/build/kernel/linux.sh
@@ -19,69 +19,26 @@ CT_DoKernelTupleValues() {
# Download the kernel
do_kernel_get() {
- local k_ver
- local custom_name
- local rel_dir
- local korg_base mirror_base
+ CT_Fetch LINUX
+}
- if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then
- CT_GetCustom "linux" "${CT_KERNEL_LINUX_CUSTOM_VERSION}" \
- "${CT_KERNEL_LINUX_CUSTOM_LOCATION}"
- else # Not a custom tarball
- case "${CT_KERNEL_VERSION}" in
- 2.6.*.*|3.*.*|4.*.*)
- # 4-part versions (for 2.6 stables and long-terms), and
- # 3-part versions (for 3.x.y and 4.x.y stables and long-terms)
- # we need to trash the last digit
- k_ver="${CT_KERNEL_VERSION%.*}"
- ;;
- 2.6.*|3.*|4.*)
- # 3-part version (for 2.6.x initial releases), and 2-part
- # versions (for 3.x and 4.x initial releases), use all of it
- k_ver="${CT_KERNEL_VERSION}"
- ;;
- esac
- case "${CT_KERNEL_VERSION}" in
- 2.6.*) rel_dir=v2.6;;
- 3.*) rel_dir=v3.x;;
- 4.*) rel_dir=v4.x;;
- esac
- korg_base="http://www.kernel.org/pub/linux/kernel/${rel_dir}"
- CT_GetFile "linux-${CT_KERNEL_VERSION}" \
- "${korg_base}" \
- "${korg_base}/longterm/v${k_ver}" \
- "${korg_base}/longterm"
- fi
+# Disable building relocs application - it needs <linux/types.h>
+# on the host, which may not be present on Cygwin or MacOS; it
+# needs <elf.h>, which again is not present on MacOS; and most
+# important, we don't need it to install the headers.
+# This is not done as a patch, since it varies from Linux version
+# to version - patching each particular Linux version would be
+# too cumbersome.
+linux_disable_build_relocs()
+{
+ sed -i -r 's/(\$\(MAKE\) .* relocs)$/:/' arch/*/Makefile
}
# Extract kernel
-do_kernel_extract() {
- # If using a custom directory location, nothing to do
- if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" \
- -a -d "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}" ]; then
- return 0
- fi
-
- # Otherwise, we're using either a mainstream tarball, or a custom
- # tarball; in either case, we need to extract
- CT_Extract "linux-${CT_KERNEL_VERSION}"
-
- # If using a custom tarball, no need to patch
- if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then
- return 0
- fi
- CT_Patch "linux" "${CT_KERNEL_VERSION}"
-
- # Disable building relocs application - it needs <linux/types.h>
- # on the host, which may not be present on Cygwin or MacOS; it
- # needs <elf.h>, which again is not present on MacOS; and most
- # important, we don't need it to install the headers.
- # This is not done as a patch, since it varies from Linux version
- # to version - patching each particular Linux version would be
- # too cumbersome.
- CT_Pushd "${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}"
- sed -i -r 's/(\$\(MAKE\) .* relocs)$/:/' arch/*/Makefile
- CT_Popd
+do_kernel_extract()
+{
+ # TBD verify linux_disable_build_relocs is run
+ CT_ExtractPatch LINUX linux_disable_build_relocs
}
# Install kernel headers using headers_install from kernel sources.
@@ -93,7 +50,7 @@ do_kernel_headers() {
mkdir -p "${CT_BUILD_DIR}/build-kernel-headers"
- kernel_path="${CT_SRC_DIR}/linux-${CT_KERNEL_VERSION}"
+ kernel_path="${CT_SRC_DIR}/linux"
V_OPT="V=${CT_KERNEL_LINUX_VERBOSE_LEVEL}"
kernel_arch="${CT_ARCH}"
diff --git a/scripts/build/libc/avr-libc.sh b/scripts/build/libc/avr-libc.sh
index f94b601..7003f38 100644
--- a/scripts/build/libc/avr-libc.sh
+++ b/scripts/build/libc/avr-libc.sh
@@ -1,33 +1,11 @@
# This file adds functions to build the avr-libc C library
do_libc_get() {
- local libc_src
-
- libc_src="http://download.savannah.gnu.org/releases/avr-libc"
-
- if [ "${CT_LIBC_AVR_LIBC_CUSTOM}" = "y" ]; then
- CT_GetCustom "avr-libc" "${CT_LIBC_AVR_LIBC_CUSTOM_VERSION}" \
- "${CT_LIBC_AVR_LIBC_CUSTOM_LOCATION}"
- else # ! custom location
- CT_GetFile "avr-libc-${CT_LIBC_VERSION}" "${libc_src}"
- fi # ! custom location
+ CT_Fetch AVR_LIBC
}
do_libc_extract() {
- CT_Extract "avr-libc-${CT_LIBC_VERSION}"
- CT_Patch "avr-libc" "${CT_LIBC_VERSION}"
-}
-
-do_libc_configure() {
- CT_DoLog EXTRA "Configuring C library"
-
- CT_DoExecLog CFG \
- ${CONFIG_SHELL} \
- ./configure \
- --build=${CT_BUILD} \
- --host=${CT_TARGET} \
- --prefix=${CT_PREFIX_DIR} \
- "${CT_LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY[@]}"
+ CT_ExtractPatch AVR_LIBC
}
do_libc_start_files() {
@@ -42,11 +20,19 @@ do_libc_post_cc() {
CT_DoStep INFO "Installing C library"
CT_DoLog EXTRA "Copying sources to build directory"
- CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/avr-libc-${CT_LIBC_VERSION}/." \
+ CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/avr-libc/." \
"${CT_BUILD_DIR}/build-libc-post-cc"
cd "${CT_BUILD_DIR}/build-libc-post-cc"
- do_libc_configure
+ CT_DoLog EXTRA "Configuring C library"
+
+ CT_DoExecLog CFG \
+ ${CONFIG_SHELL} \
+ ./configure \
+ --build=${CT_BUILD} \
+ --host=${CT_TARGET} \
+ --prefix=${CT_PREFIX_DIR} \
+ "${CT_LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY[@]}"
CT_DoLog EXTRA "Building C library"
CT_DoExecLog ALL make ${JOBSFLAGS}
diff --git a/scripts/build/libc/bionic.sh b/scripts/build/libc/bionic.sh
index fcdc57f..027493d 100644
--- a/scripts/build/libc/bionic.sh
+++ b/scripts/build/libc/bionic.sh
@@ -3,37 +3,29 @@
# Licensed under the GPL v2. See COPYING in the root of this package
do_libc_get() {
- if [ "${CT_LIBC_BIONIC_CUSTOM}" = "y" ]; then
- CT_GetCustom "bionic" "${CT_LIBC_BIONIC_CUSTOM_VERSION}" \
- "${CT_LIBC_BIONIC_CUSTOM_LOCATION}"
- else # ! custom location
- CT_GetFile "android-ndk-${CT_LIBC_VERSION}-linux-x86_64.zip" https://dl.google.com/android/repository
- fi # ! custom location
+ CT_Fetch ANDROID_NDK
}
do_libc_extract() {
- CT_Extract "android-ndk-${CT_LIBC_VERSION}-linux-x86_64"
- CT_Pushd "${CT_SRC_DIR}/android-ndk-${CT_LIBC_VERSION}/"
- CT_Patch nochdir bionic "${CT_LIBC_VERSION}"
- CT_Popd
+ CT_ExtractPatch ANDROID_NDK
}
# Install Unified headers
do_libc_start_files() {
CT_DoStep INFO "Installing C library headers"
- CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk-${CT_LIBC_VERSION}/sysroot/usr" "${CT_SYSROOT_DIR}"
+ CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/sysroot/usr" "${CT_SYSROOT_DIR}"
}
do_libc() {
local arch="${CT_ARCH}"
if [ "${CT_ARCH_64}" = "y" ]; then
if [ "${CT_ARCH}" = "x86" ]; then
- arch="${arch}_"
- fi
- arch="${arch}64"
+ arch="${arch}_"
+ fi
+ arch="${arch}64"
fi
CT_DoStep INFO "Installing C library binaries"
- CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk-${CT_LIBC_VERSION}/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}"
+ CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}"
CT_EnvModify CT_TARGET_CFLAGS "${CT_TARGET_CFLAGS} -D__ANDROID_API__=${CT_ANDROID_API}"
}
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index 3eac3ba..3b4b626 100644
--- a/scripts/build/libc/glibc.sh
+++ b/scripts/build/libc/glibc.sh
@@ -5,104 +5,28 @@
do_libc_get() {
local date
local version
- local -a addons_list
-
- addons_list=($(do_libc_add_ons_list " "))
-
- # Main source
- if [ "${CT_LIBC_GLIBC_CUSTOM}" = "y" ]; then
- CT_GetCustom "glibc" "${CT_LIBC_GLIBC_CUSTOM_VERSION}" \
- "${CT_LIBC_GLIBC_CUSTOM_LOCATION}"
- else
- case "${CT_LIBC_VERSION}" in
- linaro-*)
- CT_GetLinaro "glibc" "${CT_LIBC_VERSION}"
- ;;
- *)
- CT_GetFile "glibc-${CT_LIBC_VERSION}" \
- {http,ftp,https}://ftp.gnu.org/gnu/glibc \
- ftp://{sourceware.org,gcc.gnu.org}/pub/glibc/{releases,snapshots}
- ;;
- esac
- fi
-
- # C library addons
- for addon in "${addons_list[@]}"; do
- # Never ever try to download these add-ons,
- # they've always been internal
- case "${addon}" in
- nptl) continue;;
- esac
-
- case "${addon}:${CT_LIBC_GLIBC_PORTS_EXTERNAL}" in
- ports:y) ;;
- ports:*) continue;;
- esac
-
- if ! CT_GetFile "glibc-${addon}-${CT_LIBC_VERSION}" \
- http://mirrors.kernel.org/sourceware/glibc \
- {http,ftp,https}://ftp.gnu.org/gnu/glibc \
- ftp://{sourceware.org,gcc.gnu.org}/pub/glibc/{releases,snapshots}
- then
- # Some add-ons are bundled with glibc, others are
- # bundled in their own tarball. Eg. NPTL is internal,
- # while LinuxThreads was external. Also, for old
- # versions of glibc, the libidn add-on was external,
- # but with version >=2.10, it is internal.
- CT_DoLog DEBUG "Addon '${addon}' could not be downloaded."
- CT_DoLog DEBUG "We'll see later if we can find it in the source tree"
- fi
- done
+ CT_Fetch GLIBC
+ if [ "${CT_GLIBC_USE_PORTS_EXTERNAL}" = "y" ]; then
+ CT_Fetch GLIBC_PORTS
+ fi
return 0
}
do_libc_extract() {
- local addon
-
- CT_Extract "${CT_LIBC}-${CT_LIBC_VERSION}"
- CT_Pushd "${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}"
- # Custom glibc won't get patched, because CT_GetCustom
- # marks custom glibc as patched.
- CT_Patch nochdir "${CT_LIBC}" "${CT_LIBC_VERSION}"
-
- for addon in $(do_libc_add_ons_list " "); do
- # If the addon was bundled with the main archive, we do not
- # need to extract it. Worse, if we were to try to extract
- # it, we'd get an error.
- if [ -d "${addon}" ]; then
- CT_DoLog DEBUG "Add-on '${addon}' already present, skipping extraction"
- continue
- fi
-
- CT_Extract nochdir "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}"
-
- CT_TestAndAbort "Error in add-on '${addon}': both short and long names in tarball" \
- -d "${addon}" -a -d "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}"
-
- # Some addons have the 'long' name, while others have the
- # 'short' name, but patches are non-uniformly built with
- # either the 'long' or 'short' name, whatever the addons name
- # but we prefer the 'short' name and avoid duplicates.
- if [ -d "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" ]; then
- CT_DoExecLog FILE mv "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" "${addon}"
- fi
-
- CT_DoExecLog FILE ln -s "${addon}" "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}"
-
- CT_Patch nochdir "${CT_LIBC}" "${addon}-${CT_LIBC_VERSION}"
-
- # Remove the long name since it can confuse configure scripts to run
- # the same source twice.
- rm "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}"
- done
-
- # The configure files may be older than the configure.in files
- # if using a snapshot (or even some tarballs). Fake them being
- # up to date.
- find . -type f -name configure -exec touch {} \; 2>&1 |CT_DoLog ALL
-
- CT_Popd
+ 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 the configure timestamp fix in all patched packages (e.g. part of CT_ExtractPatch)
}
# Build and install headers and start files
@@ -161,7 +85,7 @@ do_libc_backend_once() {
local multi_flags multi_dir multi_os_dir multi_root multi_index multi_count multi_target
local build_cflags build_cppflags build_ldflags
local startfiles_dir
- local src_dir="${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}"
+ local src_dir="${CT_SRC_DIR}/glibc"
local -a extra_config
local -a extra_make_args
local glibc_cflags
@@ -204,12 +128,13 @@ 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
- # values, as they CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY is passed after
+ # values, as they CT_GLIBC_EXTRA_CONFIG_ARRAY is passed after
# extra_config
extra_config+=("$(do_libc_min_kernel_config)")
@@ -218,24 +143,27 @@ do_libc_backend_once() {
nptl) extra_config+=("--with-__thread" "--with-tls");;
linuxthreads) extra_config+=("--with-__thread" "--without-tls" "--without-nptl");;
none) extra_config+=("--without-__thread" "--without-nptl")
- case "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in
+ case "${CT_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in
*-tls*) ;;
*) extra_config+=("--without-tls");;
esac
;;
esac
+ # FIXME static version of glibc seems to be broken:
+ # build tries to use libc-modules.h which is generated from
+ # soversions.i, which is only created for builds with shared libs.
case "${CT_SHARED_LIBS}" in
y) extra_config+=("--enable-shared");;
*) extra_config+=("--disable-shared");;
esac
- if [ "${CT_LIBC_DISABLE_VERSIONING}" = "y" ]; then
+ if [ "${CT_GLIBC_DISABLE_VERSIONING}" = "y" ]; then
extra_config+=("--disable-versioning")
fi
- if [ "${CT_LIBC_OLDEST_ABI}" != "" ]; then
- extra_config+=("--enable-oldest-abi=${CT_LIBC_OLDEST_ABI}")
+ if [ "${CT_GLIBC_OLDEST_ABI}" != "" ]; then
+ extra_config+=("--enable-oldest-abi=${CT_GLIBC_OLDEST_ABI}")
fi
case "$(do_libc_add_ons_list ,)" in
@@ -243,7 +171,7 @@ do_libc_backend_once() {
*) extra_config+=("--enable-add-ons=$(do_libc_add_ons_list ,)");;
esac
- extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
+ [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
touch config.cache
@@ -251,25 +179,25 @@ do_libc_backend_once() {
# Hide host C++ binary from configure
echo "ac_cv_prog_ac_ct_CXX=${CT_TARGET}-g++" >>config.cache
- if [ "${CT_LIBC_GLIBC_FORCE_UNWIND}" = "y" ]; then
+ if [ "${CT_GLIBC_FORCE_UNWIND}" = "y" ]; then
echo "libc_cv_forced_unwind=yes" >>config.cache
echo "libc_cv_c_cleanup=yes" >>config.cache
fi
# Pre-seed the configparms file with values from the config option
- printf "%s\n" "${CT_LIBC_GLIBC_CONFIGPARMS}" > configparms
+ printf "%s\n" "${CT_GLIBC_CONFIGPARMS}" > configparms
# glibc can't be built without -O2 (reference needed!)
glibc_cflags+=" -O2"
- case "${CT_LIBC_ENABLE_FORTIFIED_BUILD}" in
+ case "${CT_GLIBC_ENABLE_FORTIFIED_BUILD}" in
y) ;;
*) glibc_cflags+=" -U_FORTIFY_SOURCE";;
esac
# In the order of increasing precedence. Flags common to compiler and linker.
glibc_cflags+=" ${CT_TARGET_CFLAGS}"
- glibc_cflags+=" ${CT_LIBC_GLIBC_EXTRA_CFLAGS}"
+ glibc_cflags+=" ${CT_GLIBC_EXTRA_CFLAGS}"
glibc_cflags+=" ${multi_flags}"
# Analyze the resulting options for any extra configure switches to throw in.
@@ -283,6 +211,7 @@ do_libc_backend_once() {
;;
esac
done
+ CT_DoArchGlibcAdjustConfigure extra_config "${glibc_cflags}"
# ./configure is mislead by our tools override wrapper for bash
# so just tell it where the real bash is _on_the_target_!
@@ -336,7 +265,7 @@ do_libc_backend_once() {
--without-gd \
--with-headers="${CT_HEADERS_DIR}" \
"${extra_config[@]}" \
- "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[@]}"
+ "${CT_GLIBC_EXTRA_CONFIG_ARRAY[@]}"
# build hacks
case "${CT_ARCH},${CT_ARCH_CPU}" in
@@ -383,42 +312,39 @@ do_libc_backend_once() {
"${extra_make_args[@]}" \
install-headers
- # For glibc, a few headers need to be manually installed
- if [ "${CT_LIBC}" = "glibc" ]; then
- # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
- # so do them by hand. We can tolerate an empty stubs.h for the moment.
- # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
- mkdir -p "${CT_HEADERS_DIR}/gnu"
- CT_DoExecLog ALL touch "${CT_HEADERS_DIR}/gnu/stubs.h"
- CT_DoExecLog ALL cp -v "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/include/features.h" \
- "${CT_HEADERS_DIR}/features.h"
-
- # Building the bootstrap gcc requires either setting inhibit_libc, or
- # having a copy of stdio_lim.h... see
- # http://sources.redhat.com/ml/libc-alpha/2003-11/msg00045.html
- CT_DoExecLog ALL cp -v bits/stdio_lim.h "${CT_HEADERS_DIR}/bits/stdio_lim.h"
-
- # Following error building gcc-4.0.0's gcj:
- # error: bits/syscall.h: No such file or directory
- # solved by following copy; see http://sourceware.org/ml/crossgcc/2005-05/msg00168.html
- # but it breaks arm, see http://sourceware.org/ml/crossgcc/2006-01/msg00091.html
- # Of course, only copy it if it does not already exist
- case "${CT_ARCH}" in
- arm) ;;
- *) if [ -f "${CT_HEADERS_DIR}/bits/syscall.h" ]; then
- CT_DoLog ALL "Not over-writing existing bits/syscall.h"
- elif [ -f "misc/bits/syscall.h" ]; then
- CT_DoExecLog ALL cp -v "misc/bits/syscall.h" \
- "${CT_HEADERS_DIR}/bits/syscall.h"
- else
- # "Old" glibces do not have the above file,
- # but provide this one:
- CT_DoExecLog ALL cp -v "misc/syscall-list.h" \
- "${CT_HEADERS_DIR}/bits/syscall.h"
- fi
- ;;
- esac
- fi
+ # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
+ # so do them by hand. We can tolerate an empty stubs.h for the moment.
+ # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
+ mkdir -p "${CT_HEADERS_DIR}/gnu"
+ CT_DoExecLog ALL touch "${CT_HEADERS_DIR}/gnu/stubs.h"
+ CT_DoExecLog ALL cp -v "${CT_SRC_DIR}/glibc/include/features.h" \
+ "${CT_HEADERS_DIR}/features.h"
+
+ # Building the bootstrap gcc requires either setting inhibit_libc, or
+ # having a copy of stdio_lim.h... see
+ # http://sources.redhat.com/ml/libc-alpha/2003-11/msg00045.html
+ CT_DoExecLog ALL cp -v bits/stdio_lim.h "${CT_HEADERS_DIR}/bits/stdio_lim.h"
+
+ # Following error building gcc-4.0.0's gcj:
+ # error: bits/syscall.h: No such file or directory
+ # solved by following copy; see http://sourceware.org/ml/crossgcc/2005-05/msg00168.html
+ # but it breaks arm, see http://sourceware.org/ml/crossgcc/2006-01/msg00091.html
+ # Of course, only copy it if it does not already exist
+ case "${CT_ARCH}" in
+ arm) ;;
+ *) if [ -f "${CT_HEADERS_DIR}/bits/syscall.h" ]; then
+ CT_DoLog ALL "Not over-writing existing bits/syscall.h"
+ elif [ -f "misc/bits/syscall.h" ]; then
+ CT_DoExecLog ALL cp -v "misc/bits/syscall.h" \
+ "${CT_HEADERS_DIR}/bits/syscall.h"
+ else
+ # "Old" glibces do not have the above file,
+ # but provide this one:
+ CT_DoExecLog ALL cp -v "misc/syscall-list.h" \
+ "${CT_HEADERS_DIR}/bits/syscall.h"
+ fi
+ ;;
+ esac
elif [ "${libc_mode}" = "final" -a -r "${multi_root}/.libc_headers_installed" ]; then
CT_DoExecLog ALL rm -f "${multi_root}/.libc_headers_installed"
fi # installing headers
@@ -475,7 +401,7 @@ do_libc_backend_once() {
${CT_PREFIX_DIR}/share/doc
fi
- if [ "${CT_LIBC_LOCALES}" = "y" -a "${multi_index}" = "${multi_count}" ]; then
+ if [ "${CT_GLIBC_LOCALES}" = "y" -a "${multi_index}" = "${multi_count}" ]; then
do_libc_locales
fi
fi # libc_mode = final
@@ -486,27 +412,28 @@ do_libc_backend_once() {
# Build up the addons list, separated with $1
do_libc_add_ons_list() {
local sep="$1"
- local addons_list="$( echo "${CT_LIBC_ADDONS_LIST}" \
- |sed -r -e "s/[[:space:],]/${sep}/g;" \
- )"
- if [ "${CT_LIBC_GLIBC_2_20_or_later}" != "y" ]; then
- case "${CT_THREADS}" in
- none) ;;
- *) addons_list="${addons_list}${sep}${CT_THREADS}";;
- esac
+ local addons_list
+
+ if [ "${CT_GLIBC_USE_PORTS_ADDON}" = "y" ]; then
+ addons_list="${addons_list}${sep}ports"
+ fi
+ if [ "${CT_GLIBC_USE_NPTL_ADDON}" = "y" ]; then
+ addons_list="${addons_list}${sep}nptl"
+ fi
+ if [ "${CT_GLIBC_USE_LIBIDN_ADDON}" = "y" ]; then
+ addons_list="${addons_list}${sep}libidn"
fi
- [ "${CT_LIBC_GLIBC_USE_PORTS}" = "y" ] && addons_list="${addons_list}${sep}ports"
- # Remove duplicate, leading and trailing separators
- echo "${addons_list}" |sed -r -e "s/${sep}+/${sep}/g; s/^${sep}//; s/${sep}\$//;"
+ echo "${addons_list#${sep}}" # Remove leading separator if any
}
# Compute up the minimum supported Linux kernel version
do_libc_min_kernel_config() {
local min_kernel_config
- case "${CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in
+ case "${CT_GLIBC_EXTRA_CONFIG_ARRAY[*]}" in
*--enable-kernel*) ;;
- *) if [ "${CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS}" = "y" ]; then
+ *) if [ "${CT_GLIBC_KERNEL_VERSION_AS_HEADERS}" = "y" ]; then
+ # TBD do we support that currently? We always seem to install kernel headers
# We can't rely on the kernel version from the configuration,
# because it might not be available if the user uses pre-installed
# headers. On the other hand, both method will have the kernel
@@ -523,9 +450,9 @@ do_libc_min_kernel_config() {
patchlevel=$(((version_code>>8)&0xFF))
sublevel=$((version_code&0xFF))
min_kernel_config="${version}.${patchlevel}.${sublevel}"
- elif [ "${CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN}" = "y" ]; then
+ elif [ "${CT_GLIBC_KERNEL_VERSION_CHOSEN}" = "y" ]; then
# Trim the fourth part of the linux version, keeping only the first three numbers
- min_kernel_config="$( echo "${CT_LIBC_GLIBC_MIN_KERNEL_VERSION}" \
+ min_kernel_config="$( echo "${CT_GLIBC_MIN_KERNEL_VERSION}" \
|sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;' \
)"
fi
@@ -536,7 +463,7 @@ do_libc_min_kernel_config() {
# Build and install the libc locales
do_libc_locales() {
- local src_dir="${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}"
+ local src_dir="${CT_SRC_DIR}/glibc"
local -a extra_config
local glibc_cflags
@@ -558,7 +485,7 @@ do_libc_locales() {
# a harmless: `configure: WARNING: unrecognized options: --with-bugurl...`
# If it's set, use it, if is a recognized option.
if [ ! "${CT_TOOLCHAIN_PKGVERSION}" = "" ]; then
- extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
+ [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
fi
if [ ! "${CT_TOOLCHAIN_BUGURL}" = "" ]; then
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
@@ -567,7 +494,7 @@ do_libc_locales() {
CT_DoLog DEBUG "Extra config args passed: '${extra_config[*]}'"
glibc_cflags="-O2 -fno-stack-protector"
- case "${CT_LIBC_ENABLE_FORTIFIED_BUILD}" in
+ case "${CT_GLIBC_ENABLE_FORTIFIED_BUILD}" in
y) ;;
*) glibc_cflags+=" -U_FORTIFY_SOURCE";;
esac
diff --git a/scripts/build/libc/mingw-w64.sh b/scripts/build/libc/mingw-w64.sh
new file mode 100644
index 0000000..21afb29
--- /dev/null
+++ b/scripts/build/libc/mingw-w64.sh
@@ -0,0 +1,215 @@
+# Copyright 2012 Yann Diorcet
+# Licensed under the GPL v2. See COPYING in the root of this package
+
+do_libc_get() {
+ CT_Fetch MINGW_W64
+}
+
+do_libc_extract() {
+ CT_ExtractPatch MINGW_W64
+}
+
+do_set_mingw_install_prefix(){
+ MINGW_INSTALL_PREFIX=/usr/${CT_TARGET}
+ if [[ ${CT_MINGW_W64_VERSION} == 2* ]]; then
+ MINGW_INSTALL_PREFIX=/usr
+ fi
+}
+
+do_libc_start_files() {
+ local -a sdk_opts
+
+ CT_DoStep INFO "Installing C library headers"
+
+ case "${CT_MINGW_DIRECTX}:${CT_MINGW_DDK}" in
+ y:y) sdk_opts+=( "--enable-sdk=all" );;
+ y:) sdk_opts+=( "--enable-sdk=directx" );;
+ :y) sdk_opts+=( "--enable-sdk=ddk" );;
+ :) ;;
+ esac
+
+ if [ "${CT_MINGW_SECURE_API}" = "y" ]; then
+ sdk_opts+=( "--enable-secure-api" )
+ fi
+
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-mingw-w64-headers"
+
+ CT_DoLog EXTRA "Configuring Headers"
+
+ do_set_mingw_install_prefix
+ CT_DoExecLog CFG \
+ ${CONFIG_SHELL} \
+ "${CT_SRC_DIR}/mingw-w64/mingw-w64-headers/configure" \
+ --build=${CT_BUILD} \
+ --host=${CT_TARGET} \
+ --prefix=${MINGW_INSTALL_PREFIX} \
+ "${sdk_opts[@]}"
+
+ CT_DoLog EXTRA "Compile Headers"
+ CT_DoExecLog ALL make
+
+ CT_DoLog EXTRA "Installing Headers"
+ CT_DoExecLog ALL make install DESTDIR=${CT_SYSROOT_DIR}
+
+ CT_Popd
+
+ # It seems mingw is strangely set up to look into /mingw instead of
+ # /usr (notably when looking for the headers). This symlink is
+ # here to workaround this, and seems to be here to last... :-/
+ CT_DoExecLog ALL ln -sv "usr/${CT_TARGET}" "${CT_SYSROOT_DIR}/mingw"
+
+ CT_EndStep
+}
+
+do_check_mingw_vendor_tuple()
+{
+ if [ "${CT_MINGW_W64_REQUIRES_W64_VENDOR}" = "y" ]; then
+ CT_DoStep INFO "Checking configured vendor tuple"
+ 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
+ CT_EndStep
+ fi
+}
+
+do_mingw_tools()
+{
+ local f
+
+ for f in "${CT_MINGW_TOOL_LIST_ARRAY[@]}"; do
+ CT_mkdir_pushd "${f}"
+ if [ ! -d "${CT_SRC_DIR}/mingw-w64/mingw-w64-tools/${f}" ]; then
+ CT_DoLog WARN "Skipping ${f}: not found"
+ CT_Popd
+ continue
+ fi
+
+ CT_DoLog EXTRA "Configuring ${f}"
+ CT_DoExecLog CFG \
+ ${CONFIG_SHELL} \
+ "${CT_SRC_DIR}/mingw-w64/mingw-w64-tools/${f}/configure" \
+ --build=${CT_BUILD} \
+ --host=${CT_HOST} \
+ --target=${CT_TARGET} \
+ --program-prefix=${CT_TARGET}- \
+ --prefix="${CT_PREFIX_DIR}"
+
+ # mingw-w64 has issues with parallel builds, see do_libc
+ CT_DoLog EXTRA "Building ${f}"
+ CT_DoExecLog ALL make
+ CT_DoLog EXTRA "Installing ${f}"
+ CT_DoExecLog ALL make install
+ CT_Popd
+ done
+}
+
+do_mingw_pthreads()
+{
+ local multi_flags multi_dir multi_os_dir multi_root multi_index multi_count multi_target
+ local libprefix
+ local rcflags dlltoolflags
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ CT_DoStep INFO "Building for multilib ${multi_index}/${multi_count}: '${multi_flags}'"
+
+ libprefix="${MINGW_INSTALL_PREFIX}/lib/${multi_os_dir}"
+ CT_SanitizeVarDir libprefix
+
+ CT_SymlinkToolsMultilib
+
+ # DLLTOOLFLAGS does not appear to be currently used by winpthread package, but
+ # the master package uses this variable and describes this as one of the changes
+ # needed for i686 in mingw-w64-doc/howto-build/mingw-w64-howto-build-adv.txt
+ case "${multi_target}" in
+ i[3456]86-*)
+ rcflags="-F pe-i386"
+ dlltoolflags="-m i386"
+ ;;
+ x86_64-*)
+ rcflags="-F pe-x86-64"
+ dlltoolflags="-m i386:x86_64"
+ ;;
+ *)
+ CT_Abort "Tuple ${multi_target} is not supported by mingw-w64"
+ ;;
+ esac
+
+ CT_DoLog EXTRA "Configuring mingw-w64-winpthreads"
+
+ CT_DoExecLog CFG \
+ CFLAGS="${multi_flags}" \
+ CXXFLAGS="${multi_flags}" \
+ RCFLAGS="${rcflags}" \
+ DLLTOOLFLAGS="${dlltoolflags}" \
+ ${CONFIG_SHELL} \
+ "${CT_SRC_DIR}/mingw-w64/mingw-w64-libraries/winpthreads/configure" \
+ --with-sysroot=${CT_SYSROOT_DIR} \
+ --prefix=${MINGW_INSTALL_PREFIX} \
+ --libdir=${libprefix} \
+ --build=${CT_BUILD} \
+ --host=${multi_target}
+
+ # mingw-w64 has issues with parallel builds, see do_libc
+ CT_DoLog EXTRA "Building mingw-w64-winpthreads"
+ CT_DoExecLog ALL make
+
+ CT_DoLog EXTRA "Installing mingw-w64-winpthreads"
+ CT_DoExecLog ALL make install DESTDIR=${CT_SYSROOT_DIR}
+
+ CT_EndStep
+}
+
+do_libc()
+{
+ do_check_mingw_vendor_tuple
+
+ CT_DoStep INFO "Building mingw-w64"
+
+ CT_DoLog EXTRA "Configuring mingw-w64-crt"
+
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-mingw-w64-crt"
+
+ do_set_mingw_install_prefix
+ CT_DoExecLog CFG \
+ ${CONFIG_SHELL} \
+ "${CT_SRC_DIR}/mingw-w64/mingw-w64-crt/configure" \
+ --with-sysroot=${CT_SYSROOT_DIR} \
+ --prefix=${MINGW_INSTALL_PREFIX} \
+ --build=${CT_BUILD} \
+ --host=${CT_TARGET}
+
+ # mingw-w64-crt has a missing dependency occasionally breaking the
+ # parallel build. See https://github.com/crosstool-ng/crosstool-ng/issues/246
+ # Do not pass ${JOBSFLAGS} - build serially.
+ CT_DoLog EXTRA "Building mingw-w64-crt"
+ CT_DoExecLog ALL make
+
+ CT_DoLog EXTRA "Installing mingw-w64-crt"
+ CT_DoExecLog ALL make install DESTDIR=${CT_SYSROOT_DIR}
+ CT_EndStep
+
+ if [ "${CT_THREADS}" = "posix" ]; then
+ CT_DoStep INFO "Building mingw-w64-winpthreads"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-mingw-w64-winpthreads"
+ CT_IterateMultilibs do_mingw_pthreads pthreads-multilib
+ CT_Popd
+ CT_EndStep
+ fi
+
+ if [ "${CT_MINGW_TOOLS}" = "y" ]; then
+ CT_DoStep INFO "Installing mingw-w64 companion tools"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-mingw-w64-tools"
+ do_mingw_tools
+ CT_Popd
+ CT_EndStep
+ fi
+}
+
+do_libc_post_cc() {
+ :
+}
diff --git a/scripts/build/libc/mingw.sh b/scripts/build/libc/mingw.sh
deleted file mode 100644
index 1471785..0000000
--- a/scripts/build/libc/mingw.sh
+++ /dev/null
@@ -1,227 +0,0 @@
-# Copyright 2012 Yann Diorcet
-# Licensed under the GPL v2. See COPYING in the root of this package
-
-CT_WINAPI_VERSION_DOWNLOADED=
-
-do_libc_get() {
- if [ "${CT_WINAPI_VERSION}" = "devel" ]; then
- CT_GetGit "mingw-w64" "ref=HEAD" "git://git.code.sf.net/p/mingw-w64/mingw-w64" CT_WINAPI_VERSION_DOWNLOADED
- CT_DoLog DEBUG "Fetched mingw-w64 as ${CT_WINAPI_VERSION_DOWNLOADED}"
- else
- CT_GetFile "mingw-w64-v${CT_WINAPI_VERSION}" \
- http://downloads.sourceforge.net/sourceforge/mingw-w64
- CT_WINAPI_VERSION_DOWNLOADED=v${CT_WINAPI_VERSION}
- fi
-}
-
-do_libc_extract() {
- CT_Extract "mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}"
- CT_Pushd "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/"
- CT_Patch nochdir mingw-w64 "${CT_WINAPI_VERSION_DOWNLOADED}"
- CT_Popd
-}
-
-do_set_mingw_install_prefix(){
- MINGW_INSTALL_PREFIX=/usr/${CT_TARGET}
- if [[ ${CT_WINAPI_VERSION} == 2* ]]; then
- MINGW_INSTALL_PREFIX=/usr
- fi
-}
-
-do_libc_start_files() {
- local -a sdk_opts
-
- CT_DoStep INFO "Installing C library headers"
-
- case "${CT_MINGW_DIRECTX}:${CT_MINGW_DDK}" in
- y:y) sdk_opts+=( "--enable-sdk=all" );;
- y:) sdk_opts+=( "--enable-sdk=directx" );;
- :y) sdk_opts+=( "--enable-sdk=ddk" );;
- :) ;;
- esac
-
- if [ "${CT_MINGW_SECURE_API}" = "y" ]; then
- sdk_opts+=( "--enable-secure-api" )
- fi
-
- CT_mkdir_pushd "${CT_BUILD_DIR}/build-mingw-w64-headers"
-
- CT_DoLog EXTRA "Configuring Headers"
-
- do_set_mingw_install_prefix
- CT_DoExecLog CFG \
- ${CONFIG_SHELL} \
- "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/mingw-w64-headers/configure" \
- --build=${CT_BUILD} \
- --host=${CT_TARGET} \
- --prefix=${MINGW_INSTALL_PREFIX} \
- "${sdk_opts[@]}"
-
- CT_DoLog EXTRA "Compile Headers"
- CT_DoExecLog ALL make
-
- CT_DoLog EXTRA "Installing Headers"
- CT_DoExecLog ALL make install DESTDIR=${CT_SYSROOT_DIR}
-
- CT_Popd
-
- # It seems mingw is strangely set up to look into /mingw instead of
- # /usr (notably when looking for the headers). This symlink is
- # here to workaround this, and seems to be here to last... :-/
- CT_DoExecLog ALL ln -sv "usr/${CT_TARGET}" "${CT_SYSROOT_DIR}/mingw"
-
- CT_EndStep
-}
-
-do_check_mingw_vendor_tuple()
-{
- if [[ ${CT_WINAPI_VERSION} == 4* ]]; then
- CT_DoStep INFO "Checking vendor tuple configured in crosstool-ng .config"
- if [[ ${CT_TARGET_VENDOR} == w64 ]]; then
- CT_DoLog EXTRA "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
- CT_EndStep
- fi
-}
-
-do_mingw_tools()
-{
- local f
-
- for f in "${CT_MINGW_TOOL_LIST_ARRAY[@]}"; do
- CT_mkdir_pushd "${f}"
- if [ ! -d "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/mingw-w64-tools/${f}" ]; then
- CT_DoLog WARN "Skipping ${f}: not found"
- CT_Popd
- continue
- fi
-
- CT_DoLog EXTRA "Configuring ${f}"
- CT_DoExecLog CFG \
- ${CONFIG_SHELL} \
- "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/mingw-w64-tools/${f}/configure" \
- --build=${CT_BUILD} \
- --host=${CT_HOST} \
- --target=${CT_TARGET} \
- --program-prefix=${CT_TARGET}- \
- --prefix="${CT_PREFIX_DIR}"
-
- # mingw-w64 has issues with parallel builds, see do_libc
- CT_DoLog EXTRA "Building ${f}"
- CT_DoExecLog ALL make
- CT_DoLog EXTRA "Installing ${f}"
- CT_DoExecLog ALL make install
- CT_Popd
- done
-}
-
-do_mingw_pthreads()
-{
- local multi_flags multi_dir multi_os_dir multi_root multi_index multi_count multi_target
- local libprefix
- local rcflags dlltoolflags
-
- for arg in "$@"; do
- eval "${arg// /\\ }"
- done
-
- CT_DoStep INFO "Building for multilib ${multi_index}/${multi_count}: '${multi_flags}'"
-
- libprefix="${MINGW_INSTALL_PREFIX}/lib/${multi_os_dir}"
- CT_SanitizeVarDir libprefix
-
- CT_SymlinkToolsMultilib
-
- # DLLTOOLFLAGS does not appear to be currently used by winpthread package, but
- # the master package uses this variable and describes this as one of the changes
- # needed for i686 in mingw-w64-doc/howto-build/mingw-w64-howto-build-adv.txt
- case "${multi_target}" in
- i[3456]86-*)
- rcflags="-F pe-i386"
- dlltoolflags="-m i386"
- ;;
- x86_64-*)
- rcflags="-F pe-x86-64"
- dlltoolflags="-m i386:x86_64"
- ;;
- *)
- CT_Abort "Tuple ${multi_target} is not supported by mingw-w64"
- ;;
- esac
-
- CT_DoLog EXTRA "Configuring mingw-w64-winpthreads"
-
- CT_DoExecLog CFG \
- CFLAGS="${multi_flags}" \
- CXXFLAGS="${multi_flags}" \
- RCFLAGS="${rcflags}" \
- DLLTOOLFLAGS="${dlltoolflags}" \
- ${CONFIG_SHELL} \
- "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/mingw-w64-libraries/winpthreads/configure" \
- --with-sysroot=${CT_SYSROOT_DIR} \
- --prefix=${MINGW_INSTALL_PREFIX} \
- --libdir=${libprefix} \
- --build=${CT_BUILD} \
- --host=${multi_target}
-
- # mingw-w64 has issues with parallel builds, see do_libc
- CT_DoLog EXTRA "Building mingw-w64-winpthreads"
- CT_DoExecLog ALL make
-
- CT_DoLog EXTRA "Installing mingw-w64-winpthreads"
- CT_DoExecLog ALL make install DESTDIR=${CT_SYSROOT_DIR}
-
- CT_EndStep
-}
-
-do_libc()
-{
- do_check_mingw_vendor_tuple
-
- CT_DoStep INFO "Building mingw-w64"
-
- CT_DoLog EXTRA "Configuring mingw-w64-crt"
-
- CT_mkdir_pushd "${CT_BUILD_DIR}/build-mingw-w64-crt"
-
- do_set_mingw_install_prefix
- CT_DoExecLog CFG \
- ${CONFIG_SHELL} \
- "${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/mingw-w64-crt/configure" \
- --with-sysroot=${CT_SYSROOT_DIR} \
- --prefix=${MINGW_INSTALL_PREFIX} \
- --build=${CT_BUILD} \
- --host=${CT_TARGET}
-
- # mingw-w64-crt has a missing dependency occasionally breaking the
- # parallel build. See https://github.com/crosstool-ng/crosstool-ng/issues/246
- # Do not pass ${JOBSFLAGS} - build serially.
- CT_DoLog EXTRA "Building mingw-w64-crt"
- CT_DoExecLog ALL make
-
- CT_DoLog EXTRA "Installing mingw-w64-crt"
- CT_DoExecLog ALL make install DESTDIR=${CT_SYSROOT_DIR}
- CT_EndStep
-
- if [ "${CT_THREADS}" = "posix" ]; then
- CT_DoStep INFO "Building mingw-w64-winpthreads"
- CT_mkdir_pushd "${CT_BUILD_DIR}/build-mingw-w64-winpthreads"
- CT_IterateMultilibs do_mingw_pthreads pthreads-multilib
- CT_Popd
- CT_EndStep
- fi
-
- if [ "${CT_MINGW_TOOLS}" = "y" ]; then
- CT_DoStep INFO "Installing mingw-w64 companion tools"
- CT_mkdir_pushd "${CT_BUILD_DIR}/build-mingw-w64-tools"
- do_mingw_tools
- CT_Popd
- CT_EndStep
- fi
-}
-
-do_libc_post_cc() {
- :
-}
diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh
index 5a53fd0..430fb8d 100644
--- a/scripts/build/libc/musl.sh
+++ b/scripts/build/libc/musl.sh
@@ -3,17 +3,11 @@
# Licensed under the GPL v2. See COPYING in the root of this package
do_libc_get() {
- if [ "${CT_LIBC_MUSL_CUSTOM}" = "y" ]; then
- CT_GetCustom "musl" "${CT_LIBC_MUSL_CUSTOM_VERSION}" \
- "${CT_LIBC_MUSL_CUSTOM_LOCATION}"
- else # ! custom location
- CT_GetFile "musl-${CT_LIBC_VERSION}" http://www.musl-libc.org/releases
- fi # ! custom location
+ CT_Fetch MUSL
}
do_libc_extract() {
- CT_Extract "musl-${CT_LIBC_VERSION}"
- CT_Patch "musl" "${CT_LIBC_VERSION}"
+ CT_ExtractPatch MUSL
}
# Build and install headers and start files
@@ -62,7 +56,7 @@ do_libc_backend_once() {
local libc_mode
local -a extra_cflags
local -a extra_config
- local src_dir="${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}"
+ local src_dir="${CT_SRC_DIR}/musl"
local multi_dir multi_os_dir multi_root multi_flags multi_index multi_count
local multilib_dir
local hdr_install_subdir
@@ -83,7 +77,7 @@ do_libc_backend_once() {
# From buildroot:
# gcc constant folding bug with weak aliases workaround
# See http://www.openwall.com/lists/musl/2014/05/15/1
- if [ "${CT_CC_GCC_4_9_or_later}" = "y" ]; then
+ if [ "${CT_GCC_BUG_61144}" = "y" ]; then
extra_cflags+=("-fno-toplevel-reorder")
fi
diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
index 3b48507..5c4a356 100644
--- a/scripts/build/libc/newlib.sh
+++ b/scripts/build/libc/newlib.sh
@@ -6,44 +6,20 @@
#
do_libc_get() {
- local libc_src="{http://mirrors.kernel.org/sourceware/newlib,
- ftp://sourceware.org/pub/newlib}"
-
- if [ "${CT_LIBC_NEWLIB_CUSTOM}" = "y" ]; then
- CT_GetCustom "newlib" "${CT_LIBC_NEWLIB_CUSTOM_VERSION}" \
- "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}"
- else # ! custom location
- case "${CT_LIBC_VERSION}" in
- linaro-*)
- CT_GetLinaro "newlib" "${CT_LIBC_VERSION}"
- ;;
- *)
- # kernel.org mirror is outdated, keep last as a fallback
- CT_GetFile "newlib-${CT_LIBC_VERSION}" \
- ftp://sourceware.org/pub/newlib \
- http://mirrors.kernel.org/sourceware/newlib \
- http://mirrors.kernel.org/sources.redhat.com/newlib
- ;;
- esac
- fi # ! custom location
+ CT_Fetch NEWLIB
}
do_libc_extract() {
- CT_Extract "newlib-${CT_LIBC_VERSION}"
- CT_Patch "newlib" "${CT_LIBC_VERSION}"
-
- if [ -n "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then
- CT_ConfigureXtensa "newlib" "${CT_LIBC_VERSION}"
- fi
+ CT_ExtractPatch NEWLIB
}
do_libc_start_files() {
CT_DoStep INFO "Installing C library headers & start files"
- CT_DoExecLog ALL cp -a "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/newlib/libc/include/." \
+ CT_DoExecLog ALL cp -a "${CT_SRC_DIR}/newlib/newlib/libc/include/." \
"${CT_HEADERS_DIR}"
- if [ "${CT_ARCH_xtensa}" = "y" ]; then
+ if [ "${CT_ARCH_XTENSA}" = "y" ]; then
CT_DoLog EXTRA "Installing Xtensa headers"
- CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/newlib/libc/sys/xtensa/include/." \
+ CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/newlib/newlib/libc/sys/xtensa/include/." \
"${CT_HEADERS_DIR}"
fi
CT_EndStep
@@ -131,7 +107,7 @@ ENABLE_TARGET_OPTSPACE:target-optspace
AR_FOR_TARGET="`which ${CT_TARGET}-gcc-ar`" \
RANLIB_FOR_TARGET="`which ${CT_TARGET}-gcc-ranlib`" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/configure" \
+ "${CT_SRC_DIR}/newlib/configure" \
--host=${CT_BUILD} \
--target=${CT_TARGET} \
--prefix=${CT_PREFIX_DIR} \
diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh
index a730a1d..599283e 100644
--- a/scripts/build/libc/uClibc.sh
+++ b/scripts/build/libc/uClibc.sh
@@ -2,53 +2,14 @@
# Copyright 2007 Yann E. MORIN
# Licensed under the GPL v2. See COPYING in the root of this package
-# This is a constant because it does not change very often.
-# We're in 2010, and are still using data from 7 years ago.
-uclibc_locales_version=030818
-uclibc_locale_tarball="uClibc-locale-${uclibc_locales_version}"
-
-if [ "${CT_LIBC_UCLIBC_NG}" = "y" ]; then
- uclibc_name="uClibc-ng"
- libc_src="http://downloads.uclibc-ng.org/releases/${CT_LIBC_VERSION}"
-else
- uclibc_name="uClibc"
- libc_src="http://www.uclibc.org/downloads
- http://www.uclibc.org/downloads/old-releases"
-fi
-
# Download uClibc
do_libc_get() {
- if [ "${CT_LIBC_UCLIBC_CUSTOM}" = "y" ]; then
- CT_GetCustom "${uclibc_name}" "${CT_LIBC_UCLIBC_CUSTOM_VERSION}" \
- "${CT_LIBC_UCLIBC_CUSTOM_LOCATION}"
- else
- CT_GetFile "${uclibc_name}-${CT_LIBC_VERSION}" ${libc_src}
- fi
- # uClibc locales
- if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" ]; then
- CT_GetFile "${uclibc_locale_tarball}" ${libc_src}
- fi
-
- return 0
+ CT_Fetch UCLIBC
}
# Extract uClibc
do_libc_extract() {
- CT_Extract "${uclibc_name}-${CT_LIBC_VERSION}"
- CT_Patch "${uclibc_name}" "${CT_LIBC_VERSION}"
-
- # uClibc locales
- # Extracting pregen locales ourselves is kinda
- # broken, so just link it in place...
- if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" \
- -a ! -f "${CT_SRC_DIR}/.${uclibc_locale_tarball}.extracted" ]; then
- CT_Pushd "${CT_SRC_DIR}/${uclibc_name}-${CT_LIBC_VERSION}/extra/locale"
- CT_DoExecLog ALL ln -s "${CT_TARBALLS_DIR}/${uclibc_locale_tarball}.tgz" .
- CT_Popd
- touch "${CT_SRC_DIR}/.${uclibc_locale_tarball}.extracted"
- fi
-
- return 0
+ CT_ExtractPatch UCLIBC
}
# Build and install headers and start files
@@ -93,16 +54,19 @@ do_libc_backend_once() {
local -a make_args
local extra_cflags f cfg_cflags cf
local hdr_install_subdir
+ local uclibc_name
for arg in "$@"; do
eval "${arg// /\\ }"
done
- CT_DoStep INFO "Building for multilib ${multi_index}/${multi_count}: '${multi_flags}'"
+ if [ "${CT_UCLIBC_USE_UCLIBC_NG_ORG}" = "y" ]; then
+ uclibc_name="uClibc-ng"
+ elif [ "${CT_UCLIBC_USE_UCLIBC_ORG}" = "y" ]; then
+ uclibc_name="uClibc"
+ fi
- # Simply copy files until uClibc has the ability to build out-of-tree
- CT_DoLog EXTRA "Copying sources to build dir"
- CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/${uclibc_name}-${CT_LIBC_VERSION}/." .
+ CT_DoStep INFO "Building for multilib ${multi_index}/${multi_count}: '${multi_flags}'"
multilib_dir="lib/${multi_os_dir}"
startfiles_dir="${multi_root}/usr/${multilib_dir}"
@@ -122,11 +86,14 @@ do_libc_backend_once() {
HOSTCC="${CT_BUILD}-gcc" \
PREFIX="${multi_root}/" \
MULTILIB_DIR="${multilib_dir}" \
- LOCALE_DATA_FILENAME="${uclibc_locale_tarball}.tgz" \
STRIPTOOL=true \
${CT_LIBC_UCLIBC_VERBOSITY} \
)
+ # Simply copy files until uClibc has the ability to build out-of-tree
+ CT_DoLog EXTRA "Copying sources to build dir"
+ CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/uClibc/." .
+
# Force the date of the pregen locale data, as the
# newer ones that are referenced are not available
CT_DoLog EXTRA "Applying configuration"
@@ -257,13 +224,13 @@ manage_uClibc_config() {
CT_DoExecLog ALL cp "${src}" "${dst}"
case "${CT_ARCH_ENDIAN}" in
- big)
+ big|big,little)
CT_KconfigDisableOption "ARCH_LITTLE_ENDIAN" "${dst}"
CT_KconfigDisableOption "ARCH_WANTS_LITTLE_ENDIAN" "${dst}"
CT_KconfigEnableOption "ARCH_BIG_ENDIAN" "${dst}"
CT_KconfigEnableOption "ARCH_WANTS_BIG_ENDIAN" "${dst}"
;;
- little)
+ little|little,big)
CT_KconfigDisableOption "ARCH_BIG_ENDIAN" "${dst}"
CT_KconfigDisableOption "ARCH_WANTS_BIG_ENDIAN" "${dst}"
CT_KconfigEnableOption "ARCH_LITTLE_ENDIAN" "${dst}"
@@ -323,27 +290,15 @@ manage_uClibc_config() {
# entirely if LOCALE is not set. If LOCALE was already set, we'll
# assume the user has already made all the appropriate generation
# arrangements. Note that having the uClibc Makefile download the
- # pregenerated locales is not compatible with crosstool; besides,
- # crosstool downloads them as part of getandpatch.sh.
- CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE" "${dst}"
- case "${CT_LIBC_UCLIBC_LOCALES}:${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" in
- :*)
- ;;
- y:)
+ # pregenerated locales is not compatible with crosstool.
+ if [ -z "${CT_LIBC_UCLIBC_LOCALES}" ]; then
+ CT_KconfigDisableOption "UCLIBC_HAS_LOCALE" "${dst}"
+ else
CT_KconfigEnableOption "UCLIBC_HAS_LOCALE" "${dst}"
CT_KconfigDeleteOption "UCLIBC_PREGENERATED_LOCALE_DATA" "${dst}"
- CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" \
- "${dst}"
+ CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" "${dst}"
CT_KconfigDeleteOption "UCLIBC_HAS_XLOCALE" "${dst}"
- ;;
- y:y)
- CT_KconfigEnableOption "UCLIBC_HAS_LOCALE" "${dst}"
- CT_KconfigEnableOption "UCLIBC_PREGENERATED_LOCALE_DATA" "${dst}"
- CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" \
- "${dst}"
- CT_KconfigDeleteOption "UCLIBC_HAS_XLOCALE" "${dst}"
- ;;
- esac
+ fi
# WCHAR support
if [ "${CT_LIBC_UCLIBC_WCHAR}" = "y" ]; then
diff --git a/scripts/build/test_suite.sh b/scripts/build/test_suite.sh
index 8fabf42..e963a99 100644
--- a/scripts/build/test_suite.sh
+++ b/scripts/build/test_suite.sh
@@ -7,8 +7,7 @@
CT_TEST_SUITE_FACILITY_LIST=
for f in "${CT_LIB_DIR}/scripts/build/test_suite/"*.sh; do
_f="$(basename "${f}" .sh)"
- __f="CT_TEST_SUITE_${_f}"
- __f=`echo ${__f} | tr "[:lower:]" "[:upper:]"`
+ __f="CT_TEST_SUITE_${_f^^}"
if [ "${!__f}" = "y" ]; then
CT_DoLog DEBUG "Enabling test suite '${_f}'"
. "${f}"
diff --git a/scripts/build/test_suite/gcc.sh b/scripts/build/test_suite/gcc.sh
index c829a43..6c6e5a7 100644
--- a/scripts/build/test_suite/gcc.sh
+++ b/scripts/build/test_suite/gcc.sh
@@ -18,7 +18,7 @@ do_test_suite_gcc_build() {
CT_DoExecLog ALL cp -av "${CT_LIB_DIR}/contrib/gcc-test-suite/default.cfg" \
"${CT_LIB_DIR}/contrib/gcc-test-suite/Makefile" \
"${CT_LIB_DIR}/contrib/gcc-test-suite/README" \
- "${CT_SRC_DIR}/gcc-${CT_CC_GCC_VERSION}/gcc/testsuite" \
+ "${CT_SRC_DIR}/gcc/gcc/testsuite" \
"${CT_TEST_SUITE_DIR}/gcc"
CT_DoExecLog ALL sed -i -r -e "s/@@DG_TARGET@@/${CT_TARGET}/g;" \
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 78b3d0f..cc216f9 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"
@@ -158,15 +164,33 @@ CT_PREFIX_DIR="$( ${sed} -r -e 's:/+:/:g; s:/*$::;' <<<"${CT_PREFIX_DIR}" )"
# Put user-supplied flags at the end, so that they take precedence.
CT_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_TARGET_CFLAGS}"
CT_TARGET_LDFLAGS="${CT_ARCH_TARGET_LDFLAGS} ${CT_TARGET_LDFLAGS}"
+
+# FIXME move to gcc.sh
CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY=( ${CT_ARCH_CC_CORE_EXTRA_CONFIG} "${CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY[@]}" )
CT_CC_GCC_EXTRA_CONFIG_ARRAY=( ${CT_ARCH_CC_EXTRA_CONFIG} "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" )
+# Starting with 1.0.20, applications using uClibc-ng do not link with
+# the default libgcc_c_spec used by GCC if only static libc.a exists - unless
+# -static is thrown in. The difference is that with -static, gcc passes
+# "--start-group -lgcc -lc --end-group" and without -static, it passes
+# "-lgcc -lc -lgcc" instead. The latter leaves a symbol from 2nd libgcc
+# (dl_iterate_phdr) unresolved because -lc is already done at this point.
+# Force static link on the target.
+if [ "${CT_SHARED_LIBS}" != "y" ]; then
+ CT_TARGET_LDFLAGS+=" -static"
+fi
+
# Compute the package version string
-CT_PKGVERSION="crosstool-NG ${CT_VERSION}${CT_TOOLCHAIN_PKGVERSION:+ - ${CT_TOOLCHAIN_PKGVERSION}}"
+if [ "${CT_SHOW_CT_VERSION}" = "y" ]; then
+ CT_PKGVERSION="crosstool-NG ${CT_VERSION}${CT_TOOLCHAIN_PKGVERSION:+ - ${CT_TOOLCHAIN_PKGVERSION}}"
+else
+ CT_PKGVERSION="${CT_TOOLCHAIN_PKGVERSION}"
+fi
# Compute the working directories names
CT_TARBALLS_DIR="${CT_WORK_DIR}/tarballs"
-CT_SRC_DIR="${CT_WORK_DIR}/src"
+CT_COMMON_SRC_DIR="${CT_WORK_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
@@ -244,12 +268,14 @@ CT_DoForceRmdir "${CT_BUILD_DIR}" "${CT_BUILDTOOLS_PREFIX_DIR}"
# Don't eradicate directories if we need to restart
if [ -z "${CT_RESTART}" ]; then
+ # Per-target sources: eliminate
+ CT_DoForceRmdir "${CT_SRC_DIR}"
# Get rid of pre-existing installed toolchain and previous build directories.
if [ "${CT_FORCE_DOWNLOAD}" = "y" -a -d "${CT_TARBALLS_DIR}" ]; then
CT_DoForceRmdir "${CT_TARBALLS_DIR}"
fi
- if [ "${CT_FORCE_EXTRACT}" = "y" -a -d "${CT_SRC_DIR}" ]; then
- CT_DoForceRmdir "${CT_SRC_DIR}"
+ if [ "${CT_FORCE_EXTRACT}" = "y" -a -d "${CT_COMMON_SRC_DIR}" ]; then
+ CT_DoForceRmdir "${CT_COMMON_SRC_DIR}"
fi
if [ -d "${CT_PREFIX_DIR}" -a "${CT_RM_RF_PREFIX_DIR}" = "y" ]; then
CT_DoForceRmdir "${CT_PREFIX_DIR}"
@@ -264,6 +290,7 @@ fi
# create already existent directories, and CT_BUILD_DIR needs to be created
# anyway
CT_DoExecLog ALL mkdir -p "${CT_TARBALLS_DIR}"
+CT_DoExecLog ALL mkdir -p "${CT_COMMON_SRC_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_SRC_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_BUILD_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_BUILDTOOLS_PREFIX_DIR}/bin"
@@ -300,9 +327,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!
@@ -316,11 +343,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}"
@@ -525,11 +552,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
@@ -597,9 +619,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
@@ -647,7 +667,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 c1b99ce..b8b4913 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -5,7 +5,7 @@
# Licensed under the GPL v2. See COPYING in the root of this package
CT_LoadConfig() {
- local o
+ local o oldvals vals
# Parse the configuration file
# It has some info about the logging facility, so include it early
@@ -23,7 +23,7 @@ CT_LoadConfig() {
. "${CT_LIB_DIR}/scripts/build/companion_libs.sh"
. "${CT_LIB_DIR}/scripts/build/binutils/${CT_BINUTILS}.sh"
. "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh"
- . "${CT_LIB_DIR}/scripts/build/cc.sh"
+ . "${CT_LIB_DIR}/scripts/build/cc/${CT_CC}.sh"
. "${CT_LIB_DIR}/scripts/build/debug.sh"
. "${CT_LIB_DIR}/scripts/build/test_suite.sh"
@@ -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.
@@ -200,7 +220,7 @@ CT_LogEnable() {
exec 6>&1 7>&2 8<&0
CT_BUILD_LOG="${CT_TOP_DIR}/build.log"
CT_LOG_ENABLED=y
- if [ "$clean" = "yes" ]; then
+ if [ "$clean" = "yes" ]; then
rm -f "${CT_BUILD_LOG}"
fi
exec >>"${CT_BUILD_LOG}"
@@ -283,7 +303,7 @@ CT_DoLog() {
_prog_bar_cpt=$(((_prog_bar_cpt+1)%40))
fi
elif [ ${cur_l} -le ${CT_LOG_LEVEL_WARN} ]; then
- printf "[%-5s]%*s%s%s\n" "${cur_L}" "${indent}" " " "${line}"
+ printf "[%-5s]%*s%s%s\n" "${cur_L}" "${indent}" " " "${line}" >&2
fi
done
)
@@ -298,10 +318,24 @@ CT_DoExecLog() {
local level="$1"
local cur_cmd
local ret
+ local cmd_seen
shift
+
(
for i in "$@"; do
- cur_cmd+="'${i}' "
+ case "${i}" in
+ *=*)
+ if [ -z "${cmd_seen}" ]; then
+ cur_cmd+=" ${i%%=*}='${i#*=}'"
+ else
+ cur_cmd+=" '${i}'"
+ fi
+ ;;
+ *)
+ cur_cmd+=" '${i}'"
+ cmd_seen=y
+ ;;
+ esac
done
while true; do
case "${1}" in
@@ -537,18 +571,14 @@ CT_Pushd() {
pushd "$1" >/dev/null 2>&1
}
CT_Popd() {
+ local dir=`dirs +0`
+
+ CT_DoLog DEBUG "Leaving '${dir}'"
popd >/dev/null 2>&1
}
-# Create a dir and cd or pushd into it
-# Usage: CT_mkdir_cd <dir/to/create>
-# CT_mkdir_pushd <dir/to/create>
-CT_mkdir_cd() {
- local dir="${1}"
-
- mkdir -p "${dir}"
- cd "${dir}"
-}
+# Create a dir and pushd into it
+# Usage: CT_mkdir_pushd <dir/to/create>
CT_mkdir_pushd() {
local dir="${1}"
@@ -624,9 +654,11 @@ CT_SetLibPath() {
# Build up the list of allowed tarball extensions
# Add them in the prefered order; most preferred comes first
-CT_DoListTarballExt() {
+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"
@@ -637,25 +669,34 @@ CT_DoListTarballExt() {
# Usage: CT_GetFileExtension <component_name-component_version> [extension]
# If found, echoes the extension to stdout, and return 0
# If not found, echoes nothing on stdout, and return !0.
-CT_GetFileExtension() {
+CT_GetFileExtension()
+{
local ext
local file="$1"
- shift
- local first_ext="$1"
- # we need to also check for an empty extension for those very
- # peculiar components that don't have one (such as sstrip from
- # buildroot).
- for ext in ${first_ext} $(CT_DoListTarballExt) /.git ''; do
- if [ -e "${CT_TARBALLS_DIR}/${file}${ext}" -o -L "${CT_TARBALLS_DIR}/${file}${ext}" ]; then
+ for ext in $(CT_DoListTarballExt); do
+ if [ -e "${file}${ext}" -o -L "${file}${ext}" ]; then
echo "${ext}"
exit 0
fi
done
-
exit 1
}
+# Get file's basename by stripping supported archive extensions
+CT_GetFileBasename()
+{
+ local bn="${1}"
+ local ext
+
+ for ext in $(CT_DoListTarballExt); do
+ if [ "${bn%${ext}}" != "${bn}" ]; then
+ echo "${bn%${ext}}"
+ exit 0
+ fi
+ done
+}
+
# Try to retrieve the specified URL (HTTP or FTP)
# Usage: CT_DoGetFile <URL>
# This functions always returns true (0), as it can be legitimate not
@@ -676,6 +717,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}} \
@@ -696,98 +738,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 "${basename}" ${first_ext} )"; then
- CT_DoLog DEBUG "Already have '${basename}'"
- 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 gets the custom source from either a tarball or directory
-# Usage: CT_GetCustom <name> <version> <location>
-CT_GetCustom() {
- local component_name="$1"
- local component_version="$2"
- local component_location="$3"
-
- # Some local variables we use to help us figure out what to do
- local component_location_type="dir" # str: 'file' or 'dir'
- local component_location_filename="" # filename... if it's a file
-
- CT_TestAndAbort \
- "${component_name}: Custom location setting is empty" \
- -z "${component_location}"
-
- CT_TestAndAbort \
- "${component_name}: Custom version setting is empty" \
- -z "${component_version}"
-
- if [ -f "${component_location}" ]; then
- component_location_type="file"
- component_location_filename="$(basename ${component_location})"
- elif [ -d "${component_location}" ]; then
- # Yes, it's the default, but it rules out the else case in the `if'.
- component_location_type="dir"
- # as -d and -f say: it's a <directory|file> and is readable!
- else
- CT_Abort "${component_name}: Unable to read ${component_location}, make sure the setting is correct and double check the permissions!"
- fi
-
- if [ "${component_location_type}" = "file" ]; then
- CT_DoLog EXTRA "Got '${component_location}' from custom location"
- # We need to know the custom tarball extension,
- # so we can create a properly-named symlink, which
- # we use later on in 'extract'
- case "${component_location}" in
- *.tar.xz|*.tar.bz2|*.tar.lzma|*.tar.gz|*.tgz|*.tar|*.zip) ;;
- *) CT_Abort "Unknown extension for custom tarball '${component_location}'" ;;
- esac
- [ ! -L "${CT_TARBALLS_DIR}/${component_location_filename}" ] && \
- CT_DoExecLog DEBUG ln -sf "${component_location}" \
- "${CT_TARBALLS_DIR}/${component_location_filename}"
- elif [ "${component_location_type}" = "dir" ]; then
- CT_DoLog EXTRA "Got '${component_location}' from custom location"
- [ ! -d "${CT_SRC_DIR}/${component_name}-${component_version}" ] && \
- CT_DoExecLog DEBUG ln -sf "${component_location}" \
- "${CT_SRC_DIR}/${component_name}-${component_version}"
-
- # Don't try to extract from source directory, it's extracted!
- touch "${CT_SRC_DIR}/.${component_name}-${component_version}.extracted"
- fi
- # Don't patch a custom source, it's custom!
- touch "${CT_SRC_DIR}/.${component_name}-${component_version}.patched"
-}
-
# 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>
@@ -805,29 +764,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
@@ -839,7 +803,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
@@ -850,451 +816,22 @@ 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
done
done
- # Just return error, someone may want to catch and handle the error
- # (eg. glibc add-ons can be missing).
+ # Just return error: CT_DoFetch will check it and will handle it appropriately.
return 1
}
-# Get a component from Linaro archives.
-# Usage: CT_GetLinaro <component> <version>
-CT_GetLinaro() {
- local comp="$1"
- local version="$2"
- local linaro_version
- local yyyymm_p
- local yymm
- local base
-
- case "${version}" in
- linaro-*)
- linaro_version="${version#linaro-}"
- ;;
- *)
- CT_Abort "Version ${version} is not a Linaro package"
- ;;
- esac
-
- # Recent releases reside in top of the directory tree; older releases
- # are moved into the archive. Subdirectories are named differently
- # in archive!
- # In archive, some URLs also contain base component version
- # (e.g. "gcc-linaro/4.9") while some do not (e.g. just "newlib-linaro").
- base="${linaro_version%%-*}"
- # Strip base version, first two digits of the year and optional patchlevel
- yymm="${linaro_version#*-??}"
- yymm="${yymm%-*}"
- CT_GetFile "${comp}-${version}" \
- "https://releases.linaro.org/components/toolchain/${comp}-linaro/${linaro_version}" \
- "https://releases.linaro.org/archive/${yymm}/components/toolchain/${comp}-linaro/${base}" \
- "https://releases.linaro.org/archive/${yymm}/components/toolchain/${comp}-linaro"
-}
-
-# Checkout from CVS, and build the associated tarball
-# The tarball will be called ${basename}.tar.bz2
-# Prerequisite: either the server does not require password,
-# or the user must already be logged in.
-# 'tag' is the tag to retrieve. Must be specified, but can be empty.
-# If dirname is specified, then module will be renamed to dirname
-# prior to building the tarball.
-# Usage: CT_GetCVS <basename> <url> <module> <tag> [dirname[=subdir]]
-# Note: if '=subdir' is given, then it is used instead of 'module'.
-CT_GetCVS() {
- local basename="$1"
- local uri="$2"
- local module="$3"
- local tag="${4:+-r ${4}}"
- local dirname="$5"
- local tmp_dir
-
- # First try locally, then the mirror
- if CT_GetFile "${basename}"; then
- # Got it! Return early! :-)
- return 0
- fi
-
- if [ "${CT_FORBID_DOWNLOAD}" = "y" ]; then
- CT_DoLog WARN "Downloads forbidden, not trying cvs retrieval"
- return 1
- fi
-
- CT_MktempDir tmp_dir
- CT_Pushd "${tmp_dir}"
-
- CT_DoExecLog ALL cvs -z 9 -d "${uri}" co -P ${tag} "${module}"
- if [ -n "${dirname}" ]; then
- case "${dirname}" in
- *=*)
- CT_DoExecLog DEBUG mv "${dirname#*=}" "${dirname%%=*}"
- CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${dirname%%=*}"
- ;;
- *)
- CT_DoExecLog ALL mv "${module}" "${dirname}"
- CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${dirname:-${module}}"
- ;;
- esac
- fi
- CT_SaveLocal "${CT_TARBALLS_DIR}/${basename}.tar.bz2"
-
- CT_Popd
- CT_DoExecLog ALL rm -rf "${tmp_dir}"
-}
-
-# Check out from SVN, and build the associated tarball
-# The tarball will be called ${basename}.tar.bz2
-# Prerequisite: either the server does not require password,
-# or the user must already be logged in.
-# 'rev' is the revision to retrieve
-# Usage: CT_GetSVN <basename> <url> [rev]
-CT_GetSVN() {
- local basename="$1"
- local uri="$2"
- local rev="$3"
-
- # First try locally, then the mirror
- if CT_GetFile "${basename}"; then
- # Got it! Return early! :-)
- return 0
- fi
-
- if [ "${CT_FORBID_DOWNLOAD}" = "y" ]; then
- CT_DoLog WARN "Downloads forbidden, not trying svn retrieval"
- return 1
- fi
-
- CT_MktempDir tmp_dir
- CT_Pushd "${tmp_dir}"
-
- if ! CT_DoExecLog ALL svn export ${rev:+-r ${rev}} "${uri}" "${basename}"; then
- CT_DoLog WARN "Could not retrieve '${basename}'"
- return 1
- fi
- CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${basename}"
- CT_SaveLocal "${CT_TARBALLS_DIR}/${basename}.tar.bz2"
-
- CT_Popd
- CT_DoExecLog ALL rm -rf "${tmp_dir}"
-}
-
-# Clone a git tree
-# Tries the given URLs in turn until one can get cloned. No tarball will be created.
-# Prerequisites: either the server does not require password,
-# or the user has already taken any action to authenticate to the server.
-# The cloned tree will *not* be stored in the local tarballs dir!
-# cset_or_ref can be a branch or tag, if specified as 'ref=name'
-# In this case, 'git ls-remote' is used to get the sha1 and can also
-# be used to get a list valid refs (e.g. HEAD, refs/heads/master, refs/tags/v3.3.0)
-# Usage: CT_GetGit <basename> <cset_or_ref> <url> <out_cset>
-CT_GetGit() {
- local basename="${1}"
- local cset_or_ref="${2}"
- local url="${3}"
- local _out_cset="${4}"
-
- local ref=$(echo "${cset_or_ref}" | ${sed} -n 's/^ref=\(.*\)/\1/p')
- if [ -n "$ref" ]; then
- local matches=$(git ls-remote --exit-code "$url" --refs "${ref}")
- local result=$?
- CT_TestAndAbort "Failed to find git ref ${ref} at ${url}" "${result}" != "0"
- if [ $( echo "$matches" | wc -l) -gt 1 ]; then
- CT_DoLog WARN "Ambiguous ref ${ref} at ${url}, using first"
- fi
- local cset=$(echo "$matches" | head -n1 | cut -c1-6)
- CT_DoLog DEBUG "ref ${ref} at ${url} has cset of ${cset}"
- else
- local cset=${cset_or_ref}
- CT_DoLog DEBUG "cset ${cset}"
- fi
-
- if [ -n "${_out_cset}" ]; then
- eval ${_out_cset}=\${cset}
- fi
-
- local dir="${CT_TARBALLS_DIR}/${basename}-${cset}.git"
- local file="${basename}-${cset}.tar.gz"
- local dest="${CT_TARBALLS_DIR}/${file}"
- local tmp="${CT_TARBALLS_DIR}/${file}.tmp-dl"
-
- # Do we already have it?
- if CT_GetLocal "${file}"; then
- echo ${cset}
- return 0
- fi
- # Nope...
-
- if [ "${CT_FORBID_DOWNLOAD}" = "y" ]; then
- CT_DoLog WARN "Downloads forbidden, not trying git retrieval"
- return 1
- fi
-
- # Add URLs on the LAN mirror
- # We subvert the normal download method, just to look for
- # looking at the local mirror
- if CT_GetFile "${basename}-${cset}" .tar.gz; then
- return 0
- fi
-
- CT_DoLog EXTRA "Retrieving '${basename}-${cset}' (git)"
-
- # Remove potential left-over from a previous run
- CT_DoExecLog ALL rm -rf "${tmp}.tar.gz" "${tmp}.tar" "${tmp}" "${dir}"
-
- if CT_DoExecLog ALL git clone "${url}" "${dir}"; then
- # Yep, cloned OK
- CT_Pushd "${dir}"
- CT_DoExecLog ALL git archive --format=tar \
- --prefix="${basename}-${cset}/" \
- -o "${tmp}.tar" \
- "${cset}"
- CT_DoExecLog ALL gzip -9 "${tmp}.tar"
- CT_DoExecLog ALL mv -f "${tmp}.tar.gz" "${dest}"
- CT_SaveLocal "${dest}"
- CT_DoExecLog ALL rm -rf "${tmp}.tar.gz" "${tmp}.tar" "${tmp}" "${dir}"
- CT_Popd
- echo ${cset}
- return 0
- else
- # Woops...
- CT_DoExecLog ALL rm -rf "${dir}"
- CT_DoLog DEBUG "Could not clone '${basename}'"
- return 1
- fi
-}
-
-# Extract a tarball
-# Some tarballs need to be extracted in specific places. Eg.: glibc addons
-# must be extracted in the glibc directory; uCLibc locales must be extracted
-# in the extra/locale sub-directory of uClibc. This is taken into account
-# by the caller, that did a 'cd' into the correct path before calling us
-# and sets nochdir to 'nochdir'.
-# Note also that this function handles the git trees!
-# Usage: CT_Extract [nochdir] <basename> [options]
-# where 'options' are dependent on the source (eg. git branch/tag...)
-CT_Extract() {
- local nochdir="$1"
- local basename
- local ext
- local -a tar_opts
-
- if [ "${nochdir}" = "nochdir" ]; then
- shift
- nochdir="$(pwd)"
- else
- nochdir="${CT_SRC_DIR}"
- fi
-
- basename="$1"
- shift
-
- # Check if already extracted
- if [ -e "${CT_SRC_DIR}/.${basename}.extracted" ]; then
- CT_DoLog DEBUG "Already extracted '${basename}'"
- return 0
- fi
-
- if ! ext="$(CT_GetFileExtension "${basename}")"; then
- CT_DoLog WARN "'${basename}' not found in '${CT_TARBALLS_DIR}'"
- return 1
- fi
- local full_file="${CT_TARBALLS_DIR}/${basename}${ext}"
-
- # Check if previously partially extracted
- if [ -e "${CT_SRC_DIR}/.${basename}.extracting" ]; then
- CT_DoLog ERROR "The '${basename}' sources were partially extracted."
- CT_DoLog ERROR "Please remove first:"
- CT_DoLog ERROR " - the source dir for '${basename}', in '${CT_SRC_DIR}'"
- CT_DoLog ERROR " - the file '${CT_SRC_DIR}/.${basename}.extracting'"
- CT_Abort "I'll stop now to avoid any carnage..."
- fi
- CT_DoExecLog DEBUG touch "${CT_SRC_DIR}/.${basename}.extracting"
-
- CT_Pushd "${nochdir}"
-
- CT_DoLog EXTRA "Extracting '${basename}'"
- CT_DoExecLog FILE mkdir -p "${basename}"
- tar_opts=( "--strip-components=1" )
- tar_opts+=( "-C" "${basename}" )
- tar_opts+=( "-xv" )
-
- case "${ext}" in
- .tar.xz) xz -fdc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;;
- .tar.lzma) xz -fdc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;;
- .tar.bz2) bzip2 -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;;
- .tar.gz|.tgz) gzip -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f -;;
- .tar) CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}";;
- .zip) CT_DoExecLog FILE unzip "${@}" "${full_file}";;
- /.git) CT_ExtractGit "${basename}" "${@}";;
- *) CT_DoLog WARN "Don't know how to handle '${basename}${ext}': unknown extension"
- return 1
- ;;
- esac
-
- # Don't mark as being extracted for git
- case "${ext}" in
- /.git) ;;
- *) CT_DoExecLog DEBUG touch "${CT_SRC_DIR}/.${basename}.extracted";;
- esac
- CT_DoExecLog DEBUG rm -f "${CT_SRC_DIR}/.${basename}.extracting"
-
- CT_Popd
-}
-
-# Create a working git clone of a local git repository
-# Usage: CT_ExtractGit <basename> [ref]
-# where 'ref' is the reference to use:
-# the full name of a branch, like "remotes/origin/branch_name"
-# a date as understandable by git, like "YYYY-MM-DD[ hh[:mm[:ss]]]"
-# a tag name
-# If 'ref' is not given, the current repository HEAD will be used
-CT_ExtractGit() {
- local basename="${1}"
- local ref="${2}"
- local repo
- local ref_type
-
- # pushd now to be able to get git revlist in case ref is a date
- repo="${CT_TARBALLS_DIR}/${basename}"
- CT_Pushd "${repo}"
-
- # What kind of reference is ${ref} ?
- if [ -z "${ref}" ]; then
- ref_type=head
- ref=$(git rev-list -n1 HEAD)
- elif git tag |{grep} -E "^${ref}$" >/dev/null 2>&1; then
- ref_type=tag
- elif git branch -a --no-color |${grep} -E "^. ${ref}$" >/dev/null 2>&1; then
- ref_type=branch
- elif date -d "${ref}" >/dev/null 2>&1; then
- ref_type=date
- ref=$(git rev-list -n1 --before="${ref}")
- else
- CT_Abort "Reference '${ref}' is an incorrect git reference: neither tag, branch nor date"
- fi
-
- CT_Popd
-
- CT_DoExecLog FILE rmdir "${basename}"
- case "${ref_type}" in
- branch) CT_DoExecLog FILE git clone -b "${ref}" "${repo}" "${basename}" ;;
- *) CT_DoExecLog FILE git clone "${repo}" "${basename}"
- CT_Pushd "${basename}"
- CT_DoExecLog FILE git checkout "${ref}"
- CT_Popd
- ;;
- esac
-}
-
-# Patches the specified component
-# See CT_Extract, above, for explanations on 'nochdir'
-# Usage: CT_Patch [nochdir] <packagename> <packageversion>
-# If the package directory is *not* packagename-packageversion, then
-# the caller must cd into the proper directory first, and call us
-# with nochdir
-CT_Patch() {
- local nochdir="$1"
- local pkgname
- local version
- local pkgdir
- local base_file
- local ver_file
- local d
- local -a patch_dirs
- local bundled_patch_dir
- local local_patch_dir
- local bundled_exp_patch_dir
- local local_exp_patch_dir
-
- if [ "${nochdir}" = "nochdir" ]; then
- shift
- pkgname="$1"
- version="$2"
- pkgdir="${pkgname}-${version}"
- nochdir="$(pwd)"
- else
- pkgname="$1"
- version="$2"
- pkgdir="${pkgname}-${version}"
- nochdir="${CT_SRC_DIR}/${pkgdir}"
- fi
-
- # Check if already patched
- if [ -e "${CT_SRC_DIR}/.${pkgdir}.patched" ]; then
- CT_DoLog DEBUG "Already patched '${pkgdir}'"
- return 0
- fi
-
- # Check if already partially patched
- if [ -e "${CT_SRC_DIR}/.${pkgdir}.patching" ]; then
- CT_DoLog ERROR "The '${pkgdir}' sources were partially patched."
- CT_DoLog ERROR "Please remove first:"
- CT_DoLog ERROR " - the source dir for '${pkgdir}', in '${CT_SRC_DIR}'"
- CT_DoLog ERROR " - the file '${CT_SRC_DIR}/.${pkgdir}.extracted'"
- CT_DoLog ERROR " - the file '${CT_SRC_DIR}/.${pkgdir}.patching'"
- CT_Abort "I'll stop now to avoid any carnage..."
- fi
- touch "${CT_SRC_DIR}/.${pkgdir}.patching"
-
- CT_Pushd "${nochdir}"
-
- CT_DoLog EXTRA "Patching '${pkgdir}'"
-
- bundled_patch_dir="${CT_LIB_DIR}/patches/${pkgname}/${version}"
- bundled_patch_arch_dir="${bundled_patch_dir}/${CT_ARCH}"
- local_patch_dir="${CT_LOCAL_PATCH_DIR}/${pkgname}/${version}"
-
- case "${CT_PATCH_ORDER}" in
- bundled) patch_dirs=("${bundled_patch_dir}" "${bundled_patch_arch_dir}");;
- local) patch_dirs=("${local_patch_dir}");;
- bundled,local) patch_dirs=("${bundled_patch_dir}" "${bundled_patch_arch_dir}" "${local_patch_dir}");;
- local,bundled) patch_dirs=("${local_patch_dir}" "${bundled_patch_dir}" "${bundled_patch_arch_dir}");;
- none) patch_dirs=;;
- esac
-
- for d in "${patch_dirs[@]}"; do
- CT_DoLog DEBUG "Looking for patches in '${d}'..."
- if [ -n "${d}" -a -d "${d}" ]; then
- for p in "${d}"/*.patch; do
- if [ -f "${p}" ]; then
- CT_DoExecLog ALL ${patch} --no-backup-if-mismatch -g0 -F1 -p1 -f -i "${p}"
- fi
- done
- if [ "${CT_PATCH_SINGLE}" = "y" ]; then
- break
- fi
- fi
- done
-
- if [ "${CT_OVERRIDE_CONFIG_GUESS_SUB}" = "y" ]; then
- CT_DoLog ALL "Overiding config.guess and config.sub"
- for cfg in config_guess config_sub; do
- eval ${cfg}="${CT_LIB_DIR}/scripts/${cfg/_/.}"
- [ -e "${CT_TOP_DIR}/scripts/${cfg/_/.}" ] && eval ${cfg}="${CT_TOP_DIR}/scripts/${cfg/_/.}"
- # Can't use CT_DoExecLog because of the '{} \;' to be passed un-mangled to find
- find . -type f -name "${cfg/_/.}" \
- -exec chmod -v u+w {} \; \
- -exec cp -v "${!cfg}" {} \; |CT_DoLog ALL
- done
- fi
-
- CT_DoExecLog DEBUG touch "${CT_SRC_DIR}/.${pkgdir}.patched"
- CT_DoExecLog DEBUG rm -f "${CT_SRC_DIR}/.${pkgdir}.patching"
-
- CT_Popd
-}
-
+# TBD these should not be needed if config.sub/guess is a package
# Two wrappers to call config.(guess|sub) either from CT_TOP_DIR or CT_LIB_DIR.
# Those from CT_TOP_DIR, if they exist, will be be more recent than those from CT_LIB_DIR.
CT_DoConfigGuess() {
@@ -1328,23 +865,33 @@ CT_EnvModify() {
# sample saving sequence.
CT_DoBuildTargetTuple() {
# Set the endianness suffix, and the default endianness gcc option
+ target_endian_eb=
+ target_endian_be=
+ target_endian_el=
+ target_endian_le=
case "${CT_ARCH_ENDIAN}" in
big)
target_endian_eb=eb
target_endian_be=be
- target_endian_el=
- target_endian_le=
CT_ARCH_ENDIAN_CFLAG="-mbig-endian"
CT_ARCH_ENDIAN_LDFLAG="-Wl,-EB"
;;
little)
- target_endian_eb=
- target_endian_be=
target_endian_el=el
target_endian_le=le
CT_ARCH_ENDIAN_CFLAG="-mlittle-endian"
CT_ARCH_ENDIAN_LDFLAG="-Wl,-EL"
;;
+ # big,little and little,big do not need to pass the flags;
+ # gcc is expected to be configured for that as default.
+ big,little)
+ target_endian_eb=eb
+ target_endian_be=be
+ ;;
+ little,big)
+ target_endian_el=el
+ target_endian_le=le
+ ;;
esac
# Set the bitness suffix
@@ -1379,7 +926,7 @@ CT_DoBuildTargetTuple() {
# Set the default values for ARCH, ABI, CPU, TUNE, FPU and FLOAT
unset CT_ARCH_ARCH_CFLAG CT_ARCH_ABI_CFLAG CT_ARCH_CPU_CFLAG CT_ARCH_TUNE_CFLAG CT_ARCH_FPU_CFLAG CT_ARCH_FLOAT_CFLAG
- unset CT_ARCH_WITH_ARCH CT_ARCH_WITH_ABI CT_ARCH_WITH_CPU CT_ARCH_WITH_TUNE CT_ARCH_WITH_FPU CT_ARCH_WITH_FLOAT
+ unset CT_ARCH_WITH_ARCH CT_ARCH_WITH_ABI CT_ARCH_WITH_CPU CT_ARCH_WITH_TUNE CT_ARCH_WITH_FPU CT_ARCH_WITH_FLOAT CT_ARCH_WITH_ENDIAN
[ "${CT_ARCH_ARCH}" ] && { CT_ARCH_ARCH_CFLAG="-march=${CT_ARCH_ARCH}"; CT_ARCH_WITH_ARCH="--with-arch=${CT_ARCH_ARCH}"; }
[ "${CT_ARCH_ABI}" ] && { CT_ARCH_ABI_CFLAG="-mabi=${CT_ARCH_ABI}"; CT_ARCH_WITH_ABI="--with-abi=${CT_ARCH_ABI}"; }
[ "${CT_ARCH_CPU}" ] && { CT_ARCH_CPU_CFLAG="-mcpu=${CT_ARCH_CPU}"; CT_ARCH_WITH_CPU="--with-cpu=${CT_ARCH_CPU}"; }
@@ -1401,6 +948,10 @@ CT_DoBuildTargetTuple() {
;;
esac
+ if [ "${CT_ARCH_SUPPORTS_WITH_ENDIAN}" = "y" ]; then
+ CT_ARCH_WITH_ENDIAN="--with-endian=${CT_ARCH_ENDIAN}"
+ fi
+
# Build the default kernel tuple part
CT_TARGET_KERNEL="${CT_KERNEL}"
@@ -1471,6 +1022,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 [...]]
@@ -1530,26 +1105,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"
@@ -1570,10 +1154,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
@@ -1584,7 +1172,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
@@ -1915,3 +1502,577 @@ CT_MultilibFixupLDSO()
CT_Popd
CT_EndStep
}
+
+# List the download mirrors. Usage:
+# CT_Mirrors ORGANIZATION PROJECT [...]
+CT_Mirrors()
+{
+ local org="${1}"
+ local project="${2}"
+
+ case "${org}" in
+ GNU)
+ echo "https://ftpmirror.gnu.org/gnu/${project}"
+ echo "http://ftpmirror.gnu.org/gnu/${project}"
+ echo "https://ftp.gnu.org/gnu/${project}"
+ echo "http://ftp.gnu.org/gnu/${project}"
+ echo "ftp://ftp.gnu.org/gnu/${project}"
+ ;;
+ sourceware)
+ echo "ftp://sourceware.org/pub/${project}"
+ echo "http://mirrors.kernel.org/sourceware/${project}"
+ echo "http://gcc.gnu.org/pub/${project}"
+ ;;
+ Linaro)
+ local version="${3}"
+ local base yymm
+ base="${version%%-*}"
+ yymm="${version##*-??}"
+ yymm="${yymm%%-*}"
+ echo "https://releases.linaro.org/components/toolchain/${project}-linaro/${version}"
+ echo "https://releases.linaro.org/archive/${yymm}/components/toolchain/${project}-linaro/${base}"
+ echo "https://releases.linaro.org/archive/${yymm}/components/toolchain/${project}-linaro"
+ ;;
+ kernel.org)
+ # TBD move to linux.sh?
+ if [ "${project}" != "linux" ]; then
+ CT_Abort "Unsupported project"
+ fi
+ local version="${CT_LINUX_VERSION}"
+ case "${version}" in
+ '')
+ # Ignore, this happens before .config is fully evaluated
+ ;;
+ [34].*)
+ echo "http://www.kernel.org/pub/linux/kernel/v${version%%.*}.x"
+ ;;
+ 2.6.*)
+ echo "http://www.kernel.org/pub/linux/kernel/v2.6"
+ case "${version}" in
+ 2.6.*.*)
+ echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm"
+ echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v${version%.*}"
+ ;;
+ esac
+ ;;
+ *)
+ CT_Abort "Unsupported Linux kernel version '${version}'"
+ ;;
+ esac
+ ;;
+ *)
+ CT_Abort "Unknown mirror '${org}'"
+ ;;
+ esac
+}
+
+# Get most recent version for CVS check-out.
+# CVS does not have a repository-wide identifier for a commit, so we must
+# use date. Variables are set by CT_PackageRun
+CT_GetVersion_cvs()
+{
+ # If date is not given, use current. Otherwise, check if format is correct.
+ # We don't support fancy CVS specifications like "1 day ago", as we'll need
+ # to convert them to some stable representation like 20170617231304.
+ if [ -z "${devel_revision}" ]; then
+ devel_revision=`LANG=C TZ=UTC date '+%Y/%m/%d %H:%M:%S'`
+ else
+ case "${devel_revision}" in
+ [12][0-9][0-9][0-9]/[01][0-9]/[0-3][0-9]\ [0-2][0-9]:[0-5][0-9]:[0-5][0-9])
+ ;;
+ *)
+ CT_Abort "${pkg_name}: invalid date format ${devel_revision}"
+ ;;
+ esac
+ fi
+ unique_id="${devel_branch:-trunk}-${devel_revision//[^0-9]/}"
+}
+
+# Check out sources from CVS. Variables are set by CT_PackageRun.
+CT_Download_cvs()
+{
+ local pserver="${devel_url%% *}"
+ local module="${devel_url##* }"
+
+ # CVS has no name for "main" branch, so use -r only if non-default
+ # TBD try -'d ${basename}', with/without -N
+ CT_DoExecLog ALL cvs -z 9 -d "${pserver}" co -P ${devel_branch:+-r ${devel_branch}} \
+ -D "${devel_revision} UTC" "${module}"
+ if [ "${module}" != "${pkg_name}" ]; then
+ CT_DoExecLog ALL mv "${module}" "${pkg_name}"
+ fi
+}
+
+# Find the most recent version from Subversion.
+CT_GetVersion_svn()
+{
+ local version
+
+ devel_branch="${devel_branch:-/trunk}"
+
+ # If revision is not given, find the most recent
+ if [ -z "${devel_revision}" ]; then
+ devel_revision=`svn info "${devel_url}${devel_branch}" | sed -n 's/^Last Changed Rev: //p'`
+ fi
+
+ # Construct version from branch/revision
+ version="${devel_branch//\//_}"
+ version="${version#_}"
+ version="${version%_}"
+ version="${version}-${devel_revision}"
+ unique_id="${version}"
+}
+
+# Retrieve sources from Subversion.
+CT_Download_svn()
+{
+ CT_DoExecLog ALL svn export -r "${devel_revision}" "${devel_url}${devel_branch}" "${pkg_name}"
+}
+
+# Find the most recent version from Mercurial.
+CT_GetVersion_hg()
+{
+ if [ -n "${devel_branch}" -a -n "${devel_revision}" ]; then
+ CT_Abort "${pkg_name}: cannot specify both branch and changeset for Mercurial"
+ fi
+
+ # Mercurial cannot query remote branches except the default, so we'll have
+ # to clone if cset is not known and a branch is given.
+ if [ -z "${devel_revision}" ]; then
+ if [ -z "${devel_branch}" ]; then
+ # Mercurial does not allow querying branches
+ devel_revision=`hg identify "${devel_url}"`
+ else
+ CT_DoLog WARN "${pkg_name}: Mercurial cannot query non-default branch, will clone"
+ devel_revision="to.be.determined"
+ fi
+ fi
+ unique_id="${devel_revision}"
+}
+
+# Retrieve sources from Mercurial.
+CT_Download_hg()
+{
+ CT_DoExecLog ALL hg clone "${devel_url}" "${pkg_name}"
+ CT_Pushd "${pkg_name}"
+ if [ -n "${devel_branch}" ]; then
+ CT_DoExecLog ALL hg update "${devel_branch}"
+ fi
+ if [ "${devel_revision}" = "to.be.determined" ]; then
+ # Report what we found out (as common message lacks the revision)
+ devel_revision=`hg identify -i`
+ unique_id="${devel_revision}"
+ CT_DoLog EXTRA "Retrieved revision ${devel_revision}"
+ else
+ CT_DoExecLog ALL hg update "${devel_revision}"
+ fi
+ CT_DoExecLog ALL rm -rf .hg
+ CT_Popd
+}
+
+# Get the most recent version from Git.
+CT_GetVersion_git()
+{
+ if [ -n "${devel_branch}" -a -n "${devel_revision}" ]; then
+ CT_Abort "${pkg_name}: cannot specify both branch and changeset for Git"
+ fi
+
+ devel_branch="${devel_branch:-master}"
+ if [ -z "${devel_revision}" ]; then
+ local matches=`git ls-remote --exit-code "${devel_url}" --refs "${devel_branch}" \
+ || echo "not found"`
+ local best using ref
+
+ # Cannot test $?, setting a trap on ERR prevents bash from returning the
+ # status code.
+ if [ "${matches}" = "not found" ]; then
+ CT_Abort "Failed to find git ref ${devel_branch} at ${devel_url}"
+ fi
+ if [ `echo "${matches}" | wc -l` -gt 1 ]; then
+ if echo "${matches}" | grep '[[:space:]]\(refs/heads/\)\?'"${devel_branch}\$" >/dev/null; then
+ # Try exact match, or prepended with "refs/heads". Some projects (e.g. binutils)
+ # have refs/original/refs/heads/master as well as refs/heads/master, and
+ # `git ls-remote refs/heads/master` prints both.
+ best=`echo "${matches}" | grep '[[:space:]]\(refs/heads/\)\?'"${devel_branch}\$"`
+ using="best match"
+ else
+ best=`echo "${matches}" | head -n1`
+ using="first"
+ fi
+ ref=`echo "${best}" | sed 's/.*[[:space:]]//'`
+ CT_DoLog WARN "Ambiguous ref ${devel_branch} at ${devel_url}, using ${using} (${ref})"
+ else
+ best="${matches}"
+ fi
+ devel_revision=`echo "${best}" | cut -c1-8`
+ CT_DoLog DEBUG "ref ${devel_branch} at ${devel_url} has cset of ${devel_revision}"
+ fi
+ unique_id="${devel_revision}"
+}
+
+# Retrieve sources from Git.
+CT_Download_git()
+{
+ # Git does not allow making a shallow clone of a specific commit.
+ CT_DoExecLog ALL git clone "${devel_url}" "${pkg_name}"
+ CT_Pushd "${pkg_name}"
+ CT_DoExecLog ALL git checkout "${devel_revision}" --
+ CT_DoExecLog ALL rm -rf .git
+ CT_Popd
+}
+
+# Helper: run another action after setting local variables
+CT_PackageRun()
+{
+ local sym="${1}"
+ local run="${2}"
+ local src_dir="/unknown-src-dir"
+ local v
+
+ # Get rid of our arguments
+ shift 2
+
+ # Variables that are per-project
+ for v in use dir_name; do
+ eval "local ${v}=\${CT_${sym}_${v^^}}"
+ done
+
+ # If $use is not set, we only have one fork to handle
+ use="${use:-${sym}}"
+
+ # Variables that are per-fork
+ for v in basename pkg_name version \
+ 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^^}}"
+ done
+
+ for v in archive_filename archive_dirname; do
+ # kconfig and shell have different quoting rules, so it seems impossible to make
+ # kconfig quote '$' properly for eval (i.e. not have it expanded when loading the
+ # .config). Therefore, use '@' instead of '$' in kconfig files and substitute it
+ # here for select variables.
+ eval "eval ${v}=\${${v}//@/$}"
+ done
+
+ ${run} "$@"
+
+ # 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 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
+}
+
+# Closure for fetching the sources
+CT_DoFetch()
+{
+ local tmp_dir
+
+ if [ "${src_release}" = "y" ]; then
+ # Some packages do not contain any directory level at all
+ if [ "${archive_dirname}" != "." ]; then
+ basename="${archive_dirname}"
+ else
+ basename="${pkg_name}-${version}"
+ fi
+ if ! CT_GetFile "${pkg_name}" "${archive_filename}" "${archive_formats}" ${mirrors}; then
+ CT_Abort "${pkg_name}: download failed"
+ fi
+
+ elif [ "${src_devel}" = "y" ]; then
+ local unique_id
+
+ if [ -z "${devel_revision}" -a "${CT_FORBID_DOWNLOAD}" = "y" ]; then
+ CT_Abort "${pkg_name}: cannot find most recent revisions with downloads prohibited"
+ fi
+
+ # Each VCS backend must provide two methods:
+ # - CT_GetVersion_xxx that sets the base name for the package (package name
+ # and some unique identifier for the version)
+ # - CT_Download_xxx that retrieves the sources into the directory named as
+ # ${pkg_name}
+ # Both these methods can also modify devel_branch/devel_revision. Typically,
+ # this would override empty (default) values with "default branch name" and
+ # "most current revision", respectively.
+
+ CT_GetVersion_${devel_vcs}
+ if [ -z "${unique_id}" ]; then
+ CT_Abort "${pkg_name}: ${devel_vcs} did not set unique ID for branch/revision"
+ fi
+ basename="${pkg_name}-${devel_vcs}-${unique_id}"
+ version="${devel_vcs}-${unique_id}"
+
+ # 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 "${pkg_name}" "${basename}" '.tar.bz2'; then
+ return 0
+ fi
+
+ if [ "${CT_FORBID_DOWNLOAD}" = "y" ]; then
+ CT_DoLog WARN "Downloads forbidden, not trying ${devel_vcs} retrieval"
+ return 1
+ fi
+
+ CT_DoLog EXTRA "Retrieving '${basename}' (${devel_vcs} ${devel_url} ${devel_branch} ${devel_revision})"
+ CT_MktempDir tmp_dir
+ CT_Pushd "${tmp_dir}"
+ CT_Download_${devel_vcs}
+
+ # First setting above may not have determined the version (e.g. with Mercurial)
+ # Set the final, downloaded version.
+ version="${devel_vcs}-${unique_id}"
+ basename="${pkg_name}-${version}"
+
+ CT_DoExecLog ALL mv "${pkg_name}${devel_subdir:+/${devel_subdir}}" "${basename}"
+ CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${basename}"
+ CT_SaveLocal "${CT_TARBALLS_DIR}/${basename}.tar.bz2"
+ CT_Popd
+ CT_DoExecLog ALL rm -rf "${tmp_dir}"
+
+ elif [ "${src_custom}" = "y" ]; then
+ # Will be handled during extraction/patching
+ version="local"
+ basename="${dir_name}"
+ :;
+ else
+ CT_Abort "No known source for ${pkg_name}"
+ fi
+}
+
+# Obtain the sources for a component, either from a tarball, version control system
+# or a custom location.
+CT_Fetch()
+{
+ CT_PackageRun "${1}" CT_DoFetch
+}
+
+# Unpack an archive.
+CT_Extract()
+{
+ local file="${1}"
+ local dir="${2}"
+ local components="${3}"
+
+ CT_DoExecLog ALL mkdir -p "${dir}"
+ case "${file}" in
+ *.tar.xz)
+ xz -fdc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components}
+ ;;
+ *.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}
+ ;;
+ *.tar.gz|*.tgz)
+ gzip -dc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components}
+ ;;
+ *.tar)
+ CT_DoExecLog FILE tar x -v -f "${file}" -C "${dir}" ${components}
+ ;;
+ *.zip)
+ CT_Pushd "${dir}"
+ CT_DoExecLog FILE unzip "${file}" ${components}
+ CT_Popd
+ ;;
+ *)
+ CT_Abort "Don't know how to handle ${file}: unknown extension"
+ ;;
+ esac
+}
+
+# Closure for unpacking/patching the sources. There are two source directories:
+# - CT_COMMON_SRC_DIR stores common sources, such as released tarballs (including
+# bundled or local patches, if necessary) or checked out working copies.
+# Custom sources cannot be placed here, as they may have similarly named
+# packages coming from different origins.
+# - CT_SRC_DIR stores per-configuration sources. These are either symlinks back
+# to CT_ORIG_SRC_DIR sources, or a copy from the custom source, or a copy
+# from CT_ORIG_SRC_DIR + target-specific overrides.
+CT_DoExtractPatch()
+{
+ local patchfunc="${1}"
+ local archive ext
+ 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 "${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 "${src_dir}/${basename}"
+ CT_DoExecLog ALL rm -f "${src_dir}/.${basename}".*
+ fi
+
+ if [ -f "${src_dir}/.${basename}.extracted" ]; then
+ CT_DoLog DEBUG "Already extracted ${basename}"
+ else
+ CT_DoLog EXTRA "Extracting ${basename}"
+ CT_DoExecLog ALL touch "${src_dir}/.${basename}.extracting"
+ if [ "${src_release}" = "y" ]; then
+ archive="${archive_filename}"
+ else
+ archive="${basename}"
+ fi
+ # TBD save/discover the extension while fetching
+ ext=`CT_GetFileExtension "${CT_TARBALLS_DIR}/${archive}"`
+ if [ "${archive_dirname}" = "." ]; then
+ 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}" "${src_dir}"
+ fi
+ CT_DoExecLog ALL touch "${src_dir}/.${basename}.extracted"
+ CT_DoExecLog ALL rm -f "${src_dir}/.${basename}.extracting"
+ fi
+
+ if [ -f "${src_dir}/.${basename}.patched" ]; then
+ CT_DoLog DEBUG "Already patched ${basename}"
+ else
+ CT_DoLog EXTRA "Patching ${basename}"
+ 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}"
+
+ case "${CT_PATCH_ORDER}" in
+ bundled) patch_dirs=("${bundled_patch_dir}");;
+ local) patch_dirs=("${local_patch_dir}");;
+ bundled,local) patch_dirs=("${bundled_patch_dir}" "${local_patch_dir}");;
+ local,bundled) patch_dirs=("${local_patch_dir}" "${bundled_patch_dir}");;
+ none) patch_dirs=;;
+ esac
+
+ 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
+ for p in "${d}"/*.patch; do
+ if [ -f "${p}" ]; then
+ CT_DoExecLog ALL ${patch} --no-backup-if-mismatch -g0 -F1 -p1 -f -i "${p}"
+ fi
+ done
+ fi
+ done
+
+ # TBD create meta-package for config.sub/config.guess with replacement script
+ if [ "${CT_OVERRIDE_CONFIG_GUESS_SUB}" = "y" ]; then
+ CT_DoLog ALL "Overiding config.guess and config.sub"
+ for cfg in config.guess config.sub; do
+ # Can't use CT_DoExecLog because of the '{} \;' to be passed un-mangled to find
+ find . -type f -name "${cfg}" \
+ -exec chmod -v u+w {} \; \
+ -exec cp -v "${CT_LIB_DIR}/scripts/${cfg}" {} \; |CT_DoLog ALL
+ done
+ fi
+
+ # FIXME: This currently means we end up using host's autotools,
+ # but changing this requires reworking the order of operations in crosstool-NG:
+ # we'd need to defer the download/extraction/patching of a package until after
+ # the companion tools are built.
+ if [ -n "${devel_bootstrap}" ]; then
+ CT_DoExecLog ALL "${CT_CONFIG_SHELL}" -c "${devel_bootstrap}"
+ fi
+
+ if [ -n "${patchfunc}" ]; then
+ ${patchfunc}
+ fi
+
+ CT_Popd
+
+ 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"
+ fi
+
+ # Symlink/copy/overlay into per-target source directory
+ if [ "${src_custom}" = "y" ]; then
+ # 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}" "${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}" "${src_dir}"
+ bn=`CT_GetFileBasename "${custom_location##*/}"`
+ CT_TestOrAbort "Unknown file extension: ${custom_location}" -n "${bn}"
+ CT_DoExecLog ALL mv -v "${src_dir}/${bn%${ext}}" "${src_dir}/${dir_name}"
+ else
+ CT_Abort "Neither file nor directory: ${custom_location}"
+ fi
+ else
+ # Common source, just symlink
+ 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
+# or copy the sources into a private source directory and apply target-specific
+# changes (such as xtensa overrides).
+CT_ExtractPatch()
+{
+ local pkg="${1}"
+
+ 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}\""
+}
diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in
index d9d999c..5fab6d9 100644
--- a/scripts/saveSample.sh.in
+++ b/scripts/saveSample.sh.in
@@ -72,8 +72,8 @@ fi
# Save the uClibc .config file
if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then
# We save the file, and then point the saved sample to this file
- CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "${samp_dir}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
- "${sed}" -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
+ CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "${samp_dir}/${CT_LIBC}.config"
+ "${sed}" -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}.config"|;' \
.defconfig
else
# remove any dangling files
diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh
index 1e5d50b..726ea2e 100644
--- a/scripts/showSamples.sh
+++ b/scripts/showSamples.sh
@@ -11,6 +11,9 @@
# GREP_OPTIONS screws things up.
export GREP_OPTIONS=
+# Dummy version which is invoked from .config
+CT_Mirrors() { :; }
+
# Dump a single sample
# Note: we use the specific .config.sample config file
dump_single_sample() {
@@ -23,13 +26,26 @@ dump_single_sample() {
. $(pwd)/.config.sample
# libc needs some love
+ # TBD after conversion of gen-kconfig to template, use CT_LIBC_USE as a selector for other variables
+ # (i.e. whether to use CT_GLIBC_VERSION or CT_MUSL_VERSION)
local libc_name="${CT_LIBC}"
- local libc_ver="${CT_LIBC_VERSION}"
- if [ "${CT_LIBC}" = "uClibc" -a "${CT_LIBC_UCLIBC_NG}" = "y" ]; then
- libc_name="uClibc-ng"
- elif [ "${CT_LIBC}" = "mingw" ]; then
- libc_ver="${CT_WINAPI_VERSION}"
- fi
+ local libc_ver ksym
+
+ ksym=${libc_name//[^0-9A-Za-z_]/_}
+ ksym=${ksym^^}
+ case ${ksym} in
+ GLIBC|NEWLIB)
+ if eval "[ \"\${CT_${ksym}_USE_LINARO}\" = y ]"; then
+ ksym="${ksym}_LINARO"
+ fi
+ ;;
+ UCLIBC)
+ if [ "${UCLIBC_NG_USE_UCLIBC_NG_ORG}" = y ]; then
+ ksym="${ksym}_NG"
+ fi
+ ;;
+ esac
+ eval "libc_ver=\"\${CT_${ksym}_VERSION}\""
case "${sample}" in
current)
@@ -63,7 +79,8 @@ dump_single_sample() {
printf " %-*s : %s\n" ${width} "Host" "${CT_HOST}"
;;
esac
- printf " %-*s : %s\n" ${width} "OS" "${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}"
+ # TBD currently only Linux is used. General handling for single-select (compiler/binutils/libc/os) and multi-select (debug/companions) components?
+ printf " %-*s : %s\n" ${width} "OS" "${CT_KERNEL}${CT_LINUX_VERSION:+-}${CT_LINUX_VERSION}"
if [ -n "${CT_GMP}" \
-o -n "${CT_MPFR}" \
-o -n "${CT_ISL}" \
@@ -139,7 +156,7 @@ dump_single_sample() {
if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" = "y" ]; then
printf " //custom// "
else
- printf " ${CT_KERNEL_VERSION} "
+ printf " ${CT_LINUX_VERSION} "
fi
fi
printf "| ${CT_BINUTILS_VERSION} "
diff --git a/scripts/upgrade.sed b/scripts/upgrade.sed
new file mode 100644
index 0000000..995b804
--- /dev/null
+++ b/scripts/upgrade.sed
@@ -0,0 +1,25 @@
+# After 1.23.0, generated config options were standardized to upper case
+s/\<CT_ARCH_(alpha|arm|avr|m68k|microblaze|mips|msp430|nios2|powerpc|s390|sh|sparc|x86|xtensa)\>/CT_ARCH_\U\1/g
+s/\<CT_BINUTILS_binutils\>/CT_BINUTILS_BINUTILS/g
+s/\<CT_CC_gcc\>/CT_CC_GCC/g
+s/\<CT_COMP_TOOLS_(autoconf|automake|libtool|m4|make)\>/CT_COMP_TOOLS_\U\1/g
+s/\<CT_DEBUG_(duma|gdb|ltrace|strace)\>/CT_DEBUG_\U\1/g
+s/\<CT_KERNEL_(bare_metal|linux|windows)\>/CT_KERNEL_\U\1/g
+s/\<CT_LIBC_(avr_libc|bionic|glibc|mingw|musl|newlib|none|uClibc)\>/CT_LIBC_\U\1/g
+
+# Also after 1.23.0, package versions were brought to the same format
+s/\<CT_LIBC_BIONIC_V_([0-9a-z]+)\>/CT_ANDROID_NDK_V_R\U\1/g
+s/\<CT_ANDROID_NDK_V_R15BETA1\>/CT_ANDROID_NDK_V_R15B/g
+s/\<CT_LIBC_AVR_LIBC_V_/CT_AVR_LIBC_V_/g
+s/\<CT_CC_GCC_V_/CT_GCC_V_/g
+s/\<CT_LIBC_GLIBC_V_/CT_GLIBC_V_/g
+s/\<CT_KERNEL_V_/CT_LINUX_V_/g
+s/\<CT_WINAPI_V_/CT_MINGW_W64_V_V/g
+s/\<CT_LIBC_MUSL_V_/CT_MUSL_V_/g
+s/\<CT_LIBC_NEWLIB_V_/CT_NEWLIB_V_/g
+s/\<CT_LIBC_UCLIBC_NG_V_/CT_UCLIBC_NG_V_/g
+
+# Special cases that need manual intervention (require setting of supporting options)
+s/\<CT_LIBC_UCLIBC_V_.*/# [&] not handled by upgrade script, use menuconfig./w/dev/stderr
+s/\<CT_[A-Za-z0-9_]*_SHOW_LINARO.*/# [&] not handled by upgrade script, use menuconfig./w/dev/stderr
+s/\<CT_[A-Za-z0-9_]*_CUSTOM_LOCATION.*/# [&] not handled by upgrade script, use menuconfig./w/dev/stderr