From e46219c169f633466b2e5677a328c6afd2e37118 Mon Sep 17 00:00:00 2001
From: Martin Sirringhaus <>
Date: Wed, 22 Jul 2020 17:49:15 +0200
Subject: [PATCH] Downgrade glibc to 2.11.1 for ppc, ppc64 and s390x

---
 src/ci/docker/README.md                                     | 6 +++---
 .../001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch     | 0
 .../patches/glibc/{2.12.2 => 2.11.1}/002-newer-gcc.patch    | 0
 .../host-x86_64/dist-powerpc-linux/powerpc-linux-gnu.config | 6 +++---
 .../001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch     | 0
 .../002-Prevent-inlining-in-PPC64-initfini.s.patch          | 0
 .../patches/glibc/{2.12.2 => 2.11.1}/003-newer-gcc.patch    | 0
 .../dist-powerpc64-linux/powerpc64-linux-gnu.config         | 6 +++---
 ...e-.machine-to-prevent-AS-from-complaining-about-z9.patch | 0
 .../patches/glibc/{2.12.2 => 2.11.1}/002-newer-gcc.patch    | 0
 .../host-x86_64/dist-s390x-linux/s390x-linux-gnu.config     | 6 +++---
 11 files changed, 12 insertions(+), 12 deletions(-)
 rename src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/{2.12.2 => 2.11.1}/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch (100%)
 rename src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/{2.12.2 => 2.11.1}/002-newer-gcc.patch (100%)
 rename src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/{2.12.2 => 2.11.1}/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch (100%)
 rename src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/{2.12.2 => 2.11.1}/002-Prevent-inlining-in-PPC64-initfini.s.patch (100%)
 rename src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/{2.12.2 => 2.11.1}/003-newer-gcc.patch (100%)
 rename src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/{2.12.2 => 2.11.1}/001-Use-.machine-to-prevent-AS-from-complaining-about-z9.patch (100%)
 rename src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/{2.12.2 => 2.11.1}/002-newer-gcc.patch (100%)

diff --git a/src/ci/docker/README.md b/src/ci/docker/README.md
index ff28f4f603c9d..1a1c1618da40d 100644
--- a/src/ci/docker/README.md
+++ b/src/ci/docker/README.md
@@ -238,7 +238,7 @@ For targets: `powerpc-unknown-linux-gnu`
 - Target options > Emit assembly for CPU = powerpc -- pure 32-bit PowerPC
 - Operating System > Target OS = linux
 - Operating System > Linux kernel version = 2.6.32.68 -- ~RHEL6 kernel
-- C-library > glibc version = 2.12.2 -- ~RHEL6 glibc
+- C-library > glibc version = 2.11.1 -- ~SLE11-SP4 glibc
 - C compiler > gcc version = 5.2.0
 - C compiler > C++ = ENABLE -- to cross compile LLVM
 
@@ -255,7 +255,7 @@ For targets: `powerpc64-unknown-linux-gnu`
 - Target options > Tune for CPU = power6 -- (+)
 - Operating System > Target OS = linux
 - Operating System > Linux kernel version = 2.6.32.68 -- ~RHEL6 kernel
-- C-library > glibc version = 2.12.2 -- ~RHEL6 glibc
+- C-library > glibc version = 2.11.1 -- ~SLE11-SP4 glibc
 - C compiler > gcc version = 5.2.0
 - C compiler > C++ = ENABLE -- to cross compile LLVM
 
@@ -272,7 +272,7 @@ For targets: `s390x-unknown-linux-gnu`
 - Target options > Bitness = 64-bit
 - Operating System > Target OS = linux
 - Operating System > Linux kernel version = 2.6.32.68 -- ~RHEL6 kernel
-- C-library > glibc version = 2.12.2 -- ~RHEL6 glibc
+- C-library > glibc version = 2.11.1 -- ~SLE11-SP4 glibc
 - C compiler > gcc version = 5.2.0
 - C compiler > gcc extra config = --with-arch=z10 -- LLVM's minimum support
 - C compiler > C++ = ENABLE -- to cross compile LLVM
diff --git a/src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch b/src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.11.1/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch
similarity index 100%
rename from src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch
rename to src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.11.1/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch
diff --git a/src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.12.2/002-newer-gcc.patch b/src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.11.1/002-newer-gcc.patch
similarity index 100%
rename from src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.12.2/002-newer-gcc.patch
rename to src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.11.1/002-newer-gcc.patch
diff --git a/src/ci/docker/host-x86_64/dist-powerpc-linux/powerpc-linux-gnu.config b/src/ci/docker/host-x86_64/dist-powerpc-linux/powerpc-linux-gnu.config
index 7df41da2bf76e..b358dce3cdfe8 100644
--- a/src/ci/docker/host-x86_64/dist-powerpc-linux/powerpc-linux-gnu.config
+++ b/src/ci/docker/host-x86_64/dist-powerpc-linux/powerpc-linux-gnu.config
@@ -290,7 +290,7 @@ CT_BINUTILS_EXTRA_CONFIG_ARRAY=""
 # C-library
 #
 CT_LIBC="glibc"
-CT_LIBC_VERSION="2.12.2"
+CT_LIBC_VERSION="2.11.1"
 CT_LIBC_glibc=y
 # CT_LIBC_musl is not set
 # CT_LIBC_uClibc is not set
@@ -309,9 +309,9 @@ CT_THREADS="nptl"
 # CT_LIBC_GLIBC_V_2_14_1 is not set
 # CT_LIBC_GLIBC_V_2_14 is not set
 # CT_LIBC_GLIBC_V_2_13 is not set
-CT_LIBC_GLIBC_V_2_12_2=y
+# CT_LIBC_GLIBC_V_2_12_2 is not set
 # CT_LIBC_GLIBC_V_2_12_1 is not set
-# CT_LIBC_GLIBC_V_2_11_1 is not set
+CT_LIBC_GLIBC_V_2_11_1=y
 # CT_LIBC_GLIBC_V_2_11 is not set
 # CT_LIBC_GLIBC_V_2_10_1 is not set
 # CT_LIBC_GLIBC_V_2_9 is not set
diff --git a/src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch b/src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.11.1/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch
similarity index 100%
rename from src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch
rename to src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.11.1/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch
diff --git a/src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/002-Prevent-inlining-in-PPC64-initfini.s.patch b/src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.11.1/002-Prevent-inlining-in-PPC64-initfini.s.patch
similarity index 100%
rename from src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/002-Prevent-inlining-in-PPC64-initfini.s.patch
rename to src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.11.1/002-Prevent-inlining-in-PPC64-initfini.s.patch
diff --git a/src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/003-newer-gcc.patch b/src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.11.1/003-newer-gcc.patch
similarity index 100%
rename from src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/003-newer-gcc.patch
rename to src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.11.1/003-newer-gcc.patch
diff --git a/src/ci/docker/host-x86_64/dist-powerpc64-linux/powerpc64-linux-gnu.config b/src/ci/docker/host-x86_64/dist-powerpc64-linux/powerpc64-linux-gnu.config
index 4aab4f4fd4445..aa13119d50c19 100644
--- a/src/ci/docker/host-x86_64/dist-powerpc64-linux/powerpc64-linux-gnu.config
+++ b/src/ci/docker/host-x86_64/dist-powerpc64-linux/powerpc64-linux-gnu.config
@@ -290,7 +290,7 @@ CT_BINUTILS_EXTRA_CONFIG_ARRAY=""
 # C-library
 #
 CT_LIBC="glibc"
-CT_LIBC_VERSION="2.12.2"
+CT_LIBC_VERSION="2.11.1"
 CT_LIBC_glibc=y
 # CT_LIBC_musl is not set
 # CT_LIBC_uClibc is not set
@@ -309,9 +309,9 @@ CT_THREADS="nptl"
 # CT_LIBC_GLIBC_V_2_14_1 is not set
 # CT_LIBC_GLIBC_V_2_14 is not set
 # CT_LIBC_GLIBC_V_2_13 is not set
-CT_LIBC_GLIBC_V_2_12_2=y
+# CT_LIBC_GLIBC_V_2_12_2 is not set
 # CT_LIBC_GLIBC_V_2_12_1 is not set
-# CT_LIBC_GLIBC_V_2_11_1 is not set
+CT_LIBC_GLIBC_V_2_11_1=y
 # CT_LIBC_GLIBC_V_2_11 is not set
 # CT_LIBC_GLIBC_V_2_10_1 is not set
 # CT_LIBC_GLIBC_V_2_9 is not set
diff --git a/src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.12.2/001-Use-.machine-to-prevent-AS-from-complaining-about-z9.patch b/src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.11.1/001-Use-.machine-to-prevent-AS-from-complaining-about-z9.patch
similarity index 100%
rename from src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.12.2/001-Use-.machine-to-prevent-AS-from-complaining-about-z9.patch
rename to src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.11.1/001-Use-.machine-to-prevent-AS-from-complaining-about-z9.patch
diff --git a/src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.12.2/002-newer-gcc.patch b/src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.11.1/002-newer-gcc.patch
similarity index 100%
rename from src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.12.2/002-newer-gcc.patch
rename to src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.11.1/002-newer-gcc.patch
diff --git a/src/ci/docker/host-x86_64/dist-s390x-linux/s390x-linux-gnu.config b/src/ci/docker/host-x86_64/dist-s390x-linux/s390x-linux-gnu.config
index cd1c41b02e312..c9c141afad131 100644
--- a/src/ci/docker/host-x86_64/dist-s390x-linux/s390x-linux-gnu.config
+++ b/src/ci/docker/host-x86_64/dist-s390x-linux/s390x-linux-gnu.config
@@ -270,7 +270,7 @@ CT_BINUTILS_EXTRA_CONFIG_ARRAY=""
 # C-library
 #
 CT_LIBC="glibc"
-CT_LIBC_VERSION="2.12.2"
+CT_LIBC_VERSION="2.11.1"
 CT_LIBC_glibc=y
 # CT_LIBC_musl is not set
 # CT_LIBC_uClibc is not set
@@ -289,9 +289,9 @@ CT_THREADS="nptl"
 # CT_LIBC_GLIBC_V_2_14_1 is not set
 # CT_LIBC_GLIBC_V_2_14 is not set
 # CT_LIBC_GLIBC_V_2_13 is not set
-CT_LIBC_GLIBC_V_2_12_2=y
+# CT_LIBC_GLIBC_V_2_12_2 is not set
 # CT_LIBC_GLIBC_V_2_12_1 is not set
-# CT_LIBC_GLIBC_V_2_11_1 is not set
+CT_LIBC_GLIBC_V_2_11_1=y
 # CT_LIBC_GLIBC_V_2_11 is not set
 # CT_LIBC_GLIBC_V_2_10_1 is not set
 # CT_LIBC_GLIBC_V_2_9 is not set