summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/continuous-integration-workflow.yml79
-rwxr-xr-xbootstrap7
-rw-r--r--configure.ac2
-rw-r--r--packages/binutils/2.23.2/0016-Fix-a-missing-include-of-string.patch26
-rw-r--r--packages/binutils/2.24/0025-Fix-a-missing-include-of-string.patch26
-rw-r--r--packages/binutils/2.25.1/0023-Fix-a-missing-include-of-string.patch26
-rw-r--r--packages/binutils/2.26.1/0013-Fix-a-missing-include-of-string.patch26
-rw-r--r--packages/binutils/2.27/0012-Fix-a-missing-include-of-string.patch26
-rw-r--r--packages/binutils/2.28.1/0009-Fix-a-missing-include-of-string.patch26
-rw-r--r--packages/binutils/2.29.1/0009-Fix-a-missing-include-of-string.patch26
-rw-r--r--packages/binutils/2.30/0009-Fix-a-missing-include-of-string.patch26
-rw-r--r--packages/binutils/2.31.1/0012-Fix-a-missing-include-of-string.patch26
-rw-r--r--packages/binutils/2.32/0009-Fix-a-missing-include-of-string.patch26
-rw-r--r--packages/binutils/2.35/0000-sh-conf.patch34
-rw-r--r--packages/binutils/2.35/0001-ld_makefile_patch.patch27
-rw-r--r--packages/binutils/2.35/0002-check_ldrunpath_length.patch24
-rw-r--r--packages/binutils/2.35/0003-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch15
-rw-r--r--packages/binutils/2.35/0004-Dont-link-to-libfl-as-its-unnecessary.patch105
-rw-r--r--packages/binutils/2.35/0005-Darwin-gold-binary-cc-include-string-not-cstring.patch15
-rw-r--r--packages/binutils/2.35/0006-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch70
-rw-r--r--packages/binutils/2.35/0007-sysroot.patch41
-rw-r--r--packages/binutils/2.35/0008-poison-system-directories.patch279
-rw-r--r--packages/binutils/2.35/chksum12
-rw-r--r--packages/binutils/2.35/version.desc (renamed from packages/gcc/9.2.0/version.desc)0
-rw-r--r--packages/expat/package.desc2
-rw-r--r--packages/gcc/10.2.0/0000-libtool-leave-framework-alone.patch (renamed from packages/gcc/9.2.0/0000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc/10.2.0/0001-uclibc-conf.patch (renamed from packages/gcc/9.2.0/0001-uclibc-conf.patch)0
-rw-r--r--packages/gcc/10.2.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch163
-rw-r--r--packages/gcc/10.2.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch (renamed from packages/gcc/9.2.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch)0
-rw-r--r--packages/gcc/10.2.0/0004-arm-softfloat-libgcc.patch (renamed from packages/gcc/9.2.0/0004-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc/10.2.0/0005-fix-m68k-uclinux.patch21
-rw-r--r--packages/gcc/10.2.0/0006-libgfortran-missing-include.patch14
-rw-r--r--packages/gcc/10.2.0/0007-nios2-bad-multilib-default.patch (renamed from packages/gcc/9.2.0/0007-nios2-bad-multilib-default.patch)0
-rw-r--r--packages/gcc/10.2.0/0008-libgcc-disable-split-stack-nothreads.patch (renamed from packages/gcc/9.2.0/0008-libgcc-disable-split-stack-nothreads.patch)0
-rw-r--r--packages/gcc/10.2.0/0009-bionic-ndk.patch (renamed from packages/gcc/9.2.0/0009-bionic-ndk.patch)0
-rw-r--r--packages/gcc/10.2.0/0010-crystax.patch529
-rw-r--r--packages/gcc/10.2.0/0011-crystax.patch (renamed from packages/gcc/9.2.0/0011-crystax.patch)0
-rw-r--r--packages/gcc/10.2.0/0012-crystax.patch278
-rw-r--r--packages/gcc/10.2.0/0013-crystax.patch (renamed from packages/gcc/9.2.0/0013-crystax.patch)2
-rw-r--r--packages/gcc/10.2.0/0014-crystax.patch (renamed from packages/gcc/9.2.0/0014-crystax.patch)0
-rw-r--r--packages/gcc/10.2.0/0015-crystax.patch (renamed from packages/gcc/9.2.0/0015-crystax.patch)2
-rw-r--r--packages/gcc/10.2.0/0016-crystax.patch (renamed from packages/gcc/9.2.0/0016-crystax.patch)0
-rw-r--r--packages/gcc/10.2.0/0017-crystax.patch (renamed from packages/gcc/9.2.0/0017-crystax.patch)0
-rw-r--r--packages/gcc/10.2.0/0018-isl-0.20.patch (renamed from packages/gcc/9.2.0/0018-isl-0.20.patch)0
-rw-r--r--packages/gcc/10.2.0/chksum8
-rw-r--r--packages/gcc/10.2.0/version.desc0
-rw-r--r--packages/gcc/8.4.0/0000-libtool-leave-framework-alone.patch (renamed from packages/gcc/8.4.0/8.3.0/0000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc/8.4.0/0001-uclibc-conf.patch (renamed from packages/gcc/8.4.0/8.3.0/0001-uclibc-conf.patch)0
-rw-r--r--packages/gcc/8.4.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from packages/gcc/8.4.0/8.3.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--packages/gcc/8.4.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch (renamed from packages/gcc/8.4.0/8.3.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch)0
-rw-r--r--packages/gcc/8.4.0/0004-arm-softfloat-libgcc.patch (renamed from packages/gcc/8.4.0/8.3.0/0004-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc/8.4.0/0005-fix-m68k-uclinux.patch (renamed from packages/gcc/8.4.0/8.3.0/0005-fix-m68k-uclinux.patch)0
-rw-r--r--packages/gcc/8.4.0/0006-libgfortran-missing-include.patch (renamed from packages/gcc/8.4.0/8.3.0/0006-libgfortran-missing-include.patch)0
-rw-r--r--packages/gcc/8.4.0/0007-nios2-bad-multilib-default.patch (renamed from packages/gcc/8.4.0/8.3.0/0007-nios2-bad-multilib-default.patch)0
-rw-r--r--packages/gcc/8.4.0/0008-libgcc-disable-split-stack-nothreads.patch (renamed from packages/gcc/8.4.0/8.3.0/0008-libgcc-disable-split-stack-nothreads.patch)0
-rw-r--r--packages/gcc/8.4.0/0009-bionic-ndk.patch (renamed from packages/gcc/8.4.0/8.3.0/0009-bionic-ndk.patch)0
-rw-r--r--packages/gcc/8.4.0/0010-crystax.patch (renamed from packages/gcc/8.4.0/8.3.0/0010-crystax.patch)0
-rw-r--r--packages/gcc/8.4.0/0011-crystax.patch (renamed from packages/gcc/8.4.0/8.3.0/0011-crystax.patch)0
-rw-r--r--packages/gcc/8.4.0/0012-crystax.patch (renamed from packages/gcc/8.4.0/8.3.0/0012-crystax.patch)0
-rw-r--r--packages/gcc/8.4.0/0013-crystax.patch (renamed from packages/gcc/8.4.0/8.3.0/0013-crystax.patch)0
-rw-r--r--packages/gcc/8.4.0/0014-crystax.patch (renamed from packages/gcc/8.4.0/8.3.0/0014-crystax.patch)0
-rw-r--r--packages/gcc/8.4.0/0015-crystax.patch (renamed from packages/gcc/8.4.0/8.3.0/0015-crystax.patch)0
-rw-r--r--packages/gcc/8.4.0/0016-crystax.patch (renamed from packages/gcc/8.4.0/8.3.0/0016-crystax.patch)0
-rw-r--r--packages/gcc/8.4.0/0017-crystax.patch (renamed from packages/gcc/8.4.0/8.3.0/0017-crystax.patch)0
-rw-r--r--packages/gcc/8.4.0/0018-ARC-Add-multilib-support-for-linux-targets.patch (renamed from packages/gcc/8.4.0/8.3.0/0018-ARC-Add-multilib-support-for-linux-targets.patch)0
-rw-r--r--packages/gcc/8.4.0/0019-isl-0.20.patch (renamed from packages/gcc/8.4.0/8.3.0/0019-isl-0.20.patch)0
-rw-r--r--packages/gcc/8.4.0/0020-ARM-fix-cmse.patch (renamed from packages/gcc/8.4.0/8.3.0/0020-ARM-fix-cmse.patch)0
-rw-r--r--packages/gcc/8.4.0/0021-arm-Make-arm_cmse.h-C99-compatible.patch (renamed from packages/gcc/8.4.0/8.3.0/0021-arm-Make-arm_cmse.h-C99-compatible.patch)0
-rw-r--r--packages/gcc/8.4.0/0022-ARC-Update-fma-expansions.patch (renamed from packages/gcc/8.4.0/8.3.0/0022-ARC-Update-fma-expansions.patch)0
-rw-r--r--packages/gcc/9.2.0/chksum8
-rw-r--r--packages/gcc/9.3.0/0000-libtool-leave-framework-alone.patch18
-rw-r--r--packages/gcc/9.3.0/0001-uclibc-conf.patch17
-rw-r--r--packages/gcc/9.3.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from packages/gcc/9.2.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)6
-rw-r--r--packages/gcc/9.3.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch14
-rw-r--r--packages/gcc/9.3.0/0004-arm-softfloat-libgcc.patch31
-rw-r--r--packages/gcc/9.3.0/0005-fix-m68k-uclinux.patch (renamed from packages/gcc/9.2.0/0005-fix-m68k-uclinux.patch)0
-rw-r--r--packages/gcc/9.3.0/0006-libgfortran-missing-include.patch (renamed from packages/gcc/9.2.0/0006-libgfortran-missing-include.patch)0
-rw-r--r--packages/gcc/9.3.0/0007-nios2-bad-multilib-default.patch31
-rw-r--r--packages/gcc/9.3.0/0008-libgcc-disable-split-stack-nothreads.patch17
-rw-r--r--packages/gcc/9.3.0/0009-bionic-ndk.patch60
-rw-r--r--packages/gcc/9.3.0/0010-crystax.patch (renamed from packages/gcc/9.2.0/0010-crystax.patch)16
-rw-r--r--packages/gcc/9.3.0/0011-crystax.patch27
-rw-r--r--packages/gcc/9.3.0/0012-crystax.patch (renamed from packages/gcc/9.2.0/0012-crystax.patch)6
-rw-r--r--packages/gcc/9.3.0/0013-crystax.patch22
-rw-r--r--packages/gcc/9.3.0/0014-crystax.patch26
-rw-r--r--packages/gcc/9.3.0/0015-crystax.patch33
-rw-r--r--packages/gcc/9.3.0/0016-crystax.patch23
-rw-r--r--packages/gcc/9.3.0/0017-crystax.patch34
-rw-r--r--packages/gcc/9.3.0/0018-isl-0.20.patch26
-rw-r--r--packages/gcc/9.3.0/chksum8
-rw-r--r--packages/gcc/9.3.0/version.desc0
-rw-r--r--packages/gdb/8.2.1/0005-musl-aarch64-sigcontext.patch17
-rw-r--r--packages/glibc/2.12.1/0044-new-tools.patch4
-rw-r--r--packages/glibc/2.12.2/0007-new-tools.patch4
-rw-r--r--packages/glibc/2.13/0043-new-tools.patch4
-rw-r--r--packages/glibc/2.14.1/0043-new-tools.patch4
-rw-r--r--packages/glibc/2.15/0044-new-tools.patch4
-rw-r--r--packages/glibc/2.16.0/0042-fix-GCC-10-detection.patch25
-rw-r--r--packages/glibc/2.17/0018-fix-GCC-10-detection.patch25
-rw-r--r--packages/glibc/2.18/0019-fix-GCC-10-detection.patch25
-rw-r--r--packages/glibc/2.19/0017-Fix-cmpli-usage-in-power6-memset.patch49
-rw-r--r--packages/glibc/2.19/0017-fix-GCC-10-detection.patch25
-rw-r--r--packages/glibc/2.20/0017-Fix-cmpli-usage-in-power6-memset.patch49
-rw-r--r--packages/glibc/2.20/0017-fix-GCC-10-detection.patch25
-rw-r--r--packages/glibc/2.21/0017-Fix-cmpli-usage-in-power6-memset.patch49
-rw-r--r--packages/glibc/2.22/0017-Fix-cmpli-usage-in-power6-memset.patch49
-rw-r--r--packages/glibc/2.23/0013-Fix-cmpli-usage-in-power6-memset.patch49
-rw-r--r--packages/glibc/2.27/0001-Fix-build-with-GCC-10-when-long-double-double.patch166
-rw-r--r--packages/glibc/2.28/0002-Fix-build-with-GCC-10-when-long-double-double.patch166
-rw-r--r--packages/glibc/2.29/0003-Fix-build-with-GCC-10-when-long-double-double.patch166
-rw-r--r--packages/glibc/2.30/0003-Fix-build-with-GCC-10-when-long-double-double.patch166
-rw-r--r--packages/glibc/2.31/0002-Fix-build-with-GCC-10-when-long-double-double.patch166
-rw-r--r--packages/glibc/package.desc2
-rw-r--r--packages/libelf/package.desc2
-rw-r--r--samples/mips64-unknown-linux-gnu/crosstool.config7
-rw-r--r--samples/mips64-unknown-linux-gnu/reported.by3
-rw-r--r--scripts/build/debug/300-gdb.sh5
-rw-r--r--testing/docker/alpine3.8/Dockerfile2
-rw-r--r--testing/docker/archlinux/Dockerfile2
-rw-r--r--testing/docker/centos6/Dockerfile2
-rw-r--r--testing/docker/centos7/Dockerfile2
-rw-r--r--testing/docker/fedora29/Dockerfile2
-rw-r--r--testing/docker/mint19-amd64/Dockerfile2
-rw-r--r--testing/docker/ubuntu16.04/Dockerfile2
-rw-r--r--testing/docker/ubuntu18.04/Dockerfile2
125 files changed, 3635 insertions, 49 deletions
diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml
new file mode 100644
index 0000000..97df813
--- /dev/null
+++ b/.github/workflows/continuous-integration-workflow.yml
@@ -0,0 +1,79 @@
+name: CI
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ crosstool:
+ runs-on: ubuntu-latest
+ steps:
+ - name: "clone"
+ uses: actions/checkout@v2
+ - name: "prereq"
+ run: |
+ sudo apt-get install -y gperf help2man libtool-bin
+ - name: "build ct-ng"
+ run: |
+ ./bootstrap
+ ./configure --prefix=$PWD/.local/
+ make
+ make install
+ tar -cf ct-ng.tar .local/
+ - name: "upload ct-ng"
+ uses: actions/upload-artifact@v2
+ with:
+ name: crosstool
+ path: ct-ng.tar
+ - name: "upload config.log"
+ uses: actions/upload-artifact@v2
+ with:
+ name: config.log
+ path: config.log
+ if: ${{ always() }}
+
+ toolchains:
+ needs: crosstool
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ sample: [
+ "arm-unknown-linux-gnueabi",
+ "aarch64-unknown-linux-gnu",
+ "mips-unknown-elf",
+ "powerpc64-unknown-linux-gnu",
+ "powerpc-unknown-linux-gnu",
+ "x86_64-multilib-linux-uclibc"
+ ]
+ steps:
+ - name: "download ct-ng"
+ uses: actions/download-artifact@v2
+ with:
+ name: crosstool
+ - name: "extract ct-ng"
+ run: |
+ tar -xf ct-ng.tar
+ - name: "prereq"
+ run: |
+ sudo apt-get install -y gperf help2man libtool-bin
+ echo "::add-path::$GITHUB_WORKSPACE/.local/bin"
+ - name: "build ${{ matrix.sample }}"
+ run: |
+ mkdir -p src
+ ct-ng ${{ matrix.sample }}
+ sed -i -e '/CT_LOG_PROGRESS_BAR/s/y$/n/' .config
+ sed -i -e '/CT_LOCAL_TARBALLS_DIR/s/HOME/CT_TOP_DIR/' .config
+ sed -i -e '/CT_PREFIX_DIR/s/HOME/CT_TOP_DIR/' .config
+ sed -i -e '/CT_LOG_EXTRA/d' .config
+ sed -i -e '/CT_LOG_LEVEL_MAX/d' .config
+ echo 'CT_LOG_ALL=y' >>.config
+ echo 'CT_LOG_LEVEL_MAX="ALL"' >>.config
+ ct-ng build
+ - name: "upload log"
+ uses: actions/upload-artifact@v2
+ with:
+ name: "${{ matrix.sample }}.log"
+ path: |
+ build.log
+ .config
+ if: ${{ always() }}
diff --git a/bootstrap b/bootstrap
index 6c3d6ae..b4079a9 100755
--- a/bootstrap
+++ b/bootstrap
@@ -6,6 +6,9 @@ if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then
exit 1
fi
+# see #849
+unset CDPATH
+
########################################
# Common meta-language implementation. Syntax:
#
@@ -801,7 +804,7 @@ msg "*** Gathering the list of data files to install"
scripts/compile | scripts/missing | scripts/depcomp | scripts/ltmain.sh | scripts/install-sh)
continue
;;
- #
+ #
# will produce. FIXME: create this file at the time of 'ct-ng build'.
config/configure.in.in | config/configure.in)
continue
@@ -818,6 +821,6 @@ msg "*** Gathering the list of data files to install"
} > verbatim-data.mk
msg "*** Running autoreconf"
-autoreconf -Wall --force
+autoreconf -Wall --force -I m4
msg "*** Done!"
diff --git a/configure.ac b/configure.ac
index ae4a027..096ebb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -287,7 +287,7 @@ AC_FUNC_REALLOC
AC_FUNC_ALLOCA
AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.19.8])
+AM_GNU_GETTEXT_VERSION([0.19.7])
# For now, curses are needed to build kconfig. We may support a command-line
# only configuration without curses later. For now, fail in configure but
diff --git a/packages/binutils/2.23.2/0016-Fix-a-missing-include-of-string.patch b/packages/binutils/2.23.2/0016-Fix-a-missing-include-of-string.patch
new file mode 100644
index 0000000..b04033a
--- /dev/null
+++ b/packages/binutils/2.23.2/0016-Fix-a-missing-include-of-string.patch
@@ -0,0 +1,26 @@
+From 23272f9927dc95c0cf6f7c5aabcc0551eca572c5 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 7 Jun 2019 07:36:52 +0200
+Subject: [PATCH] Fix a missing include of <string>
+
+gold/ChangeLog:
+
+2019-06-07 Martin Liska <mliska@suse.cz>
+
+ * errors.h: Include string.
+---
+ gold/errors.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gold/errors.h b/gold/errors.h
+index 1e61c8dbb5..805b25fc9c 100644
+--- a/gold/errors.h
++++ b/gold/errors.h
+@@ -24,6 +24,7 @@
+ #define GOLD_ERRORS_H
+
+ #include <cstdarg>
++#include <string>
+
+ #include "gold-threads.h"
+
diff --git a/packages/binutils/2.24/0025-Fix-a-missing-include-of-string.patch b/packages/binutils/2.24/0025-Fix-a-missing-include-of-string.patch
new file mode 100644
index 0000000..b04033a
--- /dev/null
+++ b/packages/binutils/2.24/0025-Fix-a-missing-include-of-string.patch
@@ -0,0 +1,26 @@
+From 23272f9927dc95c0cf6f7c5aabcc0551eca572c5 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 7 Jun 2019 07:36:52 +0200
+Subject: [PATCH] Fix a missing include of <string>
+
+gold/ChangeLog:
+
+2019-06-07 Martin Liska <mliska@suse.cz>
+
+ * errors.h: Include string.
+---
+ gold/errors.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gold/errors.h b/gold/errors.h
+index 1e61c8dbb5..805b25fc9c 100644
+--- a/gold/errors.h
++++ b/gold/errors.h
+@@ -24,6 +24,7 @@
+ #define GOLD_ERRORS_H
+
+ #include <cstdarg>
++#include <string>
+
+ #include "gold-threads.h"
+
diff --git a/packages/binutils/2.25.1/0023-Fix-a-missing-include-of-string.patch b/packages/binutils/2.25.1/0023-Fix-a-missing-include-of-string.patch
new file mode 100644
index 0000000..b04033a
--- /dev/null
+++ b/packages/binutils/2.25.1/0023-Fix-a-missing-include-of-string.patch
@@ -0,0 +1,26 @@
+From 23272f9927dc95c0cf6f7c5aabcc0551eca572c5 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 7 Jun 2019 07:36:52 +0200
+Subject: [PATCH] Fix a missing include of <string>
+
+gold/ChangeLog:
+
+2019-06-07 Martin Liska <mliska@suse.cz>
+
+ * errors.h: Include string.
+---
+ gold/errors.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gold/errors.h b/gold/errors.h
+index 1e61c8dbb5..805b25fc9c 100644
+--- a/gold/errors.h
++++ b/gold/errors.h
+@@ -24,6 +24,7 @@
+ #define GOLD_ERRORS_H
+
+ #include <cstdarg>
++#include <string>
+
+ #include "gold-threads.h"
+
diff --git a/packages/binutils/2.26.1/0013-Fix-a-missing-include-of-string.patch b/packages/binutils/2.26.1/0013-Fix-a-missing-include-of-string.patch
new file mode 100644
index 0000000..b04033a
--- /dev/null
+++ b/packages/binutils/2.26.1/0013-Fix-a-missing-include-of-string.patch
@@ -0,0 +1,26 @@
+From 23272f9927dc95c0cf6f7c5aabcc0551eca572c5 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 7 Jun 2019 07:36:52 +0200
+Subject: [PATCH] Fix a missing include of <string>
+
+gold/ChangeLog:
+
+2019-06-07 Martin Liska <mliska@suse.cz>
+
+ * errors.h: Include string.
+---
+ gold/errors.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gold/errors.h b/gold/errors.h
+index 1e61c8dbb5..805b25fc9c 100644
+--- a/gold/errors.h
++++ b/gold/errors.h
+@@ -24,6 +24,7 @@
+ #define GOLD_ERRORS_H
+
+ #include <cstdarg>
++#include <string>
+
+ #include "gold-threads.h"
+
diff --git a/packages/binutils/2.27/0012-Fix-a-missing-include-of-string.patch b/packages/binutils/2.27/0012-Fix-a-missing-include-of-string.patch
new file mode 100644
index 0000000..b04033a
--- /dev/null
+++ b/packages/binutils/2.27/0012-Fix-a-missing-include-of-string.patch
@@ -0,0 +1,26 @@
+From 23272f9927dc95c0cf6f7c5aabcc0551eca572c5 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 7 Jun 2019 07:36:52 +0200
+Subject: [PATCH] Fix a missing include of <string>
+
+gold/ChangeLog:
+
+2019-06-07 Martin Liska <mliska@suse.cz>
+
+ * errors.h: Include string.
+---
+ gold/errors.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gold/errors.h b/gold/errors.h
+index 1e61c8dbb5..805b25fc9c 100644
+--- a/gold/errors.h
++++ b/gold/errors.h
+@@ -24,6 +24,7 @@
+ #define GOLD_ERRORS_H
+
+ #include <cstdarg>
++#include <string>
+
+ #include "gold-threads.h"
+
diff --git a/packages/binutils/2.28.1/0009-Fix-a-missing-include-of-string.patch b/packages/binutils/2.28.1/0009-Fix-a-missing-include-of-string.patch
new file mode 100644
index 0000000..b04033a
--- /dev/null
+++ b/packages/binutils/2.28.1/0009-Fix-a-missing-include-of-string.patch
@@ -0,0 +1,26 @@
+From 23272f9927dc95c0cf6f7c5aabcc0551eca572c5 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 7 Jun 2019 07:36:52 +0200
+Subject: [PATCH] Fix a missing include of <string>
+
+gold/ChangeLog:
+
+2019-06-07 Martin Liska <mliska@suse.cz>
+
+ * errors.h: Include string.
+---
+ gold/errors.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gold/errors.h b/gold/errors.h
+index 1e61c8dbb5..805b25fc9c 100644
+--- a/gold/errors.h
++++ b/gold/errors.h
+@@ -24,6 +24,7 @@
+ #define GOLD_ERRORS_H
+
+ #include <cstdarg>
++#include <string>
+
+ #include "gold-threads.h"
+
diff --git a/packages/binutils/2.29.1/0009-Fix-a-missing-include-of-string.patch b/packages/binutils/2.29.1/0009-Fix-a-missing-include-of-string.patch
new file mode 100644
index 0000000..b04033a
--- /dev/null
+++ b/packages/binutils/2.29.1/0009-Fix-a-missing-include-of-string.patch
@@ -0,0 +1,26 @@
+From 23272f9927dc95c0cf6f7c5aabcc0551eca572c5 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 7 Jun 2019 07:36:52 +0200
+Subject: [PATCH] Fix a missing include of <string>
+
+gold/ChangeLog:
+
+2019-06-07 Martin Liska <mliska@suse.cz>
+
+ * errors.h: Include string.
+---
+ gold/errors.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gold/errors.h b/gold/errors.h
+index 1e61c8dbb5..805b25fc9c 100644
+--- a/gold/errors.h
++++ b/gold/errors.h
+@@ -24,6 +24,7 @@
+ #define GOLD_ERRORS_H
+
+ #include <cstdarg>
++#include <string>
+
+ #include "gold-threads.h"
+
diff --git a/packages/binutils/2.30/0009-Fix-a-missing-include-of-string.patch b/packages/binutils/2.30/0009-Fix-a-missing-include-of-string.patch
new file mode 100644
index 0000000..b04033a
--- /dev/null
+++ b/packages/binutils/2.30/0009-Fix-a-missing-include-of-string.patch
@@ -0,0 +1,26 @@
+From 23272f9927dc95c0cf6f7c5aabcc0551eca572c5 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 7 Jun 2019 07:36:52 +0200
+Subject: [PATCH] Fix a missing include of <string>
+
+gold/ChangeLog:
+
+2019-06-07 Martin Liska <mliska@suse.cz>
+
+ * errors.h: Include string.
+---
+ gold/errors.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gold/errors.h b/gold/errors.h
+index 1e61c8dbb5..805b25fc9c 100644
+--- a/gold/errors.h
++++ b/gold/errors.h
+@@ -24,6 +24,7 @@
+ #define GOLD_ERRORS_H
+
+ #include <cstdarg>
++#include <string>
+
+ #include "gold-threads.h"
+
diff --git a/packages/binutils/2.31.1/0012-Fix-a-missing-include-of-string.patch b/packages/binutils/2.31.1/0012-Fix-a-missing-include-of-string.patch
new file mode 100644
index 0000000..b04033a
--- /dev/null
+++ b/packages/binutils/2.31.1/0012-Fix-a-missing-include-of-string.patch
@@ -0,0 +1,26 @@
+From 23272f9927dc95c0cf6f7c5aabcc0551eca572c5 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 7 Jun 2019 07:36:52 +0200
+Subject: [PATCH] Fix a missing include of <string>
+
+gold/ChangeLog:
+
+2019-06-07 Martin Liska <mliska@suse.cz>
+
+ * errors.h: Include string.
+---
+ gold/errors.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gold/errors.h b/gold/errors.h
+index 1e61c8dbb5..805b25fc9c 100644
+--- a/gold/errors.h
++++ b/gold/errors.h
+@@ -24,6 +24,7 @@
+ #define GOLD_ERRORS_H
+
+ #include <cstdarg>
++#include <string>
+
+ #include "gold-threads.h"
+
diff --git a/packages/binutils/2.32/0009-Fix-a-missing-include-of-string.patch b/packages/binutils/2.32/0009-Fix-a-missing-include-of-string.patch
new file mode 100644
index 0000000..b04033a
--- /dev/null
+++ b/packages/binutils/2.32/0009-Fix-a-missing-include-of-string.patch
@@ -0,0 +1,26 @@
+From 23272f9927dc95c0cf6f7c5aabcc0551eca572c5 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 7 Jun 2019 07:36:52 +0200
+Subject: [PATCH] Fix a missing include of <string>
+
+gold/ChangeLog:
+
+2019-06-07 Martin Liska <mliska@suse.cz>
+
+ * errors.h: Include string.
+---
+ gold/errors.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gold/errors.h b/gold/errors.h
+index 1e61c8dbb5..805b25fc9c 100644
+--- a/gold/errors.h
++++ b/gold/errors.h
+@@ -24,6 +24,7 @@
+ #define GOLD_ERRORS_H
+
+ #include <cstdarg>
++#include <string>
+
+ #include "gold-threads.h"
+
diff --git a/packages/binutils/2.35/0000-sh-conf.patch b/packages/binutils/2.35/0000-sh-conf.patch
new file mode 100644
index 0000000..06693ef
--- /dev/null
+++ b/packages/binutils/2.35/0000-sh-conf.patch
@@ -0,0 +1,34 @@
+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).
+
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/configure
++++ b/configure
+@@ -3937,7 +3937,7 @@ case "${target}" in
+ nvptx*-*-*)
+ noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
+ ;;
+- sh-*-*)
++ sh*-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
+--- a/configure.ac
++++ b/configure.ac
+@@ -1178,7 +1178,7 @@ case "${target}" in
+ nvptx*-*-*)
+ noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
+ ;;
+- sh-*-*)
++ sh*-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
diff --git a/packages/binutils/2.35/0001-ld_makefile_patch.patch b/packages/binutils/2.35/0001-ld_makefile_patch.patch
new file mode 100644
index 0000000..0eb9496
--- /dev/null
+++ b/packages/binutils/2.35/0001-ld_makefile_patch.patch
@@ -0,0 +1,27 @@
+---
+ ld/Makefile.am | 2 +-
+ ld/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/ld/Makefile.am
++++ b/ld/Makefile.am
+@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
+ # 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@
+--- a/ld/Makefile.in
++++ b/ld/Makefile.in
+@@ -555,7 +555,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
+ # 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.35/0002-check_ldrunpath_length.patch b/packages/binutils/2.35/0002-check_ldrunpath_length.patch
new file mode 100644
index 0000000..0edd2fe
--- /dev/null
+++ b/packages/binutils/2.35/0002-check_ldrunpath_length.patch
@@ -0,0 +1,24 @@
+---
+ ld/ldelf.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/ld/ldelf.c
++++ b/ld/ldelf.c
+@@ -1247,6 +1247,8 @@ ldelf_after_open (int use_libpath, int n
+ && command_line.rpath == NULL)
+ {
+ path = (const char *) getenv ("LD_RUN_PATH");
++ if (path && *path == '\0')
++ path = NULL;
+ if (path
+ && ldelf_search_needed (path, &n, force,
+ is_linux, elfsize))
+@@ -1605,6 +1607,8 @@ ldelf_before_allocation (char *audit, ch
+ 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.35/0003-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.35/0003-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
new file mode 100644
index 0000000..c712df5
--- /dev/null
+++ b/packages/binutils/2.35/0003-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
@@ -0,0 +1,15 @@
+---
+ gold/gold-threads.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/gold/gold-threads.cc
++++ b/gold/gold-threads.cc
+@@ -101,7 +101,7 @@ Lock_impl_threads::Lock_impl_threads()
+ 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.35/0004-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.35/0004-Dont-link-to-libfl-as-its-unnecessary.patch
new file mode 100644
index 0000000..02efa21
--- /dev/null
+++ b/packages/binutils/2.35/0004-Dont-link-to-libfl-as-its-unnecessary.patch
@@ -0,0 +1,105 @@
+---
+ binutils/configure | 3 +++
+ binutils/configure.ac | 3 +++
+ gas/configure | 3 +++
+ gas/configure.ac | 3 +++
+ ld/configure | 3 +++
+ ld/configure.ac | 3 +++
+ 6 files changed, 18 insertions(+)
+
+--- a/binutils/configure
++++ b/binutils/configure
+@@ -12570,6 +12570,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.
+@@ -12733,6 +12734,8 @@ esac
+ if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+ fi
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="bg ca da es fi fr hr id it ja pt ro ru rw sk sr sv tr uk vi zh_CN zh_TW"
+ # If we haven't got the data from the intl directory,
+--- a/binutils/configure.ac
++++ b/binutils/configure.ac
+@@ -95,7 +95,10 @@ if test -z "$host" ; then
+ fi
+
+ AC_PROG_YACC
++save_LIBS=$LIBS
+ AM_PROG_LEX
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="bg ca da es fi fr hr id it ja pt ro ru rw sk sr sv tr uk vi zh_CN zh_TW"
+ ZW_GNU_GETTEXT_SISTER_DIR
+--- a/gas/configure
++++ b/gas/configure
+@@ -13519,6 +13519,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.
+@@ -13682,6 +13683,8 @@ esac
+ if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+ fi
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="es fi fr id ja ru rw sv tr uk zh_CN"
+ # If we haven't got the data from the intl directory,
+--- a/gas/configure.ac
++++ b/gas/configure.ac
+@@ -924,7 +924,10 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${tar
+ AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])
+
+ AC_PROG_YACC
++save_LIBS=$LIBS
+ AM_PROG_LEX
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="es fi fr id ja ru rw sv tr uk zh_CN"
+ ZW_GNU_GETTEXT_SISTER_DIR
+--- a/ld/configure
++++ b/ld/configure
+@@ -16584,6 +16584,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.
+@@ -16747,6 +16748,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
+--- a/ld/configure.ac
++++ b/ld/configure.ac
+@@ -258,7 +258,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.35/0005-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.35/0005-Darwin-gold-binary-cc-include-string-not-cstring.patch
new file mode 100644
index 0000000..fbc4041
--- /dev/null
+++ b/packages/binutils/2.35/0005-Darwin-gold-binary-cc-include-string-not-cstring.patch
@@ -0,0 +1,15 @@
+---
+ gold/binary.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- 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.35/0006-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.35/0006-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
new file mode 100644
index 0000000..631d013
--- /dev/null
+++ b/packages/binutils/2.35/0006-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
@@ -0,0 +1,70 @@
+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
+---
+ bfd/peXXigen.c | 22 ++++++++++++++++++++++
+ gold/gold-threads.cc | 15 ++++++++++++---
+ 2 files changed, 34 insertions(+), 3 deletions(-)
+
+--- a/bfd/peXXigen.c
++++ b/bfd/peXXigen.c
+@@ -3696,6 +3696,28 @@ u16_mbtouc (wchar_t * puc, const unsigne
+ }
+ #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)
+--- a/gold/gold-threads.cc
++++ b/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*
diff --git a/packages/binutils/2.35/0007-sysroot.patch b/packages/binutils/2.35/0007-sysroot.patch
new file mode 100644
index 0000000..c98f147
--- /dev/null
+++ b/packages/binutils/2.35/0007-sysroot.patch
@@ -0,0 +1,41 @@
+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
+
+---
+ ld/ldfile.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+--- a/ld/ldfile.c
++++ b/ld/ldfile.c
+@@ -340,18 +340,25 @@ ldfile_open_file_search (const char *arc
+ 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.35/0008-poison-system-directories.patch b/packages/binutils/2.35/0008-poison-system-directories.patch
new file mode 100644
index 0000000..d836f8a
--- /dev/null
+++ b/packages/binutils/2.35/0008-poison-system-directories.patch
@@ -0,0 +1,279 @@
+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>
+
+---
+ ld/config.in | 3 +++
+ ld/configure | 14 ++++++++++++++
+ ld/configure.ac | 10 ++++++++++
+ ld/ld.h | 8 ++++++++
+ ld/ld.texi | 12 ++++++++++++
+ ld/ldfile.c | 17 +++++++++++++++++
+ ld/ldlex.h | 2 ++
+ ld/ldmain.c | 2 ++
+ ld/lexsup.c | 21 +++++++++++++++++++++
+ 9 files changed, 89 insertions(+)
+
+--- a/ld/config.in
++++ b/ld/config.in
+@@ -40,6 +40,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
+
+--- a/ld/configure
++++ b/ld/configure
+@@ -826,6 +826,7 @@ with_lib_path
+ enable_targets
+ enable_64_bit_bfd
+ with_sysroot
++enable_poison_system_directories
+ enable_gold
+ enable_got
+ enable_compressed_debug_sections
+@@ -1493,6 +1494,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)
+@@ -15814,7 +15817,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 :
+--- a/ld/configure.ac
++++ b/ld/configure.ac
+@@ -94,6 +94,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.
+--- a/ld/ld.h
++++ b/ld/ld.h
+@@ -161,6 +161,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. */
+--- a/ld/ld.texi
++++ b/ld/ld.texi
+@@ -2655,6 +2655,18 @@ string identifying the original linked f
+
+ 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
+--- a/ld/ldfile.c
++++ b/ld/ldfile.c
+@@ -117,6 +117,23 @@ ldfile_add_library_path (const char *nam
+ new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (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. */
+--- a/ld/ldlex.h
++++ b/ld/ldlex.h
+@@ -155,6 +155,8 @@ enum option_values
+ OPTION_NON_CONTIGUOUS_REGIONS,
+ OPTION_NON_CONTIGUOUS_REGIONS_WARNINGS,
+ OPTION_DEPENDENCY_FILE,
++ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
+ };
+
+ /* The initial parser states. */
+--- a/ld/ldmain.c
++++ b/ld/ldmain.c
+@@ -321,6 +321,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
+--- a/ld/lexsup.c
++++ b/ld/lexsup.c
+@@ -572,6 +572,14 @@ static const struct ld_option ld_options
+ { {"no-print-map-discarded", no_argument, NULL, OPTION_NO_PRINT_MAP_DISCARDED},
+ '\0', NULL, N_("Do not show discarded sections in map file output"),
+ 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)
+@@ -584,6 +592,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;
+@@ -1591,6 +1600,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),
+@@ -1681,6 +1698,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)
+ {
+ einfo (_("%P: missing --end-group; added as last command line option\n"));
diff --git a/packages/binutils/2.35/chksum b/packages/binutils/2.35/chksum
new file mode 100644
index 0000000..760af28
--- /dev/null
+++ b/packages/binutils/2.35/chksum
@@ -0,0 +1,12 @@
+md5 binutils-2.35.tar.xz fc8d55e2f6096de8ff8171173b6f5087
+sha1 binutils-2.35.tar.xz 6bdd090ce268b6d6c3442516021c4e4b5019e303
+sha256 binutils-2.35.tar.xz 1b11659fb49e20e18db460d44485f09442c8c56d5df165de9461eb09c8302f85
+sha512 binutils-2.35.tar.xz 9f222e4ab6720036402d03904fb11b73ab87714b85cd84997f7d357f405c7e10581d70202f9165a1ee0c70538632db27ecc9dfe627dddb1e6bc7edb1537cf786
+md5 binutils-2.35.tar.bz2 f5ee1b8aab816dce3badf8513be6dd75
+sha1 binutils-2.35.tar.bz2 148cd8a885276b89aee37ed35927ff3949eaaba8
+sha256 binutils-2.35.tar.bz2 7d24660f87093670738e58bcc7b7b06f121c0fcb0ca8fc44368d675a5ef9cff7
+sha512 binutils-2.35.tar.bz2 826c1fdac2dd7b2326c4fc5449a585cf0c1f979a98c6ee062bab5ebd6bc657e697c468fc3a4c3c5a7fa383a4902e8cacd27e1752707bbaf042b36b2653469947
+md5 binutils-2.35.tar.gz 63c597bd52f978d964028b7c3213d22e
+sha1 binutils-2.35.tar.gz b012655d1a4d0da45b280a292eb3782ea51cfceb
+sha256 binutils-2.35.tar.gz a3ac62bae4f339855b5449cfa9b49df90c635adbd67ecb8a0e7f3ae86a058da6
+sha512 binutils-2.35.tar.gz bf1b0da63fa0410d4a55d9ee8e4f8e40f2d001704a7ad8eeab61f289c9f85a61c33953a4c4a5c4250f9644f6b5423eb5103fb4e89790ce210242ae6f6e94c56b
diff --git a/packages/gcc/9.2.0/version.desc b/packages/binutils/2.35/version.desc
index e69de29..e69de29 100644
--- a/packages/gcc/9.2.0/version.desc
+++ b/packages/binutils/2.35/version.desc
diff --git a/packages/expat/package.desc b/packages/expat/package.desc
index 14c197d..84dba8f 100644
--- a/packages/expat/package.desc
+++ b/packages/expat/package.desc
@@ -1,6 +1,6 @@
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}'
+mirrors='http://downloads.sourceforge.net/project/expat/expat/${CT_EXPAT_VERSION} https://github.com/libexpat/libexpat/releases/download/R_${CT_EXPAT_VERSION//./_}'
archive_formats='.tar.xz .tar.lz .tar.bz2 .tar.gz'
relevantpattern='*.*|.'
diff --git a/packages/gcc/9.2.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/10.2.0/0000-libtool-leave-framework-alone.patch
index b5804ea..b5804ea 100644
--- a/packages/gcc/9.2.0/0000-libtool-leave-framework-alone.patch
+++ b/packages/gcc/10.2.0/0000-libtool-leave-framework-alone.patch
diff --git a/packages/gcc/9.2.0/0001-uclibc-conf.patch b/packages/gcc/10.2.0/0001-uclibc-conf.patch
index a9ae872..a9ae872 100644
--- a/packages/gcc/9.2.0/0001-uclibc-conf.patch
+++ b/packages/gcc/10.2.0/0001-uclibc-conf.patch
diff --git a/packages/gcc/10.2.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc/10.2.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
new file mode 100644
index 0000000..394dd49
--- /dev/null
+++ b/packages/gcc/10.2.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
@@ -0,0 +1,163 @@
+---
+ config/gcc-plugin.m4 | 18 +++++++++++++-----
+ gcc/configure | 22 +++++++++++++++-------
+ libcc1/configure | 22 +++++++++++++++-------
+ 3 files changed, 43 insertions(+), 19 deletions(-)
+
+--- a/config/gcc-plugin.m4
++++ b/config/gcc-plugin.m4
+@@ -21,6 +21,9 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
+ pluginlibs=
+ plugin_check=yes
+
++ PICFLAG="-fPIC"
++ UNDEFINEDPREAMBLE="extern int X;"
++ UNDEFINEDCODE="return X == 0;"
+ case "${host}" in
+ *-*-mingw*)
+ # Since plugin support under MinGW is not as straightforward as on
+@@ -43,6 +46,11 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
+ export_sym_check=
+ fi
+ ;;
++ *-*-mingw*|*-*-cygwin*|*-*-msys*)
++ PICFLAG=""
++ UNDEFINEDPREAMBLE=""
++ UNDEFINEDCODE=""
++ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+@@ -94,17 +102,17 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
+ 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
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -30375,6 +30375,9 @@ fi
+ pluginlibs=
+ plugin_check=yes
+
++ PICFLAG="-fPIC"
++ UNDEFINEDPREAMBLE="extern int X;"
++ UNDEFINEDCODE="return X == 0;"
+ case "${host}" in
+ *-*-mingw*)
+ # Since plugin support under MinGW is not as straightforward as on
+@@ -30397,6 +30400,11 @@ fi
+ export_sym_check=
+ fi
+ ;;
++ *-*-mingw*|*-*-cygwin*|*-*-msys*)
++ PICFLAG=""
++ UNDEFINEDPREAMBLE=""
++ UNDEFINEDCODE=""
++ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+@@ -30509,23 +30517,23 @@ fi
+ 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;
+ }
+--- a/libcc1/configure
++++ b/libcc1/configure
+@@ -14795,6 +14795,9 @@ fi
+ pluginlibs=
+ plugin_check=yes
+
++ PICFLAG="-fPIC"
++ UNDEFINEDPREAMBLE="extern int X;"
++ UNDEFINEDCODE="return X == 0;"
+ case "${host}" in
+ *-*-mingw*)
+ # Since plugin support under MinGW is not as straightforward as on
+@@ -14817,6 +14820,11 @@ fi
+ export_sym_check=
+ fi
+ ;;
++ *-*-mingw*|*-*-cygwin*|*-*-msys*)
++ PICFLAG=""
++ UNDEFINEDPREAMBLE=""
++ UNDEFINEDCODE=""
++ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+@@ -14929,23 +14937,23 @@ fi
+ 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/9.2.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/10.2.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch
index 3040e23..3040e23 100644
--- a/packages/gcc/9.2.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch
+++ b/packages/gcc/10.2.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch
diff --git a/packages/gcc/9.2.0/0004-arm-softfloat-libgcc.patch b/packages/gcc/10.2.0/0004-arm-softfloat-libgcc.patch
index d980036..d980036 100644
--- a/packages/gcc/9.2.0/0004-arm-softfloat-libgcc.patch
+++ b/packages/gcc/10.2.0/0004-arm-softfloat-libgcc.patch
diff --git a/packages/gcc/10.2.0/0005-fix-m68k-uclinux.patch b/packages/gcc/10.2.0/0005-fix-m68k-uclinux.patch
new file mode 100644
index 0000000..9d176d3
--- /dev/null
+++ b/packages/gcc/10.2.0/0005-fix-m68k-uclinux.patch
@@ -0,0 +1,21 @@
+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>
+
+---
+ libgcc/config.host | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -949,7 +949,7 @@ m68k*-*-netbsdelf*)
+ 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/10.2.0/0006-libgfortran-missing-include.patch b/packages/gcc/10.2.0/0006-libgfortran-missing-include.patch
new file mode 100644
index 0000000..866d2cc
--- /dev/null
+++ b/packages/gcc/10.2.0/0006-libgfortran-missing-include.patch
@@ -0,0 +1,14 @@
+---
+ libgfortran/io/close.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/libgfortran/io/close.c
++++ b/libgfortran/io/close.c
+@@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTI
+ #if !HAVE_UNLINK_OPEN_FILE
+ #include <string.h>
+ #endif
++#include <stdlib.h>
+
+ typedef enum
+ { CLOSE_INVALID = - 1, CLOSE_DELETE, CLOSE_KEEP, CLOSE_UNSPECIFIED }
diff --git a/packages/gcc/9.2.0/0007-nios2-bad-multilib-default.patch b/packages/gcc/10.2.0/0007-nios2-bad-multilib-default.patch
index 4acc491..4acc491 100644
--- a/packages/gcc/9.2.0/0007-nios2-bad-multilib-default.patch
+++ b/packages/gcc/10.2.0/0007-nios2-bad-multilib-default.patch
diff --git a/packages/gcc/9.2.0/0008-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/10.2.0/0008-libgcc-disable-split-stack-nothreads.patch
index df91a9f..df91a9f 100644
--- a/packages/gcc/9.2.0/0008-libgcc-disable-split-stack-nothreads.patch
+++ b/packages/gcc/10.2.0/0008-libgcc-disable-split-stack-nothreads.patch
diff --git a/packages/gcc/9.2.0/0009-bionic-ndk.patch b/packages/gcc/10.2.0/0009-bionic-ndk.patch
index 090172d..090172d 100644
--- a/packages/gcc/9.2.0/0009-bionic-ndk.patch
+++ b/packages/gcc/10.2.0/0009-bionic-ndk.patch
diff --git a/packages/gcc/10.2.0/0010-crystax.patch b/packages/gcc/10.2.0/0010-crystax.patch
new file mode 100644
index 0000000..98bd2fe
--- /dev/null
+++ b/packages/gcc/10.2.0/0010-crystax.patch
@@ -0,0 +1,529 @@
+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]
+---
+ gcc/config.gcc | 17 +++++++-
+ gcc/config/aarch64/aarch64-linux-android.h | 59 +++++++++++++++++++++++++++++
+ gcc/config/aarch64/aarch64-linux.h | 9 +++-
+ gcc/config/arm/arm.h | 3 -
+ gcc/config/arm/arm.md | 2
+ gcc/config/arm/arm.opt | 4 +
+ gcc/config/arm/elf.h | 9 ++--
+ gcc/config/arm/linux-eabi.h | 7 ++-
+ gcc/config/i386/gnu-user.h | 7 ++-
+ gcc/config/i386/gnu-user64.h | 5 ++
+ gcc/config/i386/linux-common.h | 8 +++
+ gcc/config/linux-android.h | 13 +++---
+ gcc/config/mips/android.h | 49 ++++++++++++++++++++++++
+ gcc/config/mips/gnu-user.h | 6 +-
+ gcc/config/mips/linux-common.h | 2
+ gcc/config/mips/t-linux-android | 3 +
+ gcc/config/mips/t-linux-android64 | 4 +
+ libgcc/gthr-posix.h | 13 ++++++
+ libstdc++-v3/configure | 12 +++++
+ libstdc++-v3/include/bits/locale_facets.h | 18 +++++++-
+ libstdc++-v3/libsupc++/guard.cc | 5 ++
+ 21 files changed, 235 insertions(+), 20 deletions(-)
+ create mode 100644 gcc/config/aarch64/aarch64-linux-android.h
+ create mode 100644 gcc/config/mips/android.h
+ create mode 100644 gcc/config/mips/t-linux-android
+ create mode 100644 gcc/config/mips/t-linux-android64
+
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1083,14 +1083,18 @@ aarch64*-*-netbsd*)
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ ;;
+ 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-errata.h aarch64/aarch64-linux.h"
++ extra_options="${extra_options} linux-android.opt"
+ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
+ tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
+ 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
+@@ -2501,6 +2505,17 @@ mips*-*-linux*) # Linux MIPS, either
+ 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
+ ;;
+--- /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 */
+--- 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"
+--- a/gcc/config/arm/arm.h
++++ b/gcc/config/arm/arm.h
+@@ -1974,12 +1974,13 @@ enum arm_auto_incmodes
+
+ #define CASE_VECTOR_PC_RELATIVE ((TARGET_THUMB2 \
+ || (TARGET_THUMB1 \
++ && !inline_thumb1_jump_table \
+ && (optimize_size || flag_pic))) \
+ && (!target_pure_code))
+
+
+ #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 \
+--- a/gcc/config/arm/arm.md
++++ b/gcc/config/arm/arm.md
+@@ -9342,7 +9342,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;
+--- a/gcc/config/arm/arm.opt
++++ b/gcc/config/arm/arm.opt
+@@ -202,6 +202,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.
+--- 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=auto: %{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
+@@ -95,7 +97,8 @@
+ 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_32BIT || (TARGET_THUMB && !inline_thumb1_jump_table \
++ && (optimize_size || flag_pic))) \
+ && !target_pure_code)
+
+ #ifndef LINK_SPEC
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -108,11 +108,16 @@
+ LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC " " \
+ FDPIC_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, \
+--- 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.
+ 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 %{msse2avx:%{!mavx:-msse2avx}}"
++ "--32 %{msse2avx:%{!mavx:-msse2avx}} " \
++ LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC)
+
+ #undef SUBTARGET_EXTRA_SPECS
+ #define SUBTARGET_EXTRA_SPECS \
+--- a/gcc/config/i386/gnu-user64.h
++++ b/gcc/config/i386/gnu-user64.h
+@@ -46,6 +46,11 @@ see the files COPYING3 and COPYING.RUNTI
+ #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} \
+--- a/gcc/config/i386/linux-common.h
++++ b/gcc/config/i386/linux-common.h
+@@ -36,7 +36,13 @@ along with GCC; see the file COPYING3.
+ #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 \
+--- a/gcc/config/linux-android.h
++++ b/gcc/config/linux-android.h
+@@ -44,15 +44,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}"
+--- /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
+--- 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.
+ /* 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.
+
+ #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
+ #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. */ \
+--- a/gcc/config/mips/linux-common.h
++++ b/gcc/config/mips/linux-common.h
+@@ -38,7 +38,7 @@ along with GCC; see the file COPYING3.
+ #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 \
+--- /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
+--- /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
+--- a/libgcc/gthr-posix.h
++++ b/libgcc/gthr-posix.h
+@@ -32,6 +32,19 @@ see the files COPYING3 and COPYING.RUNTI
+ #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)) \
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -74306,6 +74306,18 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
+ #include <sys/syscall.h>
+ #include <unistd.h>
+ int lk;
++#if !defined(SYS_gettid)
++#define SYS_gettid __NR_gettid
++#endif
++#if !defined(SYS_futex)
++#define SYS_futex __NR_futex
++#endif
++#if !defined(SYS_gettid)
++#define SYS_gettid __NR_gettid
++#endif
++#if !defined(SYS_futex)
++#define SYS_futex __NR_futex
++#endif
+ int
+ main ()
+ {
+--- 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
+@@ -1104,7 +1118,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
+ {
+ if (__builtin_expect(__hi != __lo, true))
+ __builtin_memcpy(__to, __lo, __hi - __lo);
+@@ -1167,7 +1181,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
+--- a/libstdc++-v3/libsupc++/guard.cc
++++ b/libstdc++-v3/libsupc++/guard.cc
+@@ -34,7 +34,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/9.2.0/0011-crystax.patch b/packages/gcc/10.2.0/0011-crystax.patch
index f1f9eb1..f1f9eb1 100644
--- a/packages/gcc/9.2.0/0011-crystax.patch
+++ b/packages/gcc/10.2.0/0011-crystax.patch
diff --git a/packages/gcc/10.2.0/0012-crystax.patch b/packages/gcc/10.2.0/0012-crystax.patch
new file mode 100644
index 0000000..e7476ba
--- /dev/null
+++ b/packages/gcc/10.2.0/0012-crystax.patch
@@ -0,0 +1,278 @@
+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>
+
+---
+ gcc/config.in | 6 +++++
+ gcc/config/alpha/elf.h | 4 +++
+ gcc/config/freebsd.h | 4 +++
+ gcc/config/gnu-user.h | 4 +++
+ gcc/config/openbsd.h | 4 +++
+ gcc/config/rs6000/sysv4.h | 6 ++++-
+ gcc/config/sol2.h | 4 +++
+ gcc/configure | 36 +++++++++++++++++++++++++++++++++
+ gcc/configure.ac | 29 ++++++++++++++++++++++++++
+ gcc/testsuite/g++.dg/eh/spec3-static.C | 25 ++++++++++++++++++++++
+ libgcc/crtstuff.c | 11 ++++++----
+ 11 files changed, 128 insertions(+), 5 deletions(-)
+
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -2266,6 +2266,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
+--- a/gcc/config/alpha/elf.h
++++ b/gcc/config/alpha/elf.h
+@@ -142,5 +142,9 @@ extern int alpha_this_gpdisp_sequence_nu
+ 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|static-pie:--eh-frame-hdr} "
+ #endif
++#endif
+--- a/gcc/config/freebsd.h
++++ b/gcc/config/freebsd.h
+@@ -45,8 +45,12 @@ along with GCC; see the file COPYING3.
+ #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|static-pie:--eh-frame-hdr} "
+ #endif
++#endif
+
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+--- a/gcc/config/gnu-user.h
++++ b/gcc/config/gnu-user.h
+@@ -106,8 +106,12 @@ see the files COPYING3 and COPYING.RUNTI
+ #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|static-pie:--eh-frame-hdr} "
+ #endif
++#endif
+
+ #define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \
+ "%{static|static-pie:--start-group} %G %{!nolibc:%L} \
+--- 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|static-pie:--eh-frame-hdr} "
+ #endif
++#endif
+
+ #undef LIB_SPEC
+ #define LIB_SPEC OBSD_LIB_SPEC
+--- a/gcc/config/sol2.h
++++ b/gcc/config/sol2.h
+@@ -434,7 +434,11 @@ along with GCC; see the file COPYING3.
+ /* 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|static-pie:--eh-frame-hdr} "
++#endif
+ #endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */
+ #endif
+
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -1000,6 +1000,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_libssp
+ enable_default_ssp
+@@ -1754,6 +1755,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-libssp enable linking against libssp
+@@ -28836,6 +28840,38 @@ if test x"$gcc_cv_ld_eh_frame_hdr" = xye
+
+ $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; }
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5371,6 +5371,35 @@ GCC_TARGET_TEMPLATE([HAVE_LD_EH_FRAME_HD
+ 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)
+
+--- /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) { }
++}
+--- 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/9.2.0/0013-crystax.patch b/packages/gcc/10.2.0/0013-crystax.patch
index ec5f5bd..4414940 100644
--- a/packages/gcc/9.2.0/0013-crystax.patch
+++ b/packages/gcc/10.2.0/0013-crystax.patch
@@ -12,7 +12,7 @@ Date: Thu Aug 20 19:11:07 2015 +0300
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
-@@ -15618,6 +15618,7 @@ legitimate_pic_address_disp_p (rtx disp)
+@@ -10344,6 +10344,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
diff --git a/packages/gcc/9.2.0/0014-crystax.patch b/packages/gcc/10.2.0/0014-crystax.patch
index 5acc6b9..5acc6b9 100644
--- a/packages/gcc/9.2.0/0014-crystax.patch
+++ b/packages/gcc/10.2.0/0014-crystax.patch
diff --git a/packages/gcc/9.2.0/0015-crystax.patch b/packages/gcc/10.2.0/0015-crystax.patch
index 2b51260..1a4f6b3 100644
--- a/packages/gcc/9.2.0/0015-crystax.patch
+++ b/packages/gcc/10.2.0/0015-crystax.patch
@@ -15,7 +15,7 @@ Date: Mon Apr 14 21:05:51 2014 -0700
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
-@@ -22781,9 +22781,13 @@ arm_print_operand (FILE *stream, rtx x,
+@@ -24077,9 +24077,13 @@ arm_print_operand (FILE *stream, rtx x,
memsize = MEM_SIZE (x);
/* Only certain alignment specifiers are supported by the hardware. */
diff --git a/packages/gcc/9.2.0/0016-crystax.patch b/packages/gcc/10.2.0/0016-crystax.patch
index 8c21a1c..8c21a1c 100644
--- a/packages/gcc/9.2.0/0016-crystax.patch
+++ b/packages/gcc/10.2.0/0016-crystax.patch
diff --git a/packages/gcc/9.2.0/0017-crystax.patch b/packages/gcc/10.2.0/0017-crystax.patch
index 1a46aed..1a46aed 100644
--- a/packages/gcc/9.2.0/0017-crystax.patch
+++ b/packages/gcc/10.2.0/0017-crystax.patch
diff --git a/packages/gcc/9.2.0/0018-isl-0.20.patch b/packages/gcc/10.2.0/0018-isl-0.20.patch
index de188b1..de188b1 100644
--- a/packages/gcc/9.2.0/0018-isl-0.20.patch
+++ b/packages/gcc/10.2.0/0018-isl-0.20.patch
diff --git a/packages/gcc/10.2.0/chksum b/packages/gcc/10.2.0/chksum
new file mode 100644
index 0000000..d79063b
--- /dev/null
+++ b/packages/gcc/10.2.0/chksum
@@ -0,0 +1,8 @@
+md5 gcc-10.2.0.tar.xz e9fd9b1789155ad09bcf3ae747596b50
+sha1 gcc-10.2.0.tar.xz 8de0aecd3a52bb92b43082df8a9256356d1f03be
+sha256 gcc-10.2.0.tar.xz b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c
+sha512 gcc-10.2.0.tar.xz 42ae38928bd2e8183af445da34220964eb690b675b1892bbeb7cd5bb62be499011ec9a93397dba5e2fb681afadfc6f2767d03b9035b44ba9be807187ae6dc65e
+md5 gcc-10.2.0.tar.gz 941a8674ea2eeb33f5c30ecf08124874
+sha1 gcc-10.2.0.tar.gz 4475b004e10cef904d7d605edd42af6ffffe4713
+sha256 gcc-10.2.0.tar.gz 27e879dccc639cd7b0cc08ed575c1669492579529b53c9ff27b0b96265fa867d
+sha512 gcc-10.2.0.tar.gz 5118865a85e70ba58702bb3615d3d9e44dcdbc725fdb71124da78dd412388c5fc367378771bf82fed4d6e2c62fde4c7c362ec1f8ddcae762a2af957f2d605520
diff --git a/packages/gcc/10.2.0/version.desc b/packages/gcc/10.2.0/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gcc/10.2.0/version.desc
diff --git a/packages/gcc/8.4.0/8.3.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/8.4.0/0000-libtool-leave-framework-alone.patch
index 1a86e41..1a86e41 100644
--- a/packages/gcc/8.4.0/8.3.0/0000-libtool-leave-framework-alone.patch
+++ b/packages/gcc/8.4.0/0000-libtool-leave-framework-alone.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0001-uclibc-conf.patch b/packages/gcc/8.4.0/0001-uclibc-conf.patch
index aef750a..aef750a 100644
--- a/packages/gcc/8.4.0/8.3.0/0001-uclibc-conf.patch
+++ b/packages/gcc/8.4.0/0001-uclibc-conf.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc/8.4.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index 20a88df..20a88df 100644
--- a/packages/gcc/8.4.0/8.3.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc/8.4.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/8.4.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch
index 5f9a07a..5f9a07a 100644
--- a/packages/gcc/8.4.0/8.3.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch
+++ b/packages/gcc/8.4.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0004-arm-softfloat-libgcc.patch b/packages/gcc/8.4.0/0004-arm-softfloat-libgcc.patch
index d980036..d980036 100644
--- a/packages/gcc/8.4.0/8.3.0/0004-arm-softfloat-libgcc.patch
+++ b/packages/gcc/8.4.0/0004-arm-softfloat-libgcc.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0005-fix-m68k-uclinux.patch b/packages/gcc/8.4.0/0005-fix-m68k-uclinux.patch
index 02b53bd..02b53bd 100644
--- a/packages/gcc/8.4.0/8.3.0/0005-fix-m68k-uclinux.patch
+++ b/packages/gcc/8.4.0/0005-fix-m68k-uclinux.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0006-libgfortran-missing-include.patch b/packages/gcc/8.4.0/0006-libgfortran-missing-include.patch
index 6e2e4e4..6e2e4e4 100644
--- a/packages/gcc/8.4.0/8.3.0/0006-libgfortran-missing-include.patch
+++ b/packages/gcc/8.4.0/0006-libgfortran-missing-include.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0007-nios2-bad-multilib-default.patch b/packages/gcc/8.4.0/0007-nios2-bad-multilib-default.patch
index 4acc491..4acc491 100644
--- a/packages/gcc/8.4.0/8.3.0/0007-nios2-bad-multilib-default.patch
+++ b/packages/gcc/8.4.0/0007-nios2-bad-multilib-default.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0008-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/8.4.0/0008-libgcc-disable-split-stack-nothreads.patch
index df91a9f..df91a9f 100644
--- a/packages/gcc/8.4.0/8.3.0/0008-libgcc-disable-split-stack-nothreads.patch
+++ b/packages/gcc/8.4.0/0008-libgcc-disable-split-stack-nothreads.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0009-bionic-ndk.patch b/packages/gcc/8.4.0/0009-bionic-ndk.patch
index 474dd8c..474dd8c 100644
--- a/packages/gcc/8.4.0/8.3.0/0009-bionic-ndk.patch
+++ b/packages/gcc/8.4.0/0009-bionic-ndk.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0010-crystax.patch b/packages/gcc/8.4.0/0010-crystax.patch
index 0e3e95c..0e3e95c 100644
--- a/packages/gcc/8.4.0/8.3.0/0010-crystax.patch
+++ b/packages/gcc/8.4.0/0010-crystax.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0011-crystax.patch b/packages/gcc/8.4.0/0011-crystax.patch
index f1f9eb1..f1f9eb1 100644
--- a/packages/gcc/8.4.0/8.3.0/0011-crystax.patch
+++ b/packages/gcc/8.4.0/0011-crystax.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0012-crystax.patch b/packages/gcc/8.4.0/0012-crystax.patch
index 2bf6cc7..2bf6cc7 100644
--- a/packages/gcc/8.4.0/8.3.0/0012-crystax.patch
+++ b/packages/gcc/8.4.0/0012-crystax.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0013-crystax.patch b/packages/gcc/8.4.0/0013-crystax.patch
index 3454df0..3454df0 100644
--- a/packages/gcc/8.4.0/8.3.0/0013-crystax.patch
+++ b/packages/gcc/8.4.0/0013-crystax.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0014-crystax.patch b/packages/gcc/8.4.0/0014-crystax.patch
index 8f2eb43..8f2eb43 100644
--- a/packages/gcc/8.4.0/8.3.0/0014-crystax.patch
+++ b/packages/gcc/8.4.0/0014-crystax.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0015-crystax.patch b/packages/gcc/8.4.0/0015-crystax.patch
index 2424d2b..2424d2b 100644
--- a/packages/gcc/8.4.0/8.3.0/0015-crystax.patch
+++ b/packages/gcc/8.4.0/0015-crystax.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0016-crystax.patch b/packages/gcc/8.4.0/0016-crystax.patch
index 8c21a1c..8c21a1c 100644
--- a/packages/gcc/8.4.0/8.3.0/0016-crystax.patch
+++ b/packages/gcc/8.4.0/0016-crystax.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0017-crystax.patch b/packages/gcc/8.4.0/0017-crystax.patch
index ccb81fd..ccb81fd 100644
--- a/packages/gcc/8.4.0/8.3.0/0017-crystax.patch
+++ b/packages/gcc/8.4.0/0017-crystax.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0018-ARC-Add-multilib-support-for-linux-targets.patch b/packages/gcc/8.4.0/0018-ARC-Add-multilib-support-for-linux-targets.patch
index 6c0ff27..6c0ff27 100644
--- a/packages/gcc/8.4.0/8.3.0/0018-ARC-Add-multilib-support-for-linux-targets.patch
+++ b/packages/gcc/8.4.0/0018-ARC-Add-multilib-support-for-linux-targets.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0019-isl-0.20.patch b/packages/gcc/8.4.0/0019-isl-0.20.patch
index 3e14966..3e14966 100644
--- a/packages/gcc/8.4.0/8.3.0/0019-isl-0.20.patch
+++ b/packages/gcc/8.4.0/0019-isl-0.20.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0020-ARM-fix-cmse.patch b/packages/gcc/8.4.0/0020-ARM-fix-cmse.patch
index cf2d243..cf2d243 100644
--- a/packages/gcc/8.4.0/8.3.0/0020-ARM-fix-cmse.patch
+++ b/packages/gcc/8.4.0/0020-ARM-fix-cmse.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0021-arm-Make-arm_cmse.h-C99-compatible.patch b/packages/gcc/8.4.0/0021-arm-Make-arm_cmse.h-C99-compatible.patch
index afdc1a5..afdc1a5 100644
--- a/packages/gcc/8.4.0/8.3.0/0021-arm-Make-arm_cmse.h-C99-compatible.patch
+++ b/packages/gcc/8.4.0/0021-arm-Make-arm_cmse.h-C99-compatible.patch
diff --git a/packages/gcc/8.4.0/8.3.0/0022-ARC-Update-fma-expansions.patch b/packages/gcc/8.4.0/0022-ARC-Update-fma-expansions.patch
index c2680d5..c2680d5 100644
--- a/packages/gcc/8.4.0/8.3.0/0022-ARC-Update-fma-expansions.patch
+++ b/packages/gcc/8.4.0/0022-ARC-Update-fma-expansions.patch
diff --git a/packages/gcc/9.2.0/chksum b/packages/gcc/9.2.0/chksum
deleted file mode 100644
index 2ece552..0000000
--- a/packages/gcc/9.2.0/chksum
+++ /dev/null
@@ -1,8 +0,0 @@
-md5 gcc-9.2.0.tar.xz 3818ad8600447f05349098232c2ddc78
-sha1 gcc-9.2.0.tar.xz 306d27c3465fa36862c206738d06d65fff5c3645
-sha256 gcc-9.2.0.tar.xz ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
-sha512 gcc-9.2.0.tar.xz a12dff52af876aee0fd89a8d09cdc455f35ec46845e154023202392adc164848faf8ee881b59b681b696e27c69fd143a214014db4214db62f9891a1c8365c040
-md5 gcc-9.2.0.tar.gz e03739b042a14376d727ddcfd05a9bc3
-sha1 gcc-9.2.0.tar.gz 256be3760f6aca3eaa45083e25828ce0802e2010
-sha256 gcc-9.2.0.tar.gz a931a750d6feadacbeecb321d73925cd5ebb6dfa7eff0802984af3aef63759f4
-sha512 gcc-9.2.0.tar.gz 55fead9cac2374b18134c17a143fc9317f67be834589303d31a7c3a6878e6bef22a0590fda902a07cb60f802df035e67975a8ab6a641048e0baa89af439a46ca
diff --git a/packages/gcc/9.3.0/0000-libtool-leave-framework-alone.patch b/packages/gcc/9.3.0/0000-libtool-leave-framework-alone.patch
new file mode 100644
index 0000000..b5804ea
--- /dev/null
+++ b/packages/gcc/9.3.0/0000-libtool-leave-framework-alone.patch
@@ -0,0 +1,18 @@
+---
+ libtool-ldflags | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/libtool-ldflags
++++ b/libtool-ldflags
+@@ -36,6 +36,11 @@ prev_arg=
+ 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/9.3.0/0001-uclibc-conf.patch b/packages/gcc/9.3.0/0001-uclibc-conf.patch
new file mode 100644
index 0000000..a9ae872
--- /dev/null
+++ b/packages/gcc/9.3.0/0001-uclibc-conf.patch
@@ -0,0 +1,17 @@
+---
+ contrib/regression/objs-gcc.sh | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/contrib/regression/objs-gcc.sh
++++ b/contrib/regression/objs-gcc.sh
+@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++ make all-gdb all-dejagnu all-ld || exit 1
++ make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+ make bootstrap || exit 1
+ make install || exit 1
diff --git a/packages/gcc/9.2.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc/9.3.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index e755998..18fe931 100644
--- a/packages/gcc/9.2.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc/9.3.0/0002-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
@@ -53,7 +53,7 @@
if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
--- a/gcc/configure
+++ b/gcc/configure
-@@ -29858,6 +29858,9 @@ fi
+@@ -29862,6 +29862,9 @@ fi
pluginlibs=
plugin_check=yes
@@ -63,7 +63,7 @@
case "${host}" in
*-*-mingw*)
# Since plugin support under MinGW is not as straightforward as on
-@@ -29880,6 +29883,11 @@ fi
+@@ -29884,6 +29887,11 @@ fi
export_sym_check=
fi
;;
@@ -75,7 +75,7 @@
*)
if test x$build = x$host; then
export_sym_check="objdump${exeext} -T"
-@@ -29992,23 +30000,23 @@ fi
+@@ -29996,23 +30004,23 @@ fi
case "${host}" in
*-*-darwin*)
CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
diff --git a/packages/gcc/9.3.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/9.3.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch
new file mode 100644
index 0000000..3040e23
--- /dev/null
+++ b/packages/gcc/9.3.0/0003-gcc-plugin-POSIX-include-sys-select-h.patch
@@ -0,0 +1,14 @@
+---
+ libcc1/connection.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/libcc1/connection.cc
++++ b/libcc1/connection.cc
+@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3.
+ #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/9.3.0/0004-arm-softfloat-libgcc.patch b/packages/gcc/9.3.0/0004-arm-softfloat-libgcc.patch
new file mode 100644
index 0000000..d980036
--- /dev/null
+++ b/packages/gcc/9.3.0/0004-arm-softfloat-libgcc.patch
@@ -0,0 +1,31 @@
+---
+ gcc/config/arm/linux-elf.h | 2 +-
+ libgcc/config/arm/t-linux | 7 ++++++-
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+--- a/gcc/config/arm/linux-elf.h
++++ b/gcc/config/arm/linux-elf.h
+@@ -58,7 +58,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"
+
+--- 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/9.2.0/0005-fix-m68k-uclinux.patch b/packages/gcc/9.3.0/0005-fix-m68k-uclinux.patch
index 62bea0e..62bea0e 100644
--- a/packages/gcc/9.2.0/0005-fix-m68k-uclinux.patch
+++ b/packages/gcc/9.3.0/0005-fix-m68k-uclinux.patch
diff --git a/packages/gcc/9.2.0/0006-libgfortran-missing-include.patch b/packages/gcc/9.3.0/0006-libgfortran-missing-include.patch
index f93524b..f93524b 100644
--- a/packages/gcc/9.2.0/0006-libgfortran-missing-include.patch
+++ b/packages/gcc/9.3.0/0006-libgfortran-missing-include.patch
diff --git a/packages/gcc/9.3.0/0007-nios2-bad-multilib-default.patch b/packages/gcc/9.3.0/0007-nios2-bad-multilib-default.patch
new file mode 100644
index 0000000..4acc491
--- /dev/null
+++ b/packages/gcc/9.3.0/0007-nios2-bad-multilib-default.patch
@@ -0,0 +1,31 @@
+---
+ gcc/config/nios2/nios2.h | 4 ++--
+ gcc/config/nios2/t-nios2 | 3 +--
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+--- a/gcc/config/nios2/nios2.h
++++ b/gcc/config/nios2/nios2.h
+@@ -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 \
+--- a/gcc/config/nios2/t-nios2
++++ b/gcc/config/nios2/t-nios2
+@@ -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/9.3.0/0008-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/9.3.0/0008-libgcc-disable-split-stack-nothreads.patch
new file mode 100644
index 0000000..df91a9f
--- /dev/null
+++ b/packages/gcc/9.3.0/0008-libgcc-disable-split-stack-nothreads.patch
@@ -0,0 +1,17 @@
+disable split-stack for non-thread builds
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+---
+ libgcc/config/t-stack | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/libgcc/config/t-stack
++++ b/libgcc/config/t-stack
+@@ -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/9.3.0/0009-bionic-ndk.patch b/packages/gcc/9.3.0/0009-bionic-ndk.patch
new file mode 100644
index 0000000..090172d
--- /dev/null
+++ b/packages/gcc/9.3.0/0009-bionic-ndk.patch
@@ -0,0 +1,60 @@
+commit d38d37bdfe24b7ce1bdcb55642fb6b904718e68f
+Author: Howard Chu <hyc@symas.com>
+Date: Tue Apr 25 19:02:18 2017 -0700
+
+ Fix ctype for newer NDK headers
+
+---
+ libstdc++-v3/config/os/bionic/ctype_base.h | 34 +++++++++++++++++++----------
+ 1 file changed, 23 insertions(+), 11 deletions(-)
+
+--- 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/9.2.0/0010-crystax.patch b/packages/gcc/9.3.0/0010-crystax.patch
index 9d66c74..8ac327a 100644
--- a/packages/gcc/9.2.0/0010-crystax.patch
+++ b/packages/gcc/9.3.0/0010-crystax.patch
@@ -157,12 +157,14 @@ Date: Wed Jul 29 11:28:29 2015 +0300
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
-@@ -1856,10 +1856,11 @@ enum arm_auto_incmodes
+@@ -1856,12 +1856,13 @@ enum arm_auto_incmodes
+
+ #define CASE_VECTOR_PC_RELATIVE ((TARGET_THUMB2 \
+ || (TARGET_THUMB1 \
++ && !inline_thumb1_jump_table \
+ && (optimize_size || flag_pic))) \
+ && (!target_pure_code))
- #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 \
@@ -172,7 +174,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
: min >= -256 && max < 256 \
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
-@@ -8894,7 +8894,7 @@
+@@ -8920,7 +8920,7 @@
(match_operand:SI 2 "const_int_operand" "") ; total range
(match_operand:SI 3 "" "") ; table label
(match_operand:SI 4 "" "")] ; Out of range label
@@ -450,7 +452,7 @@ Date: Wed Jul 29 11:28:29 2015 +0300
#if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
-@@ -78742,6 +78742,18 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
+@@ -78982,6 +78982,18 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
/* end confdefs.h. */
#include <sys/syscall.h>
int lk;
diff --git a/packages/gcc/9.3.0/0011-crystax.patch b/packages/gcc/9.3.0/0011-crystax.patch
new file mode 100644
index 0000000..f1f9eb1
--- /dev/null
+++ b/packages/gcc/9.3.0/0011-crystax.patch
@@ -0,0 +1,27 @@
+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>
+
+---
+ gcc/config/arm/t-linux-androideabi | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- 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/9.2.0/0012-crystax.patch b/packages/gcc/9.3.0/0012-crystax.patch
index 7edf128..1363d29 100644
--- a/packages/gcc/9.2.0/0012-crystax.patch
+++ b/packages/gcc/9.3.0/0012-crystax.patch
@@ -112,7 +112,7 @@ Date: Mon Apr 14 15:59:47 2014 -0700
--- a/gcc/configure
+++ b/gcc/configure
-@@ -985,6 +985,7 @@ enable_fix_cortex_a53_835769
+@@ -986,6 +986,7 @@ enable_fix_cortex_a53_835769
enable_fix_cortex_a53_843419
with_glibc_version
enable_gnu_unique_object
@@ -120,7 +120,7 @@ Date: Mon Apr 14 15:59:47 2014 -0700
enable_linker_build_id
enable_libssp
enable_default_ssp
-@@ -1736,6 +1737,9 @@ Optional Features:
+@@ -1737,6 +1738,9 @@ Optional Features:
--enable-gnu-unique-object
enable the use of the @gnu_unique_object ELF
extension on glibc systems
@@ -130,7 +130,7 @@ Date: Mon Apr 14 15:59:47 2014 -0700
--enable-linker-build-id
compiler will always pass --build-id to linker
--enable-libssp enable linking against libssp
-@@ -28348,6 +28352,38 @@ if test x"$gcc_cv_ld_eh_frame_hdr" = xye
+@@ -28349,6 +28353,38 @@ if test x"$gcc_cv_ld_eh_frame_hdr" = xye
$as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h
diff --git a/packages/gcc/9.3.0/0013-crystax.patch b/packages/gcc/9.3.0/0013-crystax.patch
new file mode 100644
index 0000000..e7fdd6e
--- /dev/null
+++ b/packages/gcc/9.3.0/0013-crystax.patch
@@ -0,0 +1,22 @@
+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>
+
+---
+ gcc/config/i386/i386.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/gcc/config/i386/i386.c
++++ b/gcc/config/i386/i386.c
+@@ -15635,6 +15635,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/9.3.0/0014-crystax.patch b/packages/gcc/9.3.0/0014-crystax.patch
new file mode 100644
index 0000000..5acc6b9
--- /dev/null
+++ b/packages/gcc/9.3.0/0014-crystax.patch
@@ -0,0 +1,26 @@
+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>
+
+---
+ libgcc/gthr.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/libgcc/gthr.h
++++ b/libgcc/gthr.h
+@@ -145,7 +145,11 @@ see the files COPYING3 and COPYING.RUNTI
+ #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/9.3.0/0015-crystax.patch b/packages/gcc/9.3.0/0015-crystax.patch
new file mode 100644
index 0000000..a0bad24
--- /dev/null
+++ b/packages/gcc/9.3.0/0015-crystax.patch
@@ -0,0 +1,33 @@
+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>
+
+---
+ gcc/config/arm/arm.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/gcc/config/arm/arm.c
++++ b/gcc/config/arm/arm.c
+@@ -22862,9 +22862,13 @@ arm_print_operand (FILE *stream, rtx x,
+ 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/9.3.0/0016-crystax.patch b/packages/gcc/9.3.0/0016-crystax.patch
new file mode 100644
index 0000000..8c21a1c
--- /dev/null
+++ b/packages/gcc/9.3.0/0016-crystax.patch
@@ -0,0 +1,23 @@
+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>
+
+---
+ gcc/config/i386/pmm_malloc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- 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/9.3.0/0017-crystax.patch b/packages/gcc/9.3.0/0017-crystax.patch
new file mode 100644
index 0000000..1a46aed
--- /dev/null
+++ b/packages/gcc/9.3.0/0017-crystax.patch
@@ -0,0 +1,34 @@
+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>
+
+---
+ gcc/config/aarch64/aarch64-linux-android.h | 4 ++++
+ gcc/config/mips/linux-common.h | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+--- a/gcc/config/aarch64/aarch64-linux-android.h
++++ b/gcc/config/aarch64/aarch64-linux-android.h
+@@ -56,4 +56,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 */
+--- a/gcc/config/mips/linux-common.h
++++ b/gcc/config/mips/linux-common.h
+@@ -65,3 +65,7 @@ along with GCC; see the file COPYING3.
+
+ /* 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/9.3.0/0018-isl-0.20.patch b/packages/gcc/9.3.0/0018-isl-0.20.patch
new file mode 100644
index 0000000..de188b1
--- /dev/null
+++ b/packages/gcc/9.3.0/0018-isl-0.20.patch
@@ -0,0 +1,26 @@
+commit 9fabe086c9f5c3896297f7f35491d785ba6f49a0
+Author: Alexey Neyman <stilor@att.net>
+Date: Mon Sep 24 22:50:11 2018 -0700
+
+ Fix build with ISL 0.20
+
+ * gcc/graphite.h: Include <isl/id.h> and <isl/space.h>; these
+ headers are no longer pulled in by <isl/val.h>.
+
+ Signed-off-by: Alexey Neyman <stilor@att.net>
+
+---
+ gcc/graphite.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/gcc/graphite.h
++++ b/gcc/graphite.h
+@@ -26,6 +26,8 @@ along with GCC; see the file COPYING3.
+ #include <isl/options.h>
+ #include <isl/ctx.h>
+ #include <isl/val.h>
++#include <isl/id.h>
++#include <isl/space.h>
+ #include <isl/set.h>
+ #include <isl/union_set.h>
+ #include <isl/map.h>
diff --git a/packages/gcc/9.3.0/chksum b/packages/gcc/9.3.0/chksum
new file mode 100644
index 0000000..a573c29
--- /dev/null
+++ b/packages/gcc/9.3.0/chksum
@@ -0,0 +1,8 @@
+md5 gcc-9.3.0.tar.xz d00a144b771ddeb021b61aa205b7e345
+sha1 gcc-9.3.0.tar.xz b746688bf045a316fc92c3528138ad10d0822b6b
+sha256 gcc-9.3.0.tar.xz 71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1
+sha512 gcc-9.3.0.tar.xz 4b9e3639eef6e623747a22c37a904b4750c93b6da77cf3958d5047e9b5ebddb7eebe091cc16ca0a227c0ecbd2bf3b984b221130f269a97ee4cc18f9cf6c444de
+md5 gcc-9.3.0.tar.gz 9b7e8f6cfad96114e726c752935af58a
+sha1 gcc-9.3.0.tar.gz d93d8950229b23d7e7c5cd0037fb4a51e3ce3a19
+sha256 gcc-9.3.0.tar.gz 5258a9b6afe9463c2e56b9e8355b1a4bee125ca828b8078f910303bc2ef91fa6
+sha512 gcc-9.3.0.tar.gz 3e9b865354a4306b33b1dd90b58c230120d668b3e26bd4369967e84ff00adbbfb822a0ade340fdd248dbd07bcf326b262060873339bfc5b4c3773ad1be88ab33
diff --git a/packages/gcc/9.3.0/version.desc b/packages/gcc/9.3.0/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/gcc/9.3.0/version.desc
diff --git a/packages/gdb/8.2.1/0005-musl-aarch64-sigcontext.patch b/packages/gdb/8.2.1/0005-musl-aarch64-sigcontext.patch
new file mode 100644
index 0000000..9456dbb
--- /dev/null
+++ b/packages/gdb/8.2.1/0005-musl-aarch64-sigcontext.patch
@@ -0,0 +1,17 @@
+---
+ gdb/nat/aarch64-sve-linux-ptrace.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdb/nat/aarch64-sve-linux-ptrace.h b/gdb/nat/aarch64-sve-linux-ptrace.h
+index 029e753ffe..172ae39432 100644
+--- a/gdb/nat/aarch64-sve-linux-ptrace.h
++++ b/gdb/nat/aarch64-sve-linux-ptrace.h
+@@ -20,7 +20,7 @@
+ #ifndef AARCH64_SVE_LINUX_PTRACE_H
+ #define AARCH64_SVE_LINUX_PTRACE_H
+
+-#include <asm/sigcontext.h>
++#include <signal.h>
+ #include <sys/utsname.h>
+ #include <sys/ptrace.h>
+ #include <asm/ptrace.h>
diff --git a/packages/glibc/2.12.1/0044-new-tools.patch b/packages/glibc/2.12.1/0044-new-tools.patch
index 2ff427e..cfa03b0 100644
--- a/packages/glibc/2.12.1/0044-new-tools.patch
+++ b/packages/glibc/2.12.1/0044-new-tools.patch
@@ -10,7 +10,7 @@
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 3.4* | 4.[0-9]* )
-+ 3.4* | [4-9].* )
++ 3.4* | [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;;
@@ -48,7 +48,7 @@
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].* ],
++ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* | [1-9][0-9].* ],
critic_missing="$critic_missing gcc")
AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
[GNU Make[^0-9]*\([0-9][0-9.]*\)],
diff --git a/packages/glibc/2.12.2/0007-new-tools.patch b/packages/glibc/2.12.2/0007-new-tools.patch
index 816a01c..693c9a1 100644
--- a/packages/glibc/2.12.2/0007-new-tools.patch
+++ b/packages/glibc/2.12.2/0007-new-tools.patch
@@ -10,7 +10,7 @@
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 3.4* | 4.[0-9]* )
-+ 3.4* | [4-9].* )
++ 3.4* | [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;;
@@ -48,7 +48,7 @@
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].* ],
++ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* | [1-9][0-9].* ],
critic_missing="$critic_missing gcc")
AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
[GNU Make[^0-9]*\([0-9][0-9.]*\)],
diff --git a/packages/glibc/2.13/0043-new-tools.patch b/packages/glibc/2.13/0043-new-tools.patch
index 4408ffe..9f71001 100644
--- a/packages/glibc/2.13/0043-new-tools.patch
+++ b/packages/glibc/2.13/0043-new-tools.patch
@@ -10,7 +10,7 @@
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 3.4* | 4.[0-9]* )
-+ 3.4* | [4-9].* )
++ 3.4* | [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;;
@@ -48,7 +48,7 @@
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].* ],
++ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* | [1-9][0-9].* ],
critic_missing="$critic_missing gcc")
AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
[GNU Make[^0-9]*\([0-9][0-9.]*\)],
diff --git a/packages/glibc/2.14.1/0043-new-tools.patch b/packages/glibc/2.14.1/0043-new-tools.patch
index 2d89a0f..38dcdc8 100644
--- a/packages/glibc/2.14.1/0043-new-tools.patch
+++ b/packages/glibc/2.14.1/0043-new-tools.patch
@@ -10,7 +10,7 @@
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 3.4* | 4.[0-9]* )
-+ 3.4* | [4-9].* )
++ 3.4* | [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;;
@@ -48,7 +48,7 @@
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].* ],
++ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* | [1-9][0-9].* ],
critic_missing="$critic_missing gcc")
AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
[GNU Make[^0-9]*\([0-9][0-9.]*\)],
diff --git a/packages/glibc/2.15/0044-new-tools.patch b/packages/glibc/2.15/0044-new-tools.patch
index 5cd3398..d08d873 100644
--- a/packages/glibc/2.15/0044-new-tools.patch
+++ b/packages/glibc/2.15/0044-new-tools.patch
@@ -10,7 +10,7 @@
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 3.4* | 4.[0-9]* )
-+ 3.4* | [4-9].* )
++ 3.4* | [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;;
@@ -48,7 +48,7 @@
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].* ],
++ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* | [1-9][0-9].* ],
critic_missing="$critic_missing gcc")
AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
[GNU Make[^0-9]*\([0-9][0-9.]*\)],
diff --git a/packages/glibc/2.16.0/0042-fix-GCC-10-detection.patch b/packages/glibc/2.16.0/0042-fix-GCC-10-detection.patch
new file mode 100644
index 0000000..4d55ff3
--- /dev/null
+++ b/packages/glibc/2.16.0/0042-fix-GCC-10-detection.patch
@@ -0,0 +1,25 @@
+From 01e89232ac76b66e2bba2ec84d7f86e86f04ae64 Mon Sep 17 00:00:00 2001
+From: Jakub Labenski <kuba@parasoft.com>
+Date: Fri, 5 Jun 2020 09:11:40 +0200
+Subject: [PATCH] Fix GCC 10+ detection
+
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index aa7869ff17..2a513eae65 100755
+--- a/configure
++++ b/configure
+@@ -4782,7 +4782,7 @@ $as_echo_n "checking version of $CC... " >&6; }
+ 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;;
+- 4.[3-9].* | 4.[1-9][0-9].* | [5-9].* )
++ 4.[3-9].* | 4.[1-9][0-9].* | [5-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;;
+
+--
+2.25.1
+
diff --git a/packages/glibc/2.17/0018-fix-GCC-10-detection.patch b/packages/glibc/2.17/0018-fix-GCC-10-detection.patch
new file mode 100644
index 0000000..b522ae7
--- /dev/null
+++ b/packages/glibc/2.17/0018-fix-GCC-10-detection.patch
@@ -0,0 +1,25 @@
+From 760445cabb52d131b88fd81a1c1385f6b6eb1bec Mon Sep 17 00:00:00 2001
+From: Jakub Labenski <kuba@parasoft.com>
+Date: Fri, 5 Jun 2020 09:11:40 +0200
+Subject: [PATCH] Fix GCC 10+ detection
+
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 8799b7de78..0f99f04bfc 100755
+--- a/configure
++++ b/configure
+@@ -4909,7 +4909,7 @@ $as_echo_n "checking version of $CC... " >&6; }
+ 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;;
+- 4.[3-9].* | 4.[1-9][0-9].* | [5-9].* )
++ 4.[3-9].* | 4.[1-9][0-9].* | [5-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;;
+
+--
+2.25.1
+
diff --git a/packages/glibc/2.18/0019-fix-GCC-10-detection.patch b/packages/glibc/2.18/0019-fix-GCC-10-detection.patch
new file mode 100644
index 0000000..32f4a17
--- /dev/null
+++ b/packages/glibc/2.18/0019-fix-GCC-10-detection.patch
@@ -0,0 +1,25 @@
+From 3b16131609b2edbf29194532c089079a8d2664b1 Mon Sep 17 00:00:00 2001
+From: Jakub Labenski <kuba@parasoft.com>
+Date: Fri, 5 Jun 2020 09:11:40 +0200
+Subject: [PATCH] Fix GCC 10+ detection
+
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 1ee4c42003..4e1d1fa8a0 100755
+--- a/configure
++++ b/configure
+@@ -4709,7 +4709,7 @@ $as_echo_n "checking version of $CC... " >&6; }
+ 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;;
+- 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* )
++ 4.[4-9].* | 4.[1-9][0-9].* | [5-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;;
+
+--
+2.25.1
+
diff --git a/packages/glibc/2.19/0017-Fix-cmpli-usage-in-power6-memset.patch b/packages/glibc/2.19/0017-Fix-cmpli-usage-in-power6-memset.patch
new file mode 100644
index 0000000..5213378
--- /dev/null
+++ b/packages/glibc/2.19/0017-Fix-cmpli-usage-in-power6-memset.patch
@@ -0,0 +1,49 @@
+Author: Joseph Myers <joseph@codesourcery.com>
+Date: 2016-10-24
+
+Building glibc for powerpc64 with recent (2.27.51.20161012) binutils,
+with multi-arch enabled, I get the error:
+
+../sysdeps/powerpc/powerpc64/power6/memset.S: Assembler messages:
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (5 is not between 0 and 1)
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (128 is not between 0 and 31)
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: missing operand
+
+Indeed, cmpli is documented as a four-operand instruction, and looking
+at nearby code it seems likely cmpldi was intended. This patch fixes
+this powerpc64 code accordingly, and makes a corresponding change to
+the powerpc32 code.
+
+Note: this patch is not tested beyond verifying that the powerpc64
+code builds where it failed to build before the patch. In particular,
+I have not done execution testing (the systems I usually use for
+testing powerpc are pre-power6 so wouldn't use this code) or tested
+the powerpc32 change.
+
+---
+ sysdeps/powerpc/powerpc32/power6/memset.S (memset): Use cmplwi instead of cmpli.
+ sysdeps/powerpc/powerpc64/power6/memset.S (memset): Use cmpldi instead of cmpli.
+
+--- a/sysdeps/powerpc/powerpc32/power6/memset.S
++++ b/sysdeps/powerpc/powerpc32/power6/memset.S
+@@ -394,7 +394,7 @@ L(cacheAlignedx):
+ /* A simple loop for the longer (>640 bytes) lengths. This form limits
+ the branch miss-predicted to exactly 1 at loop exit.*/
+ L(cacheAligned512):
+- cmpli cr1,rLEN,128
++ cmplwi cr1,rLEN,128
+ blt cr1,L(cacheAligned1)
+ dcbz 0,rMEMP
+ addi rLEN,rLEN,-128
+
+--- a/sysdeps/powerpc/powerpc64/power6/memset.S
++++ b/sysdeps/powerpc/powerpc64/power6/memset.S
+@@ -251,7 +251,7 @@ L(cacheAlignedx):
+ /* A simple loop for the longer (>640 bytes) lengths. This form limits
+ the branch miss-predicted to exactly 1 at loop exit.*/
+ L(cacheAligned512):
+- cmpli cr1,rLEN,128
++ cmpldi cr1,rLEN,128
+ blt cr1,L(cacheAligned1)
+ dcbz 0,rMEMP
+ addi rLEN,rLEN,-128
diff --git a/packages/glibc/2.19/0017-fix-GCC-10-detection.patch b/packages/glibc/2.19/0017-fix-GCC-10-detection.patch
new file mode 100644
index 0000000..1fe4ee8
--- /dev/null
+++ b/packages/glibc/2.19/0017-fix-GCC-10-detection.patch
@@ -0,0 +1,25 @@
+From 0db03b80d05d059c2f98cc9fc28cce90095d0876 Mon Sep 17 00:00:00 2001
+From: Jakub Labenski <kuba@parasoft.com>
+Date: Fri, 5 Jun 2020 09:11:40 +0200
+Subject: [PATCH] Fix GCC 10+ detection
+
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index fc023d0c70..b201f71b4b 100755
+--- a/configure
++++ b/configure
+@@ -4710,7 +4710,7 @@ $as_echo_n "checking version of $CC... " >&6; }
+ 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;;
+- 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* )
++ 4.[4-9].* | 4.[1-9][0-9].* | [5-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;;
+
+--
+2.25.1
+
diff --git a/packages/glibc/2.20/0017-Fix-cmpli-usage-in-power6-memset.patch b/packages/glibc/2.20/0017-Fix-cmpli-usage-in-power6-memset.patch
new file mode 100644
index 0000000..5213378
--- /dev/null
+++ b/packages/glibc/2.20/0017-Fix-cmpli-usage-in-power6-memset.patch
@@ -0,0 +1,49 @@
+Author: Joseph Myers <joseph@codesourcery.com>
+Date: 2016-10-24
+
+Building glibc for powerpc64 with recent (2.27.51.20161012) binutils,
+with multi-arch enabled, I get the error:
+
+../sysdeps/powerpc/powerpc64/power6/memset.S: Assembler messages:
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (5 is not between 0 and 1)
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (128 is not between 0 and 31)
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: missing operand
+
+Indeed, cmpli is documented as a four-operand instruction, and looking
+at nearby code it seems likely cmpldi was intended. This patch fixes
+this powerpc64 code accordingly, and makes a corresponding change to
+the powerpc32 code.
+
+Note: this patch is not tested beyond verifying that the powerpc64
+code builds where it failed to build before the patch. In particular,
+I have not done execution testing (the systems I usually use for
+testing powerpc are pre-power6 so wouldn't use this code) or tested
+the powerpc32 change.
+
+---
+ sysdeps/powerpc/powerpc32/power6/memset.S (memset): Use cmplwi instead of cmpli.
+ sysdeps/powerpc/powerpc64/power6/memset.S (memset): Use cmpldi instead of cmpli.
+
+--- a/sysdeps/powerpc/powerpc32/power6/memset.S
++++ b/sysdeps/powerpc/powerpc32/power6/memset.S
+@@ -394,7 +394,7 @@ L(cacheAlignedx):
+ /* A simple loop for the longer (>640 bytes) lengths. This form limits
+ the branch miss-predicted to exactly 1 at loop exit.*/
+ L(cacheAligned512):
+- cmpli cr1,rLEN,128
++ cmplwi cr1,rLEN,128
+ blt cr1,L(cacheAligned1)
+ dcbz 0,rMEMP
+ addi rLEN,rLEN,-128
+
+--- a/sysdeps/powerpc/powerpc64/power6/memset.S
++++ b/sysdeps/powerpc/powerpc64/power6/memset.S
+@@ -251,7 +251,7 @@ L(cacheAlignedx):
+ /* A simple loop for the longer (>640 bytes) lengths. This form limits
+ the branch miss-predicted to exactly 1 at loop exit.*/
+ L(cacheAligned512):
+- cmpli cr1,rLEN,128
++ cmpldi cr1,rLEN,128
+ blt cr1,L(cacheAligned1)
+ dcbz 0,rMEMP
+ addi rLEN,rLEN,-128
diff --git a/packages/glibc/2.20/0017-fix-GCC-10-detection.patch b/packages/glibc/2.20/0017-fix-GCC-10-detection.patch
new file mode 100644
index 0000000..c2afc77
--- /dev/null
+++ b/packages/glibc/2.20/0017-fix-GCC-10-detection.patch
@@ -0,0 +1,25 @@
+From 0991846fc6d5d0ef3800391bd29f2759780a3041 Mon Sep 17 00:00:00 2001
+From: Jakub Labenski <kuba@parasoft.com>
+Date: Fri, 5 Jun 2020 09:11:40 +0200
+Subject: [PATCH] Fix GCC 10+ detection
+
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 86ba30774b..b22ad9cb07 100755
+--- a/configure
++++ b/configure
+@@ -4661,7 +4661,7 @@ $as_echo_n "checking version of $CC... " >&6; }
+ 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;;
+- 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* )
++ 4.[4-9].* | 4.[1-9][0-9].* | [5-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;;
+
+--
+2.25.1
+
diff --git a/packages/glibc/2.21/0017-Fix-cmpli-usage-in-power6-memset.patch b/packages/glibc/2.21/0017-Fix-cmpli-usage-in-power6-memset.patch
new file mode 100644
index 0000000..5213378
--- /dev/null
+++ b/packages/glibc/2.21/0017-Fix-cmpli-usage-in-power6-memset.patch
@@ -0,0 +1,49 @@
+Author: Joseph Myers <joseph@codesourcery.com>
+Date: 2016-10-24
+
+Building glibc for powerpc64 with recent (2.27.51.20161012) binutils,
+with multi-arch enabled, I get the error:
+
+../sysdeps/powerpc/powerpc64/power6/memset.S: Assembler messages:
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (5 is not between 0 and 1)
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (128 is not between 0 and 31)
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: missing operand
+
+Indeed, cmpli is documented as a four-operand instruction, and looking
+at nearby code it seems likely cmpldi was intended. This patch fixes
+this powerpc64 code accordingly, and makes a corresponding change to
+the powerpc32 code.
+
+Note: this patch is not tested beyond verifying that the powerpc64
+code builds where it failed to build before the patch. In particular,
+I have not done execution testing (the systems I usually use for
+testing powerpc are pre-power6 so wouldn't use this code) or tested
+the powerpc32 change.
+
+---
+ sysdeps/powerpc/powerpc32/power6/memset.S (memset): Use cmplwi instead of cmpli.
+ sysdeps/powerpc/powerpc64/power6/memset.S (memset): Use cmpldi instead of cmpli.
+
+--- a/sysdeps/powerpc/powerpc32/power6/memset.S
++++ b/sysdeps/powerpc/powerpc32/power6/memset.S
+@@ -394,7 +394,7 @@ L(cacheAlignedx):
+ /* A simple loop for the longer (>640 bytes) lengths. This form limits
+ the branch miss-predicted to exactly 1 at loop exit.*/
+ L(cacheAligned512):
+- cmpli cr1,rLEN,128
++ cmplwi cr1,rLEN,128
+ blt cr1,L(cacheAligned1)
+ dcbz 0,rMEMP
+ addi rLEN,rLEN,-128
+
+--- a/sysdeps/powerpc/powerpc64/power6/memset.S
++++ b/sysdeps/powerpc/powerpc64/power6/memset.S
+@@ -251,7 +251,7 @@ L(cacheAlignedx):
+ /* A simple loop for the longer (>640 bytes) lengths. This form limits
+ the branch miss-predicted to exactly 1 at loop exit.*/
+ L(cacheAligned512):
+- cmpli cr1,rLEN,128
++ cmpldi cr1,rLEN,128
+ blt cr1,L(cacheAligned1)
+ dcbz 0,rMEMP
+ addi rLEN,rLEN,-128
diff --git a/packages/glibc/2.22/0017-Fix-cmpli-usage-in-power6-memset.patch b/packages/glibc/2.22/0017-Fix-cmpli-usage-in-power6-memset.patch
new file mode 100644
index 0000000..5213378
--- /dev/null
+++ b/packages/glibc/2.22/0017-Fix-cmpli-usage-in-power6-memset.patch
@@ -0,0 +1,49 @@
+Author: Joseph Myers <joseph@codesourcery.com>
+Date: 2016-10-24
+
+Building glibc for powerpc64 with recent (2.27.51.20161012) binutils,
+with multi-arch enabled, I get the error:
+
+../sysdeps/powerpc/powerpc64/power6/memset.S: Assembler messages:
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (5 is not between 0 and 1)
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (128 is not between 0 and 31)
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: missing operand
+
+Indeed, cmpli is documented as a four-operand instruction, and looking
+at nearby code it seems likely cmpldi was intended. This patch fixes
+this powerpc64 code accordingly, and makes a corresponding change to
+the powerpc32 code.
+
+Note: this patch is not tested beyond verifying that the powerpc64
+code builds where it failed to build before the patch. In particular,
+I have not done execution testing (the systems I usually use for
+testing powerpc are pre-power6 so wouldn't use this code) or tested
+the powerpc32 change.
+
+---
+ sysdeps/powerpc/powerpc32/power6/memset.S (memset): Use cmplwi instead of cmpli.
+ sysdeps/powerpc/powerpc64/power6/memset.S (memset): Use cmpldi instead of cmpli.
+
+--- a/sysdeps/powerpc/powerpc32/power6/memset.S
++++ b/sysdeps/powerpc/powerpc32/power6/memset.S
+@@ -394,7 +394,7 @@ L(cacheAlignedx):
+ /* A simple loop for the longer (>640 bytes) lengths. This form limits
+ the branch miss-predicted to exactly 1 at loop exit.*/
+ L(cacheAligned512):
+- cmpli cr1,rLEN,128
++ cmplwi cr1,rLEN,128
+ blt cr1,L(cacheAligned1)
+ dcbz 0,rMEMP
+ addi rLEN,rLEN,-128
+
+--- a/sysdeps/powerpc/powerpc64/power6/memset.S
++++ b/sysdeps/powerpc/powerpc64/power6/memset.S
+@@ -251,7 +251,7 @@ L(cacheAlignedx):
+ /* A simple loop for the longer (>640 bytes) lengths. This form limits
+ the branch miss-predicted to exactly 1 at loop exit.*/
+ L(cacheAligned512):
+- cmpli cr1,rLEN,128
++ cmpldi cr1,rLEN,128
+ blt cr1,L(cacheAligned1)
+ dcbz 0,rMEMP
+ addi rLEN,rLEN,-128
diff --git a/packages/glibc/2.23/0013-Fix-cmpli-usage-in-power6-memset.patch b/packages/glibc/2.23/0013-Fix-cmpli-usage-in-power6-memset.patch
new file mode 100644
index 0000000..5213378
--- /dev/null
+++ b/packages/glibc/2.23/0013-Fix-cmpli-usage-in-power6-memset.patch
@@ -0,0 +1,49 @@
+Author: Joseph Myers <joseph@codesourcery.com>
+Date: 2016-10-24
+
+Building glibc for powerpc64 with recent (2.27.51.20161012) binutils,
+with multi-arch enabled, I get the error:
+
+../sysdeps/powerpc/powerpc64/power6/memset.S: Assembler messages:
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (5 is not between 0 and 1)
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: operand out of range (128 is not between 0 and 31)
+../sysdeps/powerpc/powerpc64/power6/memset.S:254: Error: missing operand
+
+Indeed, cmpli is documented as a four-operand instruction, and looking
+at nearby code it seems likely cmpldi was intended. This patch fixes
+this powerpc64 code accordingly, and makes a corresponding change to
+the powerpc32 code.
+
+Note: this patch is not tested beyond verifying that the powerpc64
+code builds where it failed to build before the patch. In particular,
+I have not done execution testing (the systems I usually use for
+testing powerpc are pre-power6 so wouldn't use this code) or tested
+the powerpc32 change.
+
+---
+ sysdeps/powerpc/powerpc32/power6/memset.S (memset): Use cmplwi instead of cmpli.
+ sysdeps/powerpc/powerpc64/power6/memset.S (memset): Use cmpldi instead of cmpli.
+
+--- a/sysdeps/powerpc/powerpc32/power6/memset.S
++++ b/sysdeps/powerpc/powerpc32/power6/memset.S
+@@ -394,7 +394,7 @@ L(cacheAlignedx):
+ /* A simple loop for the longer (>640 bytes) lengths. This form limits
+ the branch miss-predicted to exactly 1 at loop exit.*/
+ L(cacheAligned512):
+- cmpli cr1,rLEN,128
++ cmplwi cr1,rLEN,128
+ blt cr1,L(cacheAligned1)
+ dcbz 0,rMEMP
+ addi rLEN,rLEN,-128
+
+--- a/sysdeps/powerpc/powerpc64/power6/memset.S
++++ b/sysdeps/powerpc/powerpc64/power6/memset.S
+@@ -251,7 +251,7 @@ L(cacheAlignedx):
+ /* A simple loop for the longer (>640 bytes) lengths. This form limits
+ the branch miss-predicted to exactly 1 at loop exit.*/
+ L(cacheAligned512):
+- cmpli cr1,rLEN,128
++ cmpldi cr1,rLEN,128
+ blt cr1,L(cacheAligned1)
+ dcbz 0,rMEMP
+ addi rLEN,rLEN,-128
diff --git a/packages/glibc/2.27/0001-Fix-build-with-GCC-10-when-long-double-double.patch b/packages/glibc/2.27/0001-Fix-build-with-GCC-10-when-long-double-double.patch
new file mode 100644
index 0000000..ca0d8a7
--- /dev/null
+++ b/packages/glibc/2.27/0001-Fix-build-with-GCC-10-when-long-double-double.patch
@@ -0,0 +1,166 @@
+From 49348beafe9ba150c9bd48595b3f372299bddbb0 Mon Sep 17 00:00:00 2001
+From: Joseph Myers <joseph@codesourcery.com>
+Date: Tue, 17 Mar 2020 22:57:42 +0000
+Subject: [PATCH] Fix build with GCC 10 when long double = double.
+
+On platforms where long double has the same ABI as double, glibc
+defines long double functions as aliases for the corresponding double
+functions. The declarations of those functions in <math.h> are
+disabled to avoid problems with aliases having incompatible types, but
+GCC 10 now gives errors for incompatible types when the long double
+function is known to GCC as a built-in function, not just when there
+is an incompatible header declaration.
+
+This patch fixes those errors by using appropriate
+-fno-builtin-<function> options to compile the double functions. The
+list of CFLAGS-* settings is an appropriately adapted version of that
+in sysdeps/ieee754/ldbl-opt/Makefile used there for building nldbl-*.c
+files; in particular, the options are used even if GCC does not
+currently have a built-in function of a given function, so that adding
+such a built-in function in future will not break the glibc build.
+Thus, various of the CFLAGS-* settings are only for future-proofing
+and may not currently be needed (and it's possible some could be
+irrelevant for other reasons).
+
+Tested with build-many-glibcs.py for arm-linux-gnueabi (compilers and
+glibcs builds), where it fixes the build that previously failed.
+---
+ math/Makefile | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 122 insertions(+)
+
+diff --git a/math/Makefile b/math/Makefile
+index 84a8b94c74..0a5a40430e 100644
+--- a/math/Makefile
++++ b/math/Makefile
+@@ -650,6 +650,128 @@ ifneq ($(long-double-fcts),yes)
+ # We won't compile the `long double' code at all. Tell the `double' code
+ # to define aliases for the `FUNCl' names.
+ math-CPPFLAGS += -DNO_LONG_DOUBLE
++# GCC 10 diagnoses aliases with types conflicting with built-in
++# functions.
++CFLAGS-w_acos.c += -fno-builtin-acosl
++CFLAGS-w_acosh.c += -fno-builtin-acoshl
++CFLAGS-w_asin.c += -fno-builtin-asinl
++CFLAGS-s_asinh.c += -fno-builtin-asinhl
++CFLAGS-s_atan.c += -fno-builtin-atanl
++CFLAGS-w_atan2.c += -fno-builtin-atan2l
++CFLAGS-w_atanh.c += -fno-builtin-atanhl
++CFLAGS-s_cabs.c += -fno-builtin-cabsl
++CFLAGS-s_cacos.c += -fno-builtin-cacosl
++CFLAGS-s_cacosh.c += -fno-builtin-cacoshl
++CFLAGS-s_canonicalize.c += -fno-builtin-canonicalizel
++CFLAGS-s_carg.c += -fno-builtin-cargl
++CFLAGS-s_casin.c += -fno-builtin-casinl
++CFLAGS-s_casinh.c += -fno-builtin-casinhl
++CFLAGS-s_catan.c += -fno-builtin-catanl
++CFLAGS-s_catanh.c += -fno-builtin-catanhl
++CFLAGS-s_cbrt.c += -fno-builtin-cbrtl
++CFLAGS-s_ccos.c += -fno-builtin-ccosl
++CFLAGS-s_ccosh.c += -fno-builtin-ccoshl
++CFLAGS-s_ceil.c += -fno-builtin-ceill
++CFLAGS-s_cexp.c += -fno-builtin-cexpl
++CFLAGS-s_cimag.c += -fno-builtin-cimagl
++CFLAGS-s_clog.c += -fno-builtin-clogl
++CFLAGS-s_clog10.c += -fno-builtin-clog10l
++CFLAGS-s_conj.c += -fno-builtin-conjl
++CFLAGS-s_copysign.c += -fno-builtin-copysignl
++CFLAGS-s_cos.c += -fno-builtin-cosl
++CFLAGS-w_cosh.c += -fno-builtin-coshl
++CFLAGS-s_cpow.c += -fno-builtin-cpowl
++CFLAGS-s_cproj.c += -fno-builtin-cprojl
++CFLAGS-s_creal.c += -fno-builtin-creall
++CFLAGS-s_csin.c += -fno-builtin-csinl
++CFLAGS-s_csinh.c += -fno-builtin-csinhl
++CFLAGS-s_csqrt.c += -fno-builtin-csqrtl
++CFLAGS-s_ctan.c += -fno-builtin-ctanl
++CFLAGS-s_ctanh.c += -fno-builtin-ctanhl
++CFLAGS-s_dadd.c += -fno-builtin-daddl
++CFLAGS-s_ddiv.c += -fno-builtin-ddivl
++CFLAGS-s_dmul.c += -fno-builtin-dmull
++CFLAGS-s_dsub.c += -fno-builtin-dsubl
++CFLAGS-s_erf.c += -fno-builtin-erfl
++CFLAGS-s_erfc.c += -fno-builtin-erfcl
++CFLAGS-e_exp.c += -fno-builtin-expl
++CFLAGS-w_exp10.c += -fno-builtin-exp10l
++CFLAGS-e_exp2.c += -fno-builtin-exp2l
++CFLAGS-s_expm1.c += -fno-builtin-expm1l
++CFLAGS-s_fabs.c += -fno-builtin-fabsl
++CFLAGS-s_fadd.c += -fno-builtin-faddl
++CFLAGS-s_fdim.c += -fno-builtin-fdiml
++CFLAGS-s_fdiv.c += -fno-builtin-fdivl
++CFLAGS-s_finite.c += -fno-builtin-finitel
++CFLAGS-s_floor.c += -fno-builtin-floorl
++CFLAGS-s_fma.c += -fno-builtin-fmal
++CFLAGS-s_fmax.c += -fno-builtin-fmaxl
++CFLAGS-s_fmaxmag.c += -fno-builtin-fmaxmagl
++CFLAGS-s_fmin.c += -fno-builtin-fminl
++CFLAGS-s_fminmag.c += -fno-builtin-fminmagl
++CFLAGS-w_fmod.c += -fno-builtin-fmodl
++CFLAGS-s_fmul.c += -fno-builtin-fmull
++CFLAGS-s_frexp.c += -fno-builtin-frexpl
++CFLAGS-s_fromfp.c += -fno-builtin-fromfpl
++CFLAGS-s_fromfpx.c += -fno-builtin-fromfpxl
++CFLAGS-s_fsub.c += -fno-builtin-fsubl
++CFLAGS-s_gamma.c += -fno-builtin-gammal
++CFLAGS-s_getpayload.c += -fno-builtin-getpayloadl
++CFLAGS-w_hypot.c += -fno-builtin-hypotl
++CFLAGS-w_ilogb.c += -fno-builtin-ilogbl
++CFLAGS-s_isinf.c += -fno-builtin-isinfl
++CFLAGS-s_isnan.c += -fno-builtin-isnanl
++CFLAGS-w_j0.c += -fno-builtin-j0l
++CFLAGS-w_j1.c += -fno-builtin-j1l
++CFLAGS-w_jn.c += -fno-builtin-jnl
++CFLAGS-s_ldexp.c += -fno-builtin-ldexpl
++CFLAGS-w_lgamma.c += -fno-builtin-lgammal
++CFLAGS-w_lgamma_r.c += -fno-builtin-lgammal_r
++CFLAGS-w_llogb.c += -fno-builtin-llogbl
++CFLAGS-s_llrint.c += -fno-builtin-llrintl
++CFLAGS-s_llround.c += -fno-builtin-llroundl
++CFLAGS-e_log.c += -fno-builtin-logl
++CFLAGS-w_log10.c += -fno-builtin-log10l
++CFLAGS-w_log1p.c += -fno-builtin-log1pl
++CFLAGS-e_log2.c += -fno-builtin-log2l
++CFLAGS-s_logb.c += -fno-builtin-logbl
++CFLAGS-s_lrint.c += -fno-builtin-lrintl
++CFLAGS-s_lround.c += -fno-builtin-lroundl
++CFLAGS-s_modf.c += -fno-builtin-modfl
++CFLAGS-s_nan.c += -fno-builtin-nanl
++CFLAGS-s_nearbyint.c += -fno-builtin-nearbyintl
++CFLAGS-s_nextafter.c += -fno-builtin-nextafterl
++CFLAGS-s_nextdown.c += -fno-builtin-nextdownl
++CFLAGS-s_nexttoward.c += -fno-builtin-nexttoward -fno-builtin-nexttowardl
++CFLAGS-s_nexttowardf.c += -fno-builtin-nexttowardf
++CFLAGS-s_nextup.c += -fno-builtin-nextupl
++CFLAGS-e_pow.c += -fno-builtin-powl
++CFLAGS-w_remainder.c += -fno-builtin-remainderl -fno-builtin-dreml
++CFLAGS-s_remquo.c += -fno-builtin-remquol
++CFLAGS-s_rint.c += -fno-builtin-rintl
++CFLAGS-s_round.c += -fno-builtin-roundl
++CFLAGS-s_roundeven.c += -fno-builtin-roundevenl
++CFLAGS-w_scalb.c += -fno-builtin-scalbl
++CFLAGS-w_scalbln.c += -fno-builtin-scalblnl
++CFLAGS-s_scalbn.c += -fno-builtin-scalbnl
++CFLAGS-s_setpayload.c += -fno-builtin-setpayloadl
++CFLAGS-s_setpayloadsig.c += -fno-builtin-setpayloadsigl
++CFLAGS-s_significand.c += -fno-builtin-significandl
++CFLAGS-s_sin.c += -fno-builtin-sinl
++CFLAGS-s_sincos.c += -fno-builtin-sincosl
++CFLAGS-w_sinh.c += -fno-builtin-sinhl
++CFLAGS-w_sqrt.c += -fno-builtin-sqrtl
++CFLAGS-s_tan.c += -fno-builtin-tanl
++CFLAGS-s_tanh.c += -fno-builtin-tanhl
++CFLAGS-w_tgamma.c += -fno-builtin-tgammal
++CFLAGS-s_totalorder.c += -fno-builtin-totalorderl
++CFLAGS-s_totalordermag.c += -fno-builtin-totalordermagl
++CFLAGS-s_trunc.c += -fno-builtin-truncl
++CFLAGS-s_ufromfp.c += -fno-builtin-ufromfpl
++CFLAGS-s_ufromfpx.c += -fno-builtin-ufromfpxl
++CFLAGS-s_y0.c += -fno-builtin-y0l
++CFLAGS-s_y1.c += -fno-builtin-y1l
++CFLAGS-s_yn.c += -fno-builtin-ynl
+ endif
+
+ # These files quiet sNaNs in a way that is optimized away without
+--
+2.25.1
+
diff --git a/packages/glibc/2.28/0002-Fix-build-with-GCC-10-when-long-double-double.patch b/packages/glibc/2.28/0002-Fix-build-with-GCC-10-when-long-double-double.patch
new file mode 100644
index 0000000..ca0d8a7
--- /dev/null
+++ b/packages/glibc/2.28/0002-Fix-build-with-GCC-10-when-long-double-double.patch
@@ -0,0 +1,166 @@
+From 49348beafe9ba150c9bd48595b3f372299bddbb0 Mon Sep 17 00:00:00 2001
+From: Joseph Myers <joseph@codesourcery.com>
+Date: Tue, 17 Mar 2020 22:57:42 +0000
+Subject: [PATCH] Fix build with GCC 10 when long double = double.
+
+On platforms where long double has the same ABI as double, glibc
+defines long double functions as aliases for the corresponding double
+functions. The declarations of those functions in <math.h> are
+disabled to avoid problems with aliases having incompatible types, but
+GCC 10 now gives errors for incompatible types when the long double
+function is known to GCC as a built-in function, not just when there
+is an incompatible header declaration.
+
+This patch fixes those errors by using appropriate
+-fno-builtin-<function> options to compile the double functions. The
+list of CFLAGS-* settings is an appropriately adapted version of that
+in sysdeps/ieee754/ldbl-opt/Makefile used there for building nldbl-*.c
+files; in particular, the options are used even if GCC does not
+currently have a built-in function of a given function, so that adding
+such a built-in function in future will not break the glibc build.
+Thus, various of the CFLAGS-* settings are only for future-proofing
+and may not currently be needed (and it's possible some could be
+irrelevant for other reasons).
+
+Tested with build-many-glibcs.py for arm-linux-gnueabi (compilers and
+glibcs builds), where it fixes the build that previously failed.
+---
+ math/Makefile | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 122 insertions(+)
+
+diff --git a/math/Makefile b/math/Makefile
+index 84a8b94c74..0a5a40430e 100644
+--- a/math/Makefile
++++ b/math/Makefile
+@@ -650,6 +650,128 @@ ifneq ($(long-double-fcts),yes)
+ # We won't compile the `long double' code at all. Tell the `double' code
+ # to define aliases for the `FUNCl' names.
+ math-CPPFLAGS += -DNO_LONG_DOUBLE
++# GCC 10 diagnoses aliases with types conflicting with built-in
++# functions.
++CFLAGS-w_acos.c += -fno-builtin-acosl
++CFLAGS-w_acosh.c += -fno-builtin-acoshl
++CFLAGS-w_asin.c += -fno-builtin-asinl
++CFLAGS-s_asinh.c += -fno-builtin-asinhl
++CFLAGS-s_atan.c += -fno-builtin-atanl
++CFLAGS-w_atan2.c += -fno-builtin-atan2l
++CFLAGS-w_atanh.c += -fno-builtin-atanhl
++CFLAGS-s_cabs.c += -fno-builtin-cabsl
++CFLAGS-s_cacos.c += -fno-builtin-cacosl
++CFLAGS-s_cacosh.c += -fno-builtin-cacoshl
++CFLAGS-s_canonicalize.c += -fno-builtin-canonicalizel
++CFLAGS-s_carg.c += -fno-builtin-cargl
++CFLAGS-s_casin.c += -fno-builtin-casinl
++CFLAGS-s_casinh.c += -fno-builtin-casinhl
++CFLAGS-s_catan.c += -fno-builtin-catanl
++CFLAGS-s_catanh.c += -fno-builtin-catanhl
++CFLAGS-s_cbrt.c += -fno-builtin-cbrtl
++CFLAGS-s_ccos.c += -fno-builtin-ccosl
++CFLAGS-s_ccosh.c += -fno-builtin-ccoshl
++CFLAGS-s_ceil.c += -fno-builtin-ceill
++CFLAGS-s_cexp.c += -fno-builtin-cexpl
++CFLAGS-s_cimag.c += -fno-builtin-cimagl
++CFLAGS-s_clog.c += -fno-builtin-clogl
++CFLAGS-s_clog10.c += -fno-builtin-clog10l
++CFLAGS-s_conj.c += -fno-builtin-conjl
++CFLAGS-s_copysign.c += -fno-builtin-copysignl
++CFLAGS-s_cos.c += -fno-builtin-cosl
++CFLAGS-w_cosh.c += -fno-builtin-coshl
++CFLAGS-s_cpow.c += -fno-builtin-cpowl
++CFLAGS-s_cproj.c += -fno-builtin-cprojl
++CFLAGS-s_creal.c += -fno-builtin-creall
++CFLAGS-s_csin.c += -fno-builtin-csinl
++CFLAGS-s_csinh.c += -fno-builtin-csinhl
++CFLAGS-s_csqrt.c += -fno-builtin-csqrtl
++CFLAGS-s_ctan.c += -fno-builtin-ctanl
++CFLAGS-s_ctanh.c += -fno-builtin-ctanhl
++CFLAGS-s_dadd.c += -fno-builtin-daddl
++CFLAGS-s_ddiv.c += -fno-builtin-ddivl
++CFLAGS-s_dmul.c += -fno-builtin-dmull
++CFLAGS-s_dsub.c += -fno-builtin-dsubl
++CFLAGS-s_erf.c += -fno-builtin-erfl
++CFLAGS-s_erfc.c += -fno-builtin-erfcl
++CFLAGS-e_exp.c += -fno-builtin-expl
++CFLAGS-w_exp10.c += -fno-builtin-exp10l
++CFLAGS-e_exp2.c += -fno-builtin-exp2l
++CFLAGS-s_expm1.c += -fno-builtin-expm1l
++CFLAGS-s_fabs.c += -fno-builtin-fabsl
++CFLAGS-s_fadd.c += -fno-builtin-faddl
++CFLAGS-s_fdim.c += -fno-builtin-fdiml
++CFLAGS-s_fdiv.c += -fno-builtin-fdivl
++CFLAGS-s_finite.c += -fno-builtin-finitel
++CFLAGS-s_floor.c += -fno-builtin-floorl
++CFLAGS-s_fma.c += -fno-builtin-fmal
++CFLAGS-s_fmax.c += -fno-builtin-fmaxl
++CFLAGS-s_fmaxmag.c += -fno-builtin-fmaxmagl
++CFLAGS-s_fmin.c += -fno-builtin-fminl
++CFLAGS-s_fminmag.c += -fno-builtin-fminmagl
++CFLAGS-w_fmod.c += -fno-builtin-fmodl
++CFLAGS-s_fmul.c += -fno-builtin-fmull
++CFLAGS-s_frexp.c += -fno-builtin-frexpl
++CFLAGS-s_fromfp.c += -fno-builtin-fromfpl
++CFLAGS-s_fromfpx.c += -fno-builtin-fromfpxl
++CFLAGS-s_fsub.c += -fno-builtin-fsubl
++CFLAGS-s_gamma.c += -fno-builtin-gammal
++CFLAGS-s_getpayload.c += -fno-builtin-getpayloadl
++CFLAGS-w_hypot.c += -fno-builtin-hypotl
++CFLAGS-w_ilogb.c += -fno-builtin-ilogbl
++CFLAGS-s_isinf.c += -fno-builtin-isinfl
++CFLAGS-s_isnan.c += -fno-builtin-isnanl
++CFLAGS-w_j0.c += -fno-builtin-j0l
++CFLAGS-w_j1.c += -fno-builtin-j1l
++CFLAGS-w_jn.c += -fno-builtin-jnl
++CFLAGS-s_ldexp.c += -fno-builtin-ldexpl
++CFLAGS-w_lgamma.c += -fno-builtin-lgammal
++CFLAGS-w_lgamma_r.c += -fno-builtin-lgammal_r
++CFLAGS-w_llogb.c += -fno-builtin-llogbl
++CFLAGS-s_llrint.c += -fno-builtin-llrintl
++CFLAGS-s_llround.c += -fno-builtin-llroundl
++CFLAGS-e_log.c += -fno-builtin-logl
++CFLAGS-w_log10.c += -fno-builtin-log10l
++CFLAGS-w_log1p.c += -fno-builtin-log1pl
++CFLAGS-e_log2.c += -fno-builtin-log2l
++CFLAGS-s_logb.c += -fno-builtin-logbl
++CFLAGS-s_lrint.c += -fno-builtin-lrintl
++CFLAGS-s_lround.c += -fno-builtin-lroundl
++CFLAGS-s_modf.c += -fno-builtin-modfl
++CFLAGS-s_nan.c += -fno-builtin-nanl
++CFLAGS-s_nearbyint.c += -fno-builtin-nearbyintl
++CFLAGS-s_nextafter.c += -fno-builtin-nextafterl
++CFLAGS-s_nextdown.c += -fno-builtin-nextdownl
++CFLAGS-s_nexttoward.c += -fno-builtin-nexttoward -fno-builtin-nexttowardl
++CFLAGS-s_nexttowardf.c += -fno-builtin-nexttowardf
++CFLAGS-s_nextup.c += -fno-builtin-nextupl
++CFLAGS-e_pow.c += -fno-builtin-powl
++CFLAGS-w_remainder.c += -fno-builtin-remainderl -fno-builtin-dreml
++CFLAGS-s_remquo.c += -fno-builtin-remquol
++CFLAGS-s_rint.c += -fno-builtin-rintl
++CFLAGS-s_round.c += -fno-builtin-roundl
++CFLAGS-s_roundeven.c += -fno-builtin-roundevenl
++CFLAGS-w_scalb.c += -fno-builtin-scalbl
++CFLAGS-w_scalbln.c += -fno-builtin-scalblnl
++CFLAGS-s_scalbn.c += -fno-builtin-scalbnl
++CFLAGS-s_setpayload.c += -fno-builtin-setpayloadl
++CFLAGS-s_setpayloadsig.c += -fno-builtin-setpayloadsigl
++CFLAGS-s_significand.c += -fno-builtin-significandl
++CFLAGS-s_sin.c += -fno-builtin-sinl
++CFLAGS-s_sincos.c += -fno-builtin-sincosl
++CFLAGS-w_sinh.c += -fno-builtin-sinhl
++CFLAGS-w_sqrt.c += -fno-builtin-sqrtl
++CFLAGS-s_tan.c += -fno-builtin-tanl
++CFLAGS-s_tanh.c += -fno-builtin-tanhl
++CFLAGS-w_tgamma.c += -fno-builtin-tgammal
++CFLAGS-s_totalorder.c += -fno-builtin-totalorderl
++CFLAGS-s_totalordermag.c += -fno-builtin-totalordermagl
++CFLAGS-s_trunc.c += -fno-builtin-truncl
++CFLAGS-s_ufromfp.c += -fno-builtin-ufromfpl
++CFLAGS-s_ufromfpx.c += -fno-builtin-ufromfpxl
++CFLAGS-s_y0.c += -fno-builtin-y0l
++CFLAGS-s_y1.c += -fno-builtin-y1l
++CFLAGS-s_yn.c += -fno-builtin-ynl
+ endif
+
+ # These files quiet sNaNs in a way that is optimized away without
+--
+2.25.1
+
diff --git a/packages/glibc/2.29/0003-Fix-build-with-GCC-10-when-long-double-double.patch b/packages/glibc/2.29/0003-Fix-build-with-GCC-10-when-long-double-double.patch
new file mode 100644
index 0000000..ca0d8a7
--- /dev/null
+++ b/packages/glibc/2.29/0003-Fix-build-with-GCC-10-when-long-double-double.patch
@@ -0,0 +1,166 @@
+From 49348beafe9ba150c9bd48595b3f372299bddbb0 Mon Sep 17 00:00:00 2001
+From: Joseph Myers <joseph@codesourcery.com>
+Date: Tue, 17 Mar 2020 22:57:42 +0000
+Subject: [PATCH] Fix build with GCC 10 when long double = double.
+
+On platforms where long double has the same ABI as double, glibc
+defines long double functions as aliases for the corresponding double
+functions. The declarations of those functions in <math.h> are
+disabled to avoid problems with aliases having incompatible types, but
+GCC 10 now gives errors for incompatible types when the long double
+function is known to GCC as a built-in function, not just when there
+is an incompatible header declaration.
+
+This patch fixes those errors by using appropriate
+-fno-builtin-<function> options to compile the double functions. The
+list of CFLAGS-* settings is an appropriately adapted version of that
+in sysdeps/ieee754/ldbl-opt/Makefile used there for building nldbl-*.c
+files; in particular, the options are used even if GCC does not
+currently have a built-in function of a given function, so that adding
+such a built-in function in future will not break the glibc build.
+Thus, various of the CFLAGS-* settings are only for future-proofing
+and may not currently be needed (and it's possible some could be
+irrelevant for other reasons).
+
+Tested with build-many-glibcs.py for arm-linux-gnueabi (compilers and
+glibcs builds), where it fixes the build that previously failed.
+---
+ math/Makefile | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 122 insertions(+)
+
+diff --git a/math/Makefile b/math/Makefile
+index 84a8b94c74..0a5a40430e 100644
+--- a/math/Makefile
++++ b/math/Makefile
+@@ -650,6 +650,128 @@ ifneq ($(long-double-fcts),yes)
+ # We won't compile the `long double' code at all. Tell the `double' code
+ # to define aliases for the `FUNCl' names.
+ math-CPPFLAGS += -DNO_LONG_DOUBLE
++# GCC 10 diagnoses aliases with types conflicting with built-in
++# functions.
++CFLAGS-w_acos.c += -fno-builtin-acosl
++CFLAGS-w_acosh.c += -fno-builtin-acoshl
++CFLAGS-w_asin.c += -fno-builtin-asinl
++CFLAGS-s_asinh.c += -fno-builtin-asinhl
++CFLAGS-s_atan.c += -fno-builtin-atanl
++CFLAGS-w_atan2.c += -fno-builtin-atan2l
++CFLAGS-w_atanh.c += -fno-builtin-atanhl
++CFLAGS-s_cabs.c += -fno-builtin-cabsl
++CFLAGS-s_cacos.c += -fno-builtin-cacosl
++CFLAGS-s_cacosh.c += -fno-builtin-cacoshl
++CFLAGS-s_canonicalize.c += -fno-builtin-canonicalizel
++CFLAGS-s_carg.c += -fno-builtin-cargl
++CFLAGS-s_casin.c += -fno-builtin-casinl
++CFLAGS-s_casinh.c += -fno-builtin-casinhl
++CFLAGS-s_catan.c += -fno-builtin-catanl
++CFLAGS-s_catanh.c += -fno-builtin-catanhl
++CFLAGS-s_cbrt.c += -fno-builtin-cbrtl
++CFLAGS-s_ccos.c += -fno-builtin-ccosl
++CFLAGS-s_ccosh.c += -fno-builtin-ccoshl
++CFLAGS-s_ceil.c += -fno-builtin-ceill
++CFLAGS-s_cexp.c += -fno-builtin-cexpl
++CFLAGS-s_cimag.c += -fno-builtin-cimagl
++CFLAGS-s_clog.c += -fno-builtin-clogl
++CFLAGS-s_clog10.c += -fno-builtin-clog10l
++CFLAGS-s_conj.c += -fno-builtin-conjl
++CFLAGS-s_copysign.c += -fno-builtin-copysignl
++CFLAGS-s_cos.c += -fno-builtin-cosl
++CFLAGS-w_cosh.c += -fno-builtin-coshl
++CFLAGS-s_cpow.c += -fno-builtin-cpowl
++CFLAGS-s_cproj.c += -fno-builtin-cprojl
++CFLAGS-s_creal.c += -fno-builtin-creall
++CFLAGS-s_csin.c += -fno-builtin-csinl
++CFLAGS-s_csinh.c += -fno-builtin-csinhl
++CFLAGS-s_csqrt.c += -fno-builtin-csqrtl
++CFLAGS-s_ctan.c += -fno-builtin-ctanl
++CFLAGS-s_ctanh.c += -fno-builtin-ctanhl
++CFLAGS-s_dadd.c += -fno-builtin-daddl
++CFLAGS-s_ddiv.c += -fno-builtin-ddivl
++CFLAGS-s_dmul.c += -fno-builtin-dmull
++CFLAGS-s_dsub.c += -fno-builtin-dsubl
++CFLAGS-s_erf.c += -fno-builtin-erfl
++CFLAGS-s_erfc.c += -fno-builtin-erfcl
++CFLAGS-e_exp.c += -fno-builtin-expl
++CFLAGS-w_exp10.c += -fno-builtin-exp10l
++CFLAGS-e_exp2.c += -fno-builtin-exp2l
++CFLAGS-s_expm1.c += -fno-builtin-expm1l
++CFLAGS-s_fabs.c += -fno-builtin-fabsl
++CFLAGS-s_fadd.c += -fno-builtin-faddl
++CFLAGS-s_fdim.c += -fno-builtin-fdiml
++CFLAGS-s_fdiv.c += -fno-builtin-fdivl
++CFLAGS-s_finite.c += -fno-builtin-finitel
++CFLAGS-s_floor.c += -fno-builtin-floorl
++CFLAGS-s_fma.c += -fno-builtin-fmal
++CFLAGS-s_fmax.c += -fno-builtin-fmaxl
++CFLAGS-s_fmaxmag.c += -fno-builtin-fmaxmagl
++CFLAGS-s_fmin.c += -fno-builtin-fminl
++CFLAGS-s_fminmag.c += -fno-builtin-fminmagl
++CFLAGS-w_fmod.c += -fno-builtin-fmodl
++CFLAGS-s_fmul.c += -fno-builtin-fmull
++CFLAGS-s_frexp.c += -fno-builtin-frexpl
++CFLAGS-s_fromfp.c += -fno-builtin-fromfpl
++CFLAGS-s_fromfpx.c += -fno-builtin-fromfpxl
++CFLAGS-s_fsub.c += -fno-builtin-fsubl
++CFLAGS-s_gamma.c += -fno-builtin-gammal
++CFLAGS-s_getpayload.c += -fno-builtin-getpayloadl
++CFLAGS-w_hypot.c += -fno-builtin-hypotl
++CFLAGS-w_ilogb.c += -fno-builtin-ilogbl
++CFLAGS-s_isinf.c += -fno-builtin-isinfl
++CFLAGS-s_isnan.c += -fno-builtin-isnanl
++CFLAGS-w_j0.c += -fno-builtin-j0l
++CFLAGS-w_j1.c += -fno-builtin-j1l
++CFLAGS-w_jn.c += -fno-builtin-jnl
++CFLAGS-s_ldexp.c += -fno-builtin-ldexpl
++CFLAGS-w_lgamma.c += -fno-builtin-lgammal
++CFLAGS-w_lgamma_r.c += -fno-builtin-lgammal_r
++CFLAGS-w_llogb.c += -fno-builtin-llogbl
++CFLAGS-s_llrint.c += -fno-builtin-llrintl
++CFLAGS-s_llround.c += -fno-builtin-llroundl
++CFLAGS-e_log.c += -fno-builtin-logl
++CFLAGS-w_log10.c += -fno-builtin-log10l
++CFLAGS-w_log1p.c += -fno-builtin-log1pl
++CFLAGS-e_log2.c += -fno-builtin-log2l
++CFLAGS-s_logb.c += -fno-builtin-logbl
++CFLAGS-s_lrint.c += -fno-builtin-lrintl
++CFLAGS-s_lround.c += -fno-builtin-lroundl
++CFLAGS-s_modf.c += -fno-builtin-modfl
++CFLAGS-s_nan.c += -fno-builtin-nanl
++CFLAGS-s_nearbyint.c += -fno-builtin-nearbyintl
++CFLAGS-s_nextafter.c += -fno-builtin-nextafterl
++CFLAGS-s_nextdown.c += -fno-builtin-nextdownl
++CFLAGS-s_nexttoward.c += -fno-builtin-nexttoward -fno-builtin-nexttowardl
++CFLAGS-s_nexttowardf.c += -fno-builtin-nexttowardf
++CFLAGS-s_nextup.c += -fno-builtin-nextupl
++CFLAGS-e_pow.c += -fno-builtin-powl
++CFLAGS-w_remainder.c += -fno-builtin-remainderl -fno-builtin-dreml
++CFLAGS-s_remquo.c += -fno-builtin-remquol
++CFLAGS-s_rint.c += -fno-builtin-rintl
++CFLAGS-s_round.c += -fno-builtin-roundl
++CFLAGS-s_roundeven.c += -fno-builtin-roundevenl
++CFLAGS-w_scalb.c += -fno-builtin-scalbl
++CFLAGS-w_scalbln.c += -fno-builtin-scalblnl
++CFLAGS-s_scalbn.c += -fno-builtin-scalbnl
++CFLAGS-s_setpayload.c += -fno-builtin-setpayloadl
++CFLAGS-s_setpayloadsig.c += -fno-builtin-setpayloadsigl
++CFLAGS-s_significand.c += -fno-builtin-significandl
++CFLAGS-s_sin.c += -fno-builtin-sinl
++CFLAGS-s_sincos.c += -fno-builtin-sincosl
++CFLAGS-w_sinh.c += -fno-builtin-sinhl
++CFLAGS-w_sqrt.c += -fno-builtin-sqrtl
++CFLAGS-s_tan.c += -fno-builtin-tanl
++CFLAGS-s_tanh.c += -fno-builtin-tanhl
++CFLAGS-w_tgamma.c += -fno-builtin-tgammal
++CFLAGS-s_totalorder.c += -fno-builtin-totalorderl
++CFLAGS-s_totalordermag.c += -fno-builtin-totalordermagl
++CFLAGS-s_trunc.c += -fno-builtin-truncl
++CFLAGS-s_ufromfp.c += -fno-builtin-ufromfpl
++CFLAGS-s_ufromfpx.c += -fno-builtin-ufromfpxl
++CFLAGS-s_y0.c += -fno-builtin-y0l
++CFLAGS-s_y1.c += -fno-builtin-y1l
++CFLAGS-s_yn.c += -fno-builtin-ynl
+ endif
+
+ # These files quiet sNaNs in a way that is optimized away without
+--
+2.25.1
+
diff --git a/packages/glibc/2.30/0003-Fix-build-with-GCC-10-when-long-double-double.patch b/packages/glibc/2.30/0003-Fix-build-with-GCC-10-when-long-double-double.patch
new file mode 100644
index 0000000..ca0d8a7
--- /dev/null
+++ b/packages/glibc/2.30/0003-Fix-build-with-GCC-10-when-long-double-double.patch
@@ -0,0 +1,166 @@
+From 49348beafe9ba150c9bd48595b3f372299bddbb0 Mon Sep 17 00:00:00 2001
+From: Joseph Myers <joseph@codesourcery.com>
+Date: Tue, 17 Mar 2020 22:57:42 +0000
+Subject: [PATCH] Fix build with GCC 10 when long double = double.
+
+On platforms where long double has the same ABI as double, glibc
+defines long double functions as aliases for the corresponding double
+functions. The declarations of those functions in <math.h> are
+disabled to avoid problems with aliases having incompatible types, but
+GCC 10 now gives errors for incompatible types when the long double
+function is known to GCC as a built-in function, not just when there
+is an incompatible header declaration.
+
+This patch fixes those errors by using appropriate
+-fno-builtin-<function> options to compile the double functions. The
+list of CFLAGS-* settings is an appropriately adapted version of that
+in sysdeps/ieee754/ldbl-opt/Makefile used there for building nldbl-*.c
+files; in particular, the options are used even if GCC does not
+currently have a built-in function of a given function, so that adding
+such a built-in function in future will not break the glibc build.
+Thus, various of the CFLAGS-* settings are only for future-proofing
+and may not currently be needed (and it's possible some could be
+irrelevant for other reasons).
+
+Tested with build-many-glibcs.py for arm-linux-gnueabi (compilers and
+glibcs builds), where it fixes the build that previously failed.
+---
+ math/Makefile | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 122 insertions(+)
+
+diff --git a/math/Makefile b/math/Makefile
+index 84a8b94c74..0a5a40430e 100644
+--- a/math/Makefile
++++ b/math/Makefile
+@@ -650,6 +650,128 @@ ifneq ($(long-double-fcts),yes)
+ # We won't compile the `long double' code at all. Tell the `double' code
+ # to define aliases for the `FUNCl' names.
+ math-CPPFLAGS += -DNO_LONG_DOUBLE
++# GCC 10 diagnoses aliases with types conflicting with built-in
++# functions.
++CFLAGS-w_acos.c += -fno-builtin-acosl
++CFLAGS-w_acosh.c += -fno-builtin-acoshl
++CFLAGS-w_asin.c += -fno-builtin-asinl
++CFLAGS-s_asinh.c += -fno-builtin-asinhl
++CFLAGS-s_atan.c += -fno-builtin-atanl
++CFLAGS-w_atan2.c += -fno-builtin-atan2l
++CFLAGS-w_atanh.c += -fno-builtin-atanhl
++CFLAGS-s_cabs.c += -fno-builtin-cabsl
++CFLAGS-s_cacos.c += -fno-builtin-cacosl
++CFLAGS-s_cacosh.c += -fno-builtin-cacoshl
++CFLAGS-s_canonicalize.c += -fno-builtin-canonicalizel
++CFLAGS-s_carg.c += -fno-builtin-cargl
++CFLAGS-s_casin.c += -fno-builtin-casinl
++CFLAGS-s_casinh.c += -fno-builtin-casinhl
++CFLAGS-s_catan.c += -fno-builtin-catanl
++CFLAGS-s_catanh.c += -fno-builtin-catanhl
++CFLAGS-s_cbrt.c += -fno-builtin-cbrtl
++CFLAGS-s_ccos.c += -fno-builtin-ccosl
++CFLAGS-s_ccosh.c += -fno-builtin-ccoshl
++CFLAGS-s_ceil.c += -fno-builtin-ceill
++CFLAGS-s_cexp.c += -fno-builtin-cexpl
++CFLAGS-s_cimag.c += -fno-builtin-cimagl
++CFLAGS-s_clog.c += -fno-builtin-clogl
++CFLAGS-s_clog10.c += -fno-builtin-clog10l
++CFLAGS-s_conj.c += -fno-builtin-conjl
++CFLAGS-s_copysign.c += -fno-builtin-copysignl
++CFLAGS-s_cos.c += -fno-builtin-cosl
++CFLAGS-w_cosh.c += -fno-builtin-coshl
++CFLAGS-s_cpow.c += -fno-builtin-cpowl
++CFLAGS-s_cproj.c += -fno-builtin-cprojl
++CFLAGS-s_creal.c += -fno-builtin-creall
++CFLAGS-s_csin.c += -fno-builtin-csinl
++CFLAGS-s_csinh.c += -fno-builtin-csinhl
++CFLAGS-s_csqrt.c += -fno-builtin-csqrtl
++CFLAGS-s_ctan.c += -fno-builtin-ctanl
++CFLAGS-s_ctanh.c += -fno-builtin-ctanhl
++CFLAGS-s_dadd.c += -fno-builtin-daddl
++CFLAGS-s_ddiv.c += -fno-builtin-ddivl
++CFLAGS-s_dmul.c += -fno-builtin-dmull
++CFLAGS-s_dsub.c += -fno-builtin-dsubl
++CFLAGS-s_erf.c += -fno-builtin-erfl
++CFLAGS-s_erfc.c += -fno-builtin-erfcl
++CFLAGS-e_exp.c += -fno-builtin-expl
++CFLAGS-w_exp10.c += -fno-builtin-exp10l
++CFLAGS-e_exp2.c += -fno-builtin-exp2l
++CFLAGS-s_expm1.c += -fno-builtin-expm1l
++CFLAGS-s_fabs.c += -fno-builtin-fabsl
++CFLAGS-s_fadd.c += -fno-builtin-faddl
++CFLAGS-s_fdim.c += -fno-builtin-fdiml
++CFLAGS-s_fdiv.c += -fno-builtin-fdivl
++CFLAGS-s_finite.c += -fno-builtin-finitel
++CFLAGS-s_floor.c += -fno-builtin-floorl
++CFLAGS-s_fma.c += -fno-builtin-fmal
++CFLAGS-s_fmax.c += -fno-builtin-fmaxl
++CFLAGS-s_fmaxmag.c += -fno-builtin-fmaxmagl
++CFLAGS-s_fmin.c += -fno-builtin-fminl
++CFLAGS-s_fminmag.c += -fno-builtin-fminmagl
++CFLAGS-w_fmod.c += -fno-builtin-fmodl
++CFLAGS-s_fmul.c += -fno-builtin-fmull
++CFLAGS-s_frexp.c += -fno-builtin-frexpl
++CFLAGS-s_fromfp.c += -fno-builtin-fromfpl
++CFLAGS-s_fromfpx.c += -fno-builtin-fromfpxl
++CFLAGS-s_fsub.c += -fno-builtin-fsubl
++CFLAGS-s_gamma.c += -fno-builtin-gammal
++CFLAGS-s_getpayload.c += -fno-builtin-getpayloadl
++CFLAGS-w_hypot.c += -fno-builtin-hypotl
++CFLAGS-w_ilogb.c += -fno-builtin-ilogbl
++CFLAGS-s_isinf.c += -fno-builtin-isinfl
++CFLAGS-s_isnan.c += -fno-builtin-isnanl
++CFLAGS-w_j0.c += -fno-builtin-j0l
++CFLAGS-w_j1.c += -fno-builtin-j1l
++CFLAGS-w_jn.c += -fno-builtin-jnl
++CFLAGS-s_ldexp.c += -fno-builtin-ldexpl
++CFLAGS-w_lgamma.c += -fno-builtin-lgammal
++CFLAGS-w_lgamma_r.c += -fno-builtin-lgammal_r
++CFLAGS-w_llogb.c += -fno-builtin-llogbl
++CFLAGS-s_llrint.c += -fno-builtin-llrintl
++CFLAGS-s_llround.c += -fno-builtin-llroundl
++CFLAGS-e_log.c += -fno-builtin-logl
++CFLAGS-w_log10.c += -fno-builtin-log10l
++CFLAGS-w_log1p.c += -fno-builtin-log1pl
++CFLAGS-e_log2.c += -fno-builtin-log2l
++CFLAGS-s_logb.c += -fno-builtin-logbl
++CFLAGS-s_lrint.c += -fno-builtin-lrintl
++CFLAGS-s_lround.c += -fno-builtin-lroundl
++CFLAGS-s_modf.c += -fno-builtin-modfl
++CFLAGS-s_nan.c += -fno-builtin-nanl
++CFLAGS-s_nearbyint.c += -fno-builtin-nearbyintl
++CFLAGS-s_nextafter.c += -fno-builtin-nextafterl
++CFLAGS-s_nextdown.c += -fno-builtin-nextdownl
++CFLAGS-s_nexttoward.c += -fno-builtin-nexttoward -fno-builtin-nexttowardl
++CFLAGS-s_nexttowardf.c += -fno-builtin-nexttowardf
++CFLAGS-s_nextup.c += -fno-builtin-nextupl
++CFLAGS-e_pow.c += -fno-builtin-powl
++CFLAGS-w_remainder.c += -fno-builtin-remainderl -fno-builtin-dreml
++CFLAGS-s_remquo.c += -fno-builtin-remquol
++CFLAGS-s_rint.c += -fno-builtin-rintl
++CFLAGS-s_round.c += -fno-builtin-roundl
++CFLAGS-s_roundeven.c += -fno-builtin-roundevenl
++CFLAGS-w_scalb.c += -fno-builtin-scalbl
++CFLAGS-w_scalbln.c += -fno-builtin-scalblnl
++CFLAGS-s_scalbn.c += -fno-builtin-scalbnl
++CFLAGS-s_setpayload.c += -fno-builtin-setpayloadl
++CFLAGS-s_setpayloadsig.c += -fno-builtin-setpayloadsigl
++CFLAGS-s_significand.c += -fno-builtin-significandl
++CFLAGS-s_sin.c += -fno-builtin-sinl
++CFLAGS-s_sincos.c += -fno-builtin-sincosl
++CFLAGS-w_sinh.c += -fno-builtin-sinhl
++CFLAGS-w_sqrt.c += -fno-builtin-sqrtl
++CFLAGS-s_tan.c += -fno-builtin-tanl
++CFLAGS-s_tanh.c += -fno-builtin-tanhl
++CFLAGS-w_tgamma.c += -fno-builtin-tgammal
++CFLAGS-s_totalorder.c += -fno-builtin-totalorderl
++CFLAGS-s_totalordermag.c += -fno-builtin-totalordermagl
++CFLAGS-s_trunc.c += -fno-builtin-truncl
++CFLAGS-s_ufromfp.c += -fno-builtin-ufromfpl
++CFLAGS-s_ufromfpx.c += -fno-builtin-ufromfpxl
++CFLAGS-s_y0.c += -fno-builtin-y0l
++CFLAGS-s_y1.c += -fno-builtin-y1l
++CFLAGS-s_yn.c += -fno-builtin-ynl
+ endif
+
+ # These files quiet sNaNs in a way that is optimized away without
+--
+2.25.1
+
diff --git a/packages/glibc/2.31/0002-Fix-build-with-GCC-10-when-long-double-double.patch b/packages/glibc/2.31/0002-Fix-build-with-GCC-10-when-long-double-double.patch
new file mode 100644
index 0000000..ca0d8a7
--- /dev/null
+++ b/packages/glibc/2.31/0002-Fix-build-with-GCC-10-when-long-double-double.patch
@@ -0,0 +1,166 @@
+From 49348beafe9ba150c9bd48595b3f372299bddbb0 Mon Sep 17 00:00:00 2001
+From: Joseph Myers <joseph@codesourcery.com>
+Date: Tue, 17 Mar 2020 22:57:42 +0000
+Subject: [PATCH] Fix build with GCC 10 when long double = double.
+
+On platforms where long double has the same ABI as double, glibc
+defines long double functions as aliases for the corresponding double
+functions. The declarations of those functions in <math.h> are
+disabled to avoid problems with aliases having incompatible types, but
+GCC 10 now gives errors for incompatible types when the long double
+function is known to GCC as a built-in function, not just when there
+is an incompatible header declaration.
+
+This patch fixes those errors by using appropriate
+-fno-builtin-<function> options to compile the double functions. The
+list of CFLAGS-* settings is an appropriately adapted version of that
+in sysdeps/ieee754/ldbl-opt/Makefile used there for building nldbl-*.c
+files; in particular, the options are used even if GCC does not
+currently have a built-in function of a given function, so that adding
+such a built-in function in future will not break the glibc build.
+Thus, various of the CFLAGS-* settings are only for future-proofing
+and may not currently be needed (and it's possible some could be
+irrelevant for other reasons).
+
+Tested with build-many-glibcs.py for arm-linux-gnueabi (compilers and
+glibcs builds), where it fixes the build that previously failed.
+---
+ math/Makefile | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 122 insertions(+)
+
+diff --git a/math/Makefile b/math/Makefile
+index 84a8b94c74..0a5a40430e 100644
+--- a/math/Makefile
++++ b/math/Makefile
+@@ -650,6 +650,128 @@ ifneq ($(long-double-fcts),yes)
+ # We won't compile the `long double' code at all. Tell the `double' code
+ # to define aliases for the `FUNCl' names.
+ math-CPPFLAGS += -DNO_LONG_DOUBLE
++# GCC 10 diagnoses aliases with types conflicting with built-in
++# functions.
++CFLAGS-w_acos.c += -fno-builtin-acosl
++CFLAGS-w_acosh.c += -fno-builtin-acoshl
++CFLAGS-w_asin.c += -fno-builtin-asinl
++CFLAGS-s_asinh.c += -fno-builtin-asinhl
++CFLAGS-s_atan.c += -fno-builtin-atanl
++CFLAGS-w_atan2.c += -fno-builtin-atan2l
++CFLAGS-w_atanh.c += -fno-builtin-atanhl
++CFLAGS-s_cabs.c += -fno-builtin-cabsl
++CFLAGS-s_cacos.c += -fno-builtin-cacosl
++CFLAGS-s_cacosh.c += -fno-builtin-cacoshl
++CFLAGS-s_canonicalize.c += -fno-builtin-canonicalizel
++CFLAGS-s_carg.c += -fno-builtin-cargl
++CFLAGS-s_casin.c += -fno-builtin-casinl
++CFLAGS-s_casinh.c += -fno-builtin-casinhl
++CFLAGS-s_catan.c += -fno-builtin-catanl
++CFLAGS-s_catanh.c += -fno-builtin-catanhl
++CFLAGS-s_cbrt.c += -fno-builtin-cbrtl
++CFLAGS-s_ccos.c += -fno-builtin-ccosl
++CFLAGS-s_ccosh.c += -fno-builtin-ccoshl
++CFLAGS-s_ceil.c += -fno-builtin-ceill
++CFLAGS-s_cexp.c += -fno-builtin-cexpl
++CFLAGS-s_cimag.c += -fno-builtin-cimagl
++CFLAGS-s_clog.c += -fno-builtin-clogl
++CFLAGS-s_clog10.c += -fno-builtin-clog10l
++CFLAGS-s_conj.c += -fno-builtin-conjl
++CFLAGS-s_copysign.c += -fno-builtin-copysignl
++CFLAGS-s_cos.c += -fno-builtin-cosl
++CFLAGS-w_cosh.c += -fno-builtin-coshl
++CFLAGS-s_cpow.c += -fno-builtin-cpowl
++CFLAGS-s_cproj.c += -fno-builtin-cprojl
++CFLAGS-s_creal.c += -fno-builtin-creall
++CFLAGS-s_csin.c += -fno-builtin-csinl
++CFLAGS-s_csinh.c += -fno-builtin-csinhl
++CFLAGS-s_csqrt.c += -fno-builtin-csqrtl
++CFLAGS-s_ctan.c += -fno-builtin-ctanl
++CFLAGS-s_ctanh.c += -fno-builtin-ctanhl
++CFLAGS-s_dadd.c += -fno-builtin-daddl
++CFLAGS-s_ddiv.c += -fno-builtin-ddivl
++CFLAGS-s_dmul.c += -fno-builtin-dmull
++CFLAGS-s_dsub.c += -fno-builtin-dsubl
++CFLAGS-s_erf.c += -fno-builtin-erfl
++CFLAGS-s_erfc.c += -fno-builtin-erfcl
++CFLAGS-e_exp.c += -fno-builtin-expl
++CFLAGS-w_exp10.c += -fno-builtin-exp10l
++CFLAGS-e_exp2.c += -fno-builtin-exp2l
++CFLAGS-s_expm1.c += -fno-builtin-expm1l
++CFLAGS-s_fabs.c += -fno-builtin-fabsl
++CFLAGS-s_fadd.c += -fno-builtin-faddl
++CFLAGS-s_fdim.c += -fno-builtin-fdiml
++CFLAGS-s_fdiv.c += -fno-builtin-fdivl
++CFLAGS-s_finite.c += -fno-builtin-finitel
++CFLAGS-s_floor.c += -fno-builtin-floorl
++CFLAGS-s_fma.c += -fno-builtin-fmal
++CFLAGS-s_fmax.c += -fno-builtin-fmaxl
++CFLAGS-s_fmaxmag.c += -fno-builtin-fmaxmagl
++CFLAGS-s_fmin.c += -fno-builtin-fminl
++CFLAGS-s_fminmag.c += -fno-builtin-fminmagl
++CFLAGS-w_fmod.c += -fno-builtin-fmodl
++CFLAGS-s_fmul.c += -fno-builtin-fmull
++CFLAGS-s_frexp.c += -fno-builtin-frexpl
++CFLAGS-s_fromfp.c += -fno-builtin-fromfpl
++CFLAGS-s_fromfpx.c += -fno-builtin-fromfpxl
++CFLAGS-s_fsub.c += -fno-builtin-fsubl
++CFLAGS-s_gamma.c += -fno-builtin-gammal
++CFLAGS-s_getpayload.c += -fno-builtin-getpayloadl
++CFLAGS-w_hypot.c += -fno-builtin-hypotl
++CFLAGS-w_ilogb.c += -fno-builtin-ilogbl
++CFLAGS-s_isinf.c += -fno-builtin-isinfl
++CFLAGS-s_isnan.c += -fno-builtin-isnanl
++CFLAGS-w_j0.c += -fno-builtin-j0l
++CFLAGS-w_j1.c += -fno-builtin-j1l
++CFLAGS-w_jn.c += -fno-builtin-jnl
++CFLAGS-s_ldexp.c += -fno-builtin-ldexpl
++CFLAGS-w_lgamma.c += -fno-builtin-lgammal
++CFLAGS-w_lgamma_r.c += -fno-builtin-lgammal_r
++CFLAGS-w_llogb.c += -fno-builtin-llogbl
++CFLAGS-s_llrint.c += -fno-builtin-llrintl
++CFLAGS-s_llround.c += -fno-builtin-llroundl
++CFLAGS-e_log.c += -fno-builtin-logl
++CFLAGS-w_log10.c += -fno-builtin-log10l
++CFLAGS-w_log1p.c += -fno-builtin-log1pl
++CFLAGS-e_log2.c += -fno-builtin-log2l
++CFLAGS-s_logb.c += -fno-builtin-logbl
++CFLAGS-s_lrint.c += -fno-builtin-lrintl
++CFLAGS-s_lround.c += -fno-builtin-lroundl
++CFLAGS-s_modf.c += -fno-builtin-modfl
++CFLAGS-s_nan.c += -fno-builtin-nanl
++CFLAGS-s_nearbyint.c += -fno-builtin-nearbyintl
++CFLAGS-s_nextafter.c += -fno-builtin-nextafterl
++CFLAGS-s_nextdown.c += -fno-builtin-nextdownl
++CFLAGS-s_nexttoward.c += -fno-builtin-nexttoward -fno-builtin-nexttowardl
++CFLAGS-s_nexttowardf.c += -fno-builtin-nexttowardf
++CFLAGS-s_nextup.c += -fno-builtin-nextupl
++CFLAGS-e_pow.c += -fno-builtin-powl
++CFLAGS-w_remainder.c += -fno-builtin-remainderl -fno-builtin-dreml
++CFLAGS-s_remquo.c += -fno-builtin-remquol
++CFLAGS-s_rint.c += -fno-builtin-rintl
++CFLAGS-s_round.c += -fno-builtin-roundl
++CFLAGS-s_roundeven.c += -fno-builtin-roundevenl
++CFLAGS-w_scalb.c += -fno-builtin-scalbl
++CFLAGS-w_scalbln.c += -fno-builtin-scalblnl
++CFLAGS-s_scalbn.c += -fno-builtin-scalbnl
++CFLAGS-s_setpayload.c += -fno-builtin-setpayloadl
++CFLAGS-s_setpayloadsig.c += -fno-builtin-setpayloadsigl
++CFLAGS-s_significand.c += -fno-builtin-significandl
++CFLAGS-s_sin.c += -fno-builtin-sinl
++CFLAGS-s_sincos.c += -fno-builtin-sincosl
++CFLAGS-w_sinh.c += -fno-builtin-sinhl
++CFLAGS-w_sqrt.c += -fno-builtin-sqrtl
++CFLAGS-s_tan.c += -fno-builtin-tanl
++CFLAGS-s_tanh.c += -fno-builtin-tanhl
++CFLAGS-w_tgamma.c += -fno-builtin-tgammal
++CFLAGS-s_totalorder.c += -fno-builtin-totalorderl
++CFLAGS-s_totalordermag.c += -fno-builtin-totalordermagl
++CFLAGS-s_trunc.c += -fno-builtin-truncl
++CFLAGS-s_ufromfp.c += -fno-builtin-ufromfpl
++CFLAGS-s_ufromfpx.c += -fno-builtin-ufromfpxl
++CFLAGS-s_y0.c += -fno-builtin-y0l
++CFLAGS-s_y1.c += -fno-builtin-y1l
++CFLAGS-s_yn.c += -fno-builtin-ynl
+ endif
+
+ # These files quiet sNaNs in a way that is optimized away without
+--
+2.25.1
+
diff --git a/packages/glibc/package.desc b/packages/glibc/package.desc
index 6b722a7..eba5f00 100644
--- a/packages/glibc/package.desc
+++ b/packages/glibc/package.desc
@@ -1,7 +1,7 @@
origin='GNU'
repository='git git://sourceware.org/git/glibc.git'
mirrors='$(CT_Mirrors GNU glibc)'
-# Cannot use MAJOR.MINOR as the releant part because of 2.12: 2.12.2 was the most recent
+# Cannot use MAJOR.MINOR as the relevant part because of 2.12: 2.12.2 was the most recent
# bugfix release, but it didn't have glibc-ports released alongside it.
milestones='2.14 2.17 2.20 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30'
archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/libelf/package.desc b/packages/libelf/package.desc
index 52e514f..f7648d9 100644
--- a/packages/libelf/package.desc
+++ b/packages/libelf/package.desc
@@ -1,5 +1,5 @@
# FIXME No public repository and no new releases.
# Consider switching to/adding project elftoolchain?
-mirrors='http://www.mr511.de/software https://fossies.org/linux/misc/old'
+mirrors='https://fossies.org/linux/misc/old'
relevantpattern='*.*|.'
archive_formats='.tar.gz'
diff --git a/samples/mips64-unknown-linux-gnu/crosstool.config b/samples/mips64-unknown-linux-gnu/crosstool.config
new file mode 100644
index 0000000..a33fd90
--- /dev/null
+++ b/samples/mips64-unknown-linux-gnu/crosstool.config
@@ -0,0 +1,7 @@
+CT_CONFIG_VERSION="3"
+CT_ARCH_MIPS=y
+CT_ARCH_mips_n64=y
+CT_ARCH_64=y
+CT_ARCH_FLOAT_HW=y
+CT_KERNEL_LINUX=y
+CT_CC_LANG_CXX=y
diff --git a/samples/mips64-unknown-linux-gnu/reported.by b/samples/mips64-unknown-linux-gnu/reported.by
new file mode 100644
index 0000000..41eaaff
--- /dev/null
+++ b/samples/mips64-unknown-linux-gnu/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Chris Packham"
+reporter_url=""
+reporter_comment="Big-endian configuration for MIPS/glibc."
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index 9139331..b0ea29b 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -146,7 +146,7 @@ do_debug_gdb_build()
cflags="${CT_ALL_TARGET_CFLAGS}" \
ldflags="${CT_ALL_TARGET_LDFLAGS}" \
static="${CT_GDB_NATIVE_STATIC}" \
- static_libstdc="${CT_GDB_NATIVE_STATIC_LIBSTDC}" \
+ static_libstdcxx="${CT_GDB_NATIVE_STATIC_LIBSTDCXX}" \
prefix=/usr \
destdir="${CT_DEBUGROOT_DIR}" \
"${native_extra_config[@]}"
@@ -236,7 +236,8 @@ do_gdb_backend()
cflags+=" -static"
ldflags+=" -static"
fi
- if [ "${static_libstdc}" = "y" ]; then
+ if [ "${static_libstdcxx}" = "y" ]; then
+ ldflags+=" -static-libgcc"
ldflags+=" -static-libstdc++"
fi
diff --git a/testing/docker/alpine3.8/Dockerfile b/testing/docker/alpine3.8/Dockerfile
index 43da7ac..6119f36 100644
--- a/testing/docker/alpine3.8/Dockerfile
+++ b/testing/docker/alpine3.8/Dockerfile
@@ -7,7 +7,7 @@ RUN adduser -D -h /home/ctng -G ctng -u $CTNG_UID -s /bin/bash ctng
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories
RUN apk update
-RUN apk add alpine-sdk wget xz git bash autoconf automake bison flex texinfo help2man gawk libtool ncurses-dev gettext-dev python-dev
+RUN apk add alpine-sdk wget xz git bash autoconf automake bison flex texinfo help2man gawk libtool ncurses-dev gettext-dev python-dev rsync
RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
RUN chmod a+x /sbin/dumb-init
RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile
diff --git a/testing/docker/archlinux/Dockerfile b/testing/docker/archlinux/Dockerfile
index 1a6a148..d874d62 100644
--- a/testing/docker/archlinux/Dockerfile
+++ b/testing/docker/archlinux/Dockerfile
@@ -3,7 +3,7 @@ ARG CTNG_UID=1000
ARG CTNG_GID=1000
RUN pacman -Sy --noconfirm archlinux-keyring
RUN pacman -Syu --noconfirm
-RUN pacman -S --noconfirm base-devel git help2man python unzip wget audit
+RUN pacman -S --noconfirm base-devel git help2man python unzip wget audit rsync
RUN groupadd -g $CTNG_GID ctng
RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng
RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
diff --git a/testing/docker/centos6/Dockerfile b/testing/docker/centos6/Dockerfile
index 7f11fe1..736557b 100644
--- a/testing/docker/centos6/Dockerfile
+++ b/testing/docker/centos6/Dockerfile
@@ -5,7 +5,7 @@ RUN groupadd -g $CTNG_GID ctng
RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng
RUN yum install -y epel-release
RUN yum install -y autoconf gperf bison flex texinfo help2man gcc-c++ libtool libtool-bin patch \
- ncurses-devel python34-devel perl-Thread-Queue bzip2 git wget xz unzip
+ ncurses-devel python34-devel perl-Thread-Queue bzip2 git wget xz unzip rsync
RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
RUN chmod a+x /sbin/dumb-init
RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile
diff --git a/testing/docker/centos7/Dockerfile b/testing/docker/centos7/Dockerfile
index e7b812a..7dfe173 100644
--- a/testing/docker/centos7/Dockerfile
+++ b/testing/docker/centos7/Dockerfile
@@ -5,7 +5,7 @@ RUN groupadd -g $CTNG_GID ctng
RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng
RUN yum install -y epel-release
RUN yum install -y autoconf gperf bison file flex texinfo help2man gcc-c++ libtool make patch \
- ncurses-devel python36-devel perl-Thread-Queue bzip2 git wget which xz unzip
+ ncurses-devel python36-devel perl-Thread-Queue bzip2 git wget which xz unzip rsync
RUN ln -sf python36 /usr/bin/python3
RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
RUN chmod a+x /sbin/dumb-init
diff --git a/testing/docker/fedora29/Dockerfile b/testing/docker/fedora29/Dockerfile
index 15dfb34..9d7293f 100644
--- a/testing/docker/fedora29/Dockerfile
+++ b/testing/docker/fedora29/Dockerfile
@@ -4,7 +4,7 @@ ARG CTNG_GID=1000
RUN groupadd -g $CTNG_GID ctng
RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng
RUN yum install -y autoconf gperf bison file flex texinfo help2man gcc-c++ libtool make patch \
- ncurses-devel python3-devel perl-Thread-Queue bzip2 git wget which xz unzip
+ ncurses-devel python3-devel perl-Thread-Queue bzip2 git wget which xz unzip rsync
RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
RUN chmod a+x /sbin/dumb-init
RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile
diff --git a/testing/docker/mint19-amd64/Dockerfile b/testing/docker/mint19-amd64/Dockerfile
index cfc05e3..61f0562 100644
--- a/testing/docker/mint19-amd64/Dockerfile
+++ b/testing/docker/mint19-amd64/Dockerfile
@@ -5,7 +5,7 @@ RUN groupadd -g $CTNG_GID ctng
RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng
RUN apt-get update
RUN apt-get install -y gcc gperf bison flex texinfo help2man make libncurses5-dev \
- python3-dev autoconf automake libtool libtool-bin gawk wget
+ python3-dev autoconf automake libtool libtool-bin gawk wget rsync
RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
RUN chmod a+x /sbin/dumb-init
RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile
diff --git a/testing/docker/ubuntu16.04/Dockerfile b/testing/docker/ubuntu16.04/Dockerfile
index a0b68ae..4190fc5 100644
--- a/testing/docker/ubuntu16.04/Dockerfile
+++ b/testing/docker/ubuntu16.04/Dockerfile
@@ -6,7 +6,7 @@ RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng
RUN apt-get update
RUN apt-get install -y gcc g++ gperf bison flex texinfo help2man make libncurses5-dev \
python3-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \
- patch libstdc++6
+ patch libstdc++6 rsync
RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
RUN chmod a+x /sbin/dumb-init
RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile
diff --git a/testing/docker/ubuntu18.04/Dockerfile b/testing/docker/ubuntu18.04/Dockerfile
index 918dd93..f5156d2 100644
--- a/testing/docker/ubuntu18.04/Dockerfile
+++ b/testing/docker/ubuntu18.04/Dockerfile
@@ -6,7 +6,7 @@ RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng
RUN apt-get update
RUN apt-get install -y gcc g++ gperf bison flex texinfo help2man make libncurses5-dev \
python3-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \
- patch libstdc++6
+ patch libstdc++6 rsync
RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
RUN chmod a+x /sbin/dumb-init
RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile