Skip to content

Commit 9a3392e

Browse files
committed
Auto merge of #58416 - cuviper:dist-linux-gcc, r=alexcrichton
[CI] Update GCC in the dist-linux builders Upstream LLVM is planning to raise their minimum toolchain requirements, so they may start using C++14 features. This new policy has already landed in the form of a "soft" error. http://lists.llvm.org/pipermail/llvm-dev/2019-February/130117.html For GCC, they will require at least version 5.1. This PR moves our crosstool-ng builders to their max GCC 5.2, with a few small patches to fix compatibility. The dist-x86_64-linux builder is updated to GCC 5.5 and LLVM/Clang 8.0.0-rc2, which also affects dist-i686-linux sharing the same scripts. r? @alexcrichton
2 parents 8af675a + adb54c2 commit 9a3392e

File tree

19 files changed

+312
-111
lines changed

19 files changed

+312
-111
lines changed

src/ci/docker/README.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -131,36 +131,42 @@ $category > $option = $value -- $comment
131131
For targets: `arm-unknown-linux-gnueabi`
132132
133133
- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
134+
- Path and misc options > Patches origin = Bundled, then local
135+
- Path and misc options > Local patch directory = /tmp/patches
134136
- Target options > Target Architecture = arm
135137
- Target options > Architecture level = armv6 -- (+)
136138
- Target options > Floating point = software (no FPU) -- (\*)
137139
- Operating System > Target OS = linux
138140
- Operating System > Linux kernel version = 3.2.72 -- Precise kernel
139-
- C-library > glibc version = 2.14.1
140-
- C compiler > gcc version = 4.9.3
141+
- C-library > glibc version = 2.16.0
142+
- C compiler > gcc version = 5.2.0
141143
- C compiler > C++ = ENABLE -- to cross compile LLVM
142144
143145
### `arm-linux-gnueabihf.config`
144146
145147
For targets: `arm-unknown-linux-gnueabihf`
146148
147149
- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
150+
- Path and misc options > Patches origin = Bundled, then local
151+
- Path and misc options > Local patch directory = /tmp/patches
148152
- Target options > Target Architecture = arm
149153
- Target options > Architecture level = armv6 -- (+)
150154
- Target options > Use specific FPU = vfp -- (+)
151155
- Target options > Floating point = hardware (FPU) -- (\*)
152156
- Target options > Default instruction set mode = arm -- (+)
153157
- Operating System > Target OS = linux
154158
- Operating System > Linux kernel version = 3.2.72 -- Precise kernel
155-
- C-library > glibc version = 2.14.1
156-
- C compiler > gcc version = 4.9.3
159+
- C-library > glibc version = 2.16.0
160+
- C compiler > gcc version = 5.2.0
157161
- C compiler > C++ = ENABLE -- to cross compile LLVM
158162
159163
### `armv7-linux-gnueabihf.config`
160164
161165
For targets: `armv7-unknown-linux-gnueabihf`
162166
163167
- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
168+
- Path and misc options > Patches origin = Bundled, then local
169+
- Path and misc options > Local patch directory = /tmp/patches
164170
- Target options > Target Architecture = arm
165171
- Target options > Suffix to the arch-part = v7
166172
- Target options > Architecture level = armv7-a -- (+)
@@ -169,8 +175,8 @@ For targets: `armv7-unknown-linux-gnueabihf`
169175
- Target options > Default instruction set mode = thumb -- (\*)
170176
- Operating System > Target OS = linux
171177
- Operating System > Linux kernel version = 3.2.72 -- Precise kernel
172-
- C-library > glibc version = 2.14.1
173-
- C compiler > gcc version = 4.9.3
178+
- C-library > glibc version = 2.16.0
179+
- C compiler > gcc version = 5.2.0
174180
- C compiler > C++ = ENABLE -- to cross compile LLVM
175181
176182
(\*) These options have been selected to match the configuration of the arm
@@ -204,7 +210,7 @@ For targets: `powerpc-unknown-linux-gnu`
204210
- Operating System > Target OS = linux
205211
- Operating System > Linux kernel version = 2.6.32.68 -- ~RHEL6 kernel
206212
- C-library > glibc version = 2.12.2 -- ~RHEL6 glibc
207-
- C compiler > gcc version = 4.9.3
213+
- C compiler > gcc version = 5.2.0
208214
- C compiler > C++ = ENABLE -- to cross compile LLVM
209215
210216
### `powerpc64-linux-gnu.config`
@@ -221,7 +227,7 @@ For targets: `powerpc64-unknown-linux-gnu`
221227
- Operating System > Target OS = linux
222228
- Operating System > Linux kernel version = 2.6.32.68 -- ~RHEL6 kernel
223229
- C-library > glibc version = 2.12.2 -- ~RHEL6 glibc
224-
- C compiler > gcc version = 4.9.3
230+
- C compiler > gcc version = 5.2.0
225231
- C compiler > C++ = ENABLE -- to cross compile LLVM
226232
227233
(+) These CPU options match the configuration of the toolchains in RHEL6.
@@ -232,12 +238,12 @@ For targets: `s390x-unknown-linux-gnu`
232238
233239
- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
234240
- Path and misc options > Patches origin = Bundled, then local
235-
- Path and misc options > Local patch directory = /build/patches
241+
- Path and misc options > Local patch directory = /tmp/patches
236242
- Target options > Target Architecture = s390
237243
- Target options > Bitness = 64-bit
238244
- Operating System > Target OS = linux
239245
- Operating System > Linux kernel version = 2.6.32.68 -- ~RHEL6 kernel
240246
- C-library > glibc version = 2.12.2 -- ~RHEL6 glibc
241-
- C compiler > gcc version = 4.9.3
247+
- C compiler > gcc version = 5.2.0
242248
- C compiler > gcc extra config = --with-arch=z10 -- LLVM's minimum support
243249
- C compiler > C++ = ENABLE -- to cross compile LLVM

src/ci/docker/dist-arm-linux/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN sh /scripts/rustbuild-setup.sh
1616
USER rustbuild
1717
WORKDIR /tmp
1818

19+
COPY dist-arm-linux/patches/ /tmp/patches/
1920
COPY dist-arm-linux/arm-linux-gnueabi.config dist-arm-linux/build-toolchains.sh /tmp/
2021
RUN ./build-toolchains.sh
2122

src/ci/docker/dist-arm-linux/arm-linux-gnueabi.config

+13-13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Crosstool-NG Configuration
44
#
55
CT_CONFIGURE_has_make381=y
6+
CT_CONFIGURE_has_xz=y
67
CT_MODULES=y
78

89
#
@@ -44,14 +45,16 @@ CT_CONNECT_TIMEOUT=10
4445
# CT_FORCE_EXTRACT is not set
4546
CT_OVERIDE_CONFIG_GUESS_SUB=y
4647
# CT_ONLY_EXTRACT is not set
47-
CT_PATCH_BUNDLED=y
48+
# CT_PATCH_BUNDLED is not set
4849
# CT_PATCH_LOCAL is not set
49-
# CT_PATCH_BUNDLED_LOCAL is not set
50+
CT_PATCH_BUNDLED_LOCAL=y
5051
# CT_PATCH_LOCAL_BUNDLED is not set
5152
# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
5253
# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
5354
# CT_PATCH_NONE is not set
54-
CT_PATCH_ORDER="bundled"
55+
CT_PATCH_ORDER="bundled,local"
56+
CT_PATCH_USE_LOCAL=y
57+
CT_LOCAL_PATCH_DIR="/tmp/patches"
5558

5659
#
5760
# Build behavior
@@ -391,8 +394,8 @@ CT_CC_CORE_PASS_1_NEEDED=y
391394
CT_CC_CORE_PASS_2_NEEDED=y
392395
CT_CC_gcc=y
393396
# CT_CC_GCC_SHOW_LINARO is not set
394-
# CT_CC_GCC_V_5_2_0 is not set
395-
CT_CC_GCC_V_4_9_3=y
397+
CT_CC_GCC_V_5_2_0=y
398+
# CT_CC_GCC_V_4_9_3 is not set
396399
# CT_CC_GCC_V_4_8_5 is not set
397400
# CT_CC_GCC_V_4_7_4 is not set
398401
# CT_CC_GCC_V_4_6_4 is not set
@@ -407,8 +410,9 @@ CT_CC_GCC_4_5_or_later=y
407410
CT_CC_GCC_4_6_or_later=y
408411
CT_CC_GCC_4_7_or_later=y
409412
CT_CC_GCC_4_8_or_later=y
410-
CT_CC_GCC_4_9=y
411413
CT_CC_GCC_4_9_or_later=y
414+
CT_CC_GCC_5=y
415+
CT_CC_GCC_5_or_later=y
412416
CT_CC_GCC_HAS_GRAPHITE=y
413417
CT_CC_GCC_USE_GRAPHITE=y
414418
CT_CC_GCC_HAS_LTO=y
@@ -420,7 +424,7 @@ CT_CC_GCC_USE_GMP_MPFR=y
420424
CT_CC_GCC_USE_MPC=y
421425
CT_CC_GCC_HAS_LIBQUADMATH=y
422426
CT_CC_GCC_HAS_LIBSANITIZER=y
423-
CT_CC_GCC_VERSION="4.9.3"
427+
CT_CC_GCC_VERSION="5.2.0"
424428
# CT_CC_LANG_FORTRAN is not set
425429
CT_CC_GCC_ENABLE_CXX_FLAGS=""
426430
CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY=""
@@ -492,15 +496,13 @@ CT_GETTEXT_NEEDED=y
492496
CT_GMP_NEEDED=y
493497
CT_MPFR_NEEDED=y
494498
CT_ISL_NEEDED=y
495-
CT_CLOOG_NEEDED=y
496499
CT_MPC_NEEDED=y
497500
CT_COMPLIBS=y
498501
CT_LIBICONV=y
499502
CT_GETTEXT=y
500503
CT_GMP=y
501504
CT_MPFR=y
502505
CT_ISL=y
503-
CT_CLOOG=y
504506
CT_MPC=y
505507
CT_LIBICONV_V_1_14=y
506508
CT_LIBICONV_VERSION="1.14"
@@ -526,15 +528,13 @@ CT_MPFR_V_3_1_3=y
526528
# CT_MPFR_V_2_4_0 is not set
527529
CT_MPFR_VERSION="3.1.3"
528530
CT_ISL_V_0_14=y
531+
# CT_ISL_V_0_12_2 is not set
529532
CT_ISL_V_0_14_or_later=y
530533
CT_ISL_V_0_12_or_later=y
531534
CT_ISL_VERSION="0.14"
532-
CT_CLOOG_V_0_18_4=y
535+
# CT_CLOOG_V_0_18_4 is not set
533536
# CT_CLOOG_V_0_18_1 is not set
534537
# CT_CLOOG_V_0_18_0 is not set
535-
CT_CLOOG_VERSION="0.18.4"
536-
CT_CLOOG_0_18_4_or_later=y
537-
CT_CLOOG_0_18_or_later=y
538538
CT_MPC_V_1_0_3=y
539539
# CT_MPC_V_1_0_2 is not set
540540
# CT_MPC_V_1_0_1 is not set
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
commit bdb24c2851fd5f0ad9b82d7ea1db911d334b02d2
2+
Author: Joseph Myers <[email protected]>
3+
Date: Tue May 20 21:27:13 2014 +0000
4+
5+
Fix ARM build with GCC trunk.
6+
7+
sysdeps/unix/sysv/linux/arm/unwind-resume.c and
8+
sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static
9+
variables that are written in C code but only read from toplevel asms.
10+
Current GCC trunk now optimizes away such apparently write-only static
11+
variables, so causing a build failure. This patch marks those
12+
variables with __attribute_used__ to avoid that optimization.
13+
14+
Tested that this fixes the build for ARM.
15+
16+
* sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
17+
(libgcc_s_resume): Use __attribute_used__.
18+
* sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume):
19+
Likewise.
20+
21+
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
22+
index 29e2c2b00b04..e848bfeffdcb 100644
23+
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
24+
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
25+
@@ -22,7 +22,8 @@
26+
#include <pthreadP.h>
27+
28+
static void *libgcc_s_handle;
29+
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
30+
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
31+
+ __attribute_used__;
32+
static _Unwind_Reason_Code (*libgcc_s_personality)
33+
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
34+
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
35+
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
36+
index 285b99b5ed0d..48d00fc83641 100644
37+
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
38+
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
39+
@@ -20,7 +20,8 @@
40+
#include <stdio.h>
41+
#include <unwind.h>
42+
43+
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
44+
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
45+
+ __attribute_used__;
46+
static _Unwind_Reason_Code (*libgcc_s_personality)
47+
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
48+

src/ci/docker/dist-armhf-linux/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN sh /scripts/rustbuild-setup.sh
1616
USER rustbuild
1717
WORKDIR /tmp
1818

19+
COPY dist-armhf-linux/patches/ /tmp/patches/
1920
COPY dist-armhf-linux/arm-linux-gnueabihf.config dist-armhf-linux/build-toolchains.sh /tmp/
2021
RUN ./build-toolchains.sh
2122

src/ci/docker/dist-armhf-linux/arm-linux-gnueabihf.config

+13-13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Crosstool-NG Configuration
44
#
55
CT_CONFIGURE_has_make381=y
6+
CT_CONFIGURE_has_xz=y
67
CT_MODULES=y
78

89
#
@@ -44,14 +45,16 @@ CT_CONNECT_TIMEOUT=10
4445
# CT_FORCE_EXTRACT is not set
4546
CT_OVERIDE_CONFIG_GUESS_SUB=y
4647
# CT_ONLY_EXTRACT is not set
47-
CT_PATCH_BUNDLED=y
48+
# CT_PATCH_BUNDLED is not set
4849
# CT_PATCH_LOCAL is not set
49-
# CT_PATCH_BUNDLED_LOCAL is not set
50+
CT_PATCH_BUNDLED_LOCAL=y
5051
# CT_PATCH_LOCAL_BUNDLED is not set
5152
# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
5253
# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
5354
# CT_PATCH_NONE is not set
54-
CT_PATCH_ORDER="bundled"
55+
CT_PATCH_ORDER="bundled,local"
56+
CT_PATCH_USE_LOCAL=y
57+
CT_LOCAL_PATCH_DIR="/tmp/patches"
5558

5659
#
5760
# Build behavior
@@ -392,8 +395,8 @@ CT_CC_CORE_PASS_1_NEEDED=y
392395
CT_CC_CORE_PASS_2_NEEDED=y
393396
CT_CC_gcc=y
394397
# CT_CC_GCC_SHOW_LINARO is not set
395-
# CT_CC_GCC_V_5_2_0 is not set
396-
CT_CC_GCC_V_4_9_3=y
398+
CT_CC_GCC_V_5_2_0=y
399+
# CT_CC_GCC_V_4_9_3 is not set
397400
# CT_CC_GCC_V_4_8_5 is not set
398401
# CT_CC_GCC_V_4_7_4 is not set
399402
# CT_CC_GCC_V_4_6_4 is not set
@@ -408,8 +411,9 @@ CT_CC_GCC_4_5_or_later=y
408411
CT_CC_GCC_4_6_or_later=y
409412
CT_CC_GCC_4_7_or_later=y
410413
CT_CC_GCC_4_8_or_later=y
411-
CT_CC_GCC_4_9=y
412414
CT_CC_GCC_4_9_or_later=y
415+
CT_CC_GCC_5=y
416+
CT_CC_GCC_5_or_later=y
413417
CT_CC_GCC_HAS_GRAPHITE=y
414418
CT_CC_GCC_USE_GRAPHITE=y
415419
CT_CC_GCC_HAS_LTO=y
@@ -421,7 +425,7 @@ CT_CC_GCC_USE_GMP_MPFR=y
421425
CT_CC_GCC_USE_MPC=y
422426
CT_CC_GCC_HAS_LIBQUADMATH=y
423427
CT_CC_GCC_HAS_LIBSANITIZER=y
424-
CT_CC_GCC_VERSION="4.9.3"
428+
CT_CC_GCC_VERSION="5.2.0"
425429
# CT_CC_LANG_FORTRAN is not set
426430
CT_CC_GCC_ENABLE_CXX_FLAGS=""
427431
CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY=""
@@ -493,15 +497,13 @@ CT_GETTEXT_NEEDED=y
493497
CT_GMP_NEEDED=y
494498
CT_MPFR_NEEDED=y
495499
CT_ISL_NEEDED=y
496-
CT_CLOOG_NEEDED=y
497500
CT_MPC_NEEDED=y
498501
CT_COMPLIBS=y
499502
CT_LIBICONV=y
500503
CT_GETTEXT=y
501504
CT_GMP=y
502505
CT_MPFR=y
503506
CT_ISL=y
504-
CT_CLOOG=y
505507
CT_MPC=y
506508
CT_LIBICONV_V_1_14=y
507509
CT_LIBICONV_VERSION="1.14"
@@ -527,15 +529,13 @@ CT_MPFR_V_3_1_3=y
527529
# CT_MPFR_V_2_4_0 is not set
528530
CT_MPFR_VERSION="3.1.3"
529531
CT_ISL_V_0_14=y
532+
# CT_ISL_V_0_12_2 is not set
530533
CT_ISL_V_0_14_or_later=y
531534
CT_ISL_V_0_12_or_later=y
532535
CT_ISL_VERSION="0.14"
533-
CT_CLOOG_V_0_18_4=y
536+
# CT_CLOOG_V_0_18_4 is not set
534537
# CT_CLOOG_V_0_18_1 is not set
535538
# CT_CLOOG_V_0_18_0 is not set
536-
CT_CLOOG_VERSION="0.18.4"
537-
CT_CLOOG_0_18_4_or_later=y
538-
CT_CLOOG_0_18_or_later=y
539539
CT_MPC_V_1_0_3=y
540540
# CT_MPC_V_1_0_2 is not set
541541
# CT_MPC_V_1_0_1 is not set
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
commit bdb24c2851fd5f0ad9b82d7ea1db911d334b02d2
2+
Author: Joseph Myers <[email protected]>
3+
Date: Tue May 20 21:27:13 2014 +0000
4+
5+
Fix ARM build with GCC trunk.
6+
7+
sysdeps/unix/sysv/linux/arm/unwind-resume.c and
8+
sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static
9+
variables that are written in C code but only read from toplevel asms.
10+
Current GCC trunk now optimizes away such apparently write-only static
11+
variables, so causing a build failure. This patch marks those
12+
variables with __attribute_used__ to avoid that optimization.
13+
14+
Tested that this fixes the build for ARM.
15+
16+
* sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
17+
(libgcc_s_resume): Use __attribute_used__.
18+
* sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume):
19+
Likewise.
20+
21+
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
22+
index 29e2c2b00b04..e848bfeffdcb 100644
23+
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
24+
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
25+
@@ -22,7 +22,8 @@
26+
#include <pthreadP.h>
27+
28+
static void *libgcc_s_handle;
29+
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
30+
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
31+
+ __attribute_used__;
32+
static _Unwind_Reason_Code (*libgcc_s_personality)
33+
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
34+
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
35+
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
36+
index 285b99b5ed0d..48d00fc83641 100644
37+
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
38+
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
39+
@@ -20,7 +20,8 @@
40+
#include <stdio.h>
41+
#include <unwind.h>
42+
43+
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
44+
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
45+
+ __attribute_used__;
46+
static _Unwind_Reason_Code (*libgcc_s_personality)
47+
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
48+

src/ci/docker/dist-armv7-linux/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN sh /scripts/rustbuild-setup.sh
1616
USER rustbuild
1717
WORKDIR /tmp
1818

19+
COPY dist-armv7-linux/patches/ /tmp/patches/
1920
COPY dist-armv7-linux/build-toolchains.sh dist-armv7-linux/armv7-linux-gnueabihf.config /tmp/
2021
RUN ./build-toolchains.sh
2122

0 commit comments

Comments
 (0)