File tree 5 files changed +64
-7
lines changed
src/ci/docker/host-x86_64
5 files changed +64
-7
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -ex
4
+
5
+ cd $1
6
+
7
+ # Setting up folders for GCC
8
+ git clone https://github.com/antoyo/gcc gcc-src
9
+ cd gcc-src
10
+ git checkout $( head -1 /scripts/libgccjit.version)
11
+
12
+ mkdir ../gcc-build ../gcc-install
13
+ cd ../gcc-build
14
+
15
+ # Building GCC.
16
+ ../gcc-src/configure \
17
+ --enable-host-shared \
18
+ --enable-languages=jit \
19
+ --enable-checking=release \
20
+ --disable-bootstrap \
21
+ --disable-multilib \
22
+ --prefix=$( pwd) /../gcc-install
23
+ make
24
+ make install
25
+
26
+ rm -rf ../gcc-src
Original file line number Diff line number Diff line change
1
+ cf9554126
Original file line number Diff line number Diff line change @@ -24,7 +24,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
24
24
xz-utils \
25
25
nodejs \
26
26
mingw-w64 \
27
- libgccjit-12-dev \
27
+ # libgccjit dependencies
28
+ flex \
29
+ libmpfr-dev \
30
+ libgmp-dev \
31
+ libmpc3 \
32
+ libmpc-dev \
28
33
&& rm -rf /var/lib/apt/lists/*
29
34
30
35
# Note: libgccjit needs to match the default gcc version for the linker to find it.
@@ -54,4 +59,10 @@ ENV RUST_CONFIGURE_ARGS \
54
59
55
60
COPY host-x86_64/x86_64-gnu-llvm-16/script.sh /tmp/
56
61
62
+ COPY host-x86_64/dist-x86_64-linux/libgccjit.version /scripts/
63
+ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/
64
+
65
+ RUN sh /scripts/build-gccjit.sh /scripts
66
+ RUN ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so
67
+
57
68
ENV SCRIPT /tmp/script.sh
Original file line number Diff line number Diff line change @@ -24,11 +24,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
24
24
xz-utils \
25
25
nodejs \
26
26
mingw-w64 \
27
- libgccjit-13-dev \
27
+ # libgccjit dependencies
28
+ flex \
29
+ libmpfr-dev \
30
+ libgmp-dev \
31
+ libmpc3 \
32
+ libmpc-dev \
28
33
&& rm -rf /var/lib/apt/lists/*
29
34
30
- # Note: libgccjit needs to match the default gcc version for the linker to find it.
31
-
32
35
# Install powershell (universal package) so we can test x.ps1 on Linux
33
36
RUN curl -sL "https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell_7.3.1-1.deb_amd64.deb" > powershell.deb && \
34
37
dpkg -i powershell.deb && \
@@ -51,4 +54,11 @@ ENV RUST_CONFIGURE_ARGS \
51
54
52
55
COPY host-x86_64/x86_64-gnu-llvm-16/script.sh /tmp/
53
56
57
+
58
+ COPY host-x86_64/dist-x86_64-linux/libgccjit.version /scripts/
59
+ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/
60
+
61
+ RUN sh /scripts/build-gccjit.sh /scripts
62
+ RUN ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so
63
+
54
64
ENV SCRIPT /tmp/script.sh
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
15
15
sudo \
16
16
xz-utils \
17
17
tidy \
18
- libgccjit-12-dev \
19
18
\
20
19
# Install dependencies for chromium browser
21
20
gconf-service \
@@ -57,13 +56,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
57
56
lsb-release \
58
57
xdg-utils \
59
58
wget \
59
+ # libgccjit dependencies
60
+ flex \
61
+ libmpfr-dev \
62
+ libgmp-dev \
63
+ libmpc3 \
64
+ libmpc-dev \
60
65
&& rm -rf /var/lib/apt/lists/*
61
66
62
67
COPY scripts/sccache.sh /scripts/
63
68
RUN sh /scripts/sccache.sh
64
69
65
- # Make `libgccjit.so` accessible.
66
- RUN ln -s /usr/lib/gcc/x86_64-linux-gnu/12/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so
67
70
# Fix rustc_codegen_gcc lto issues.
68
71
ENV GCC_EXEC_PREFIX="/usr/lib/gcc/"
69
72
@@ -92,6 +95,12 @@ ENV RUST_CONFIGURE_ARGS \
92
95
93
96
ENV HOST_TARGET x86_64-unknown-linux-gnu
94
97
98
+ COPY host-x86_64/dist-x86_64-linux/libgccjit.version /scripts/
99
+ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/
100
+
101
+ RUN sh /scripts/build-gccjit.sh /scripts
102
+ RUN ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so
103
+
95
104
ENV SCRIPT /tmp/checktools.sh ../x.py && \
96
105
NODE_PATH=`npm root -g` python3 ../x.py test tests/rustdoc-gui --stage 2 \
97
106
--test-args "'--no-sandbox --jobs 1'"
You can’t perform that action at this time.
0 commit comments