File tree Expand file tree Collapse file tree 7 files changed +85
-1
lines changed
host-x86_64/dist-loongarch64-linux Expand file tree Collapse file tree 7 files changed +85
-1
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,9 @@ jobs:
206
206
- name : dist-i686-linux
207
207
os : ubuntu-20.04-xl
208
208
env : {}
209
+ - name : dist-loongarch64-linux
210
+ os : ubuntu-20.04-8core-32gb
211
+ env : {}
209
212
- name : dist-mips-linux
210
213
os : ubuntu-20.04-xl
211
214
env : {}
Original file line number Diff line number Diff line change @@ -250,7 +250,23 @@ For targets: `i586-unknown-linux-gnu`
250
250
(\*) Compressed debug is enabled by default for gas (assembly) on Linux/x86 targets,
251
251
but that makes our `compiler_builtins` incompatible with binutils < 2.32.
252
252
253
- ### `mips-linux-gnu.config`
253
+ ### `loongarch64-linux-gnu.defconfig`
254
+
255
+ For targets: `loongarch64-unknown-linux-gnu`
256
+
257
+ - Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
258
+ - Path and misc options > Use a mirror = ENABLE
259
+ - Path and misc options > Base URL = https://ci-mirrors.rust-lang.org/rustc
260
+ - Target options > Target Architecture = loongarch
261
+ - Target options > Bitness = 64-bit
262
+ - Operating System > Target OS = linux
263
+ - Operating System > Linux kernel version = 5.19.16
264
+ - Binary utilities > Version of binutils = 2.40
265
+ - C-library > glibc version = 2.36
266
+ - C compiler > gcc version = 12.2.0
267
+ - C compiler > C++ = ENABLE -- to cross compile LLVM
268
+
269
+ ### `mips-linux-gnu.defconfig`
254
270
255
271
For targets: `mips-unknown-linux-gnu`
256
272
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:22.04
2
+
3
+ COPY scripts/cross-apt-packages.sh /scripts/
4
+ RUN sh /scripts/cross-apt-packages.sh
5
+
6
+ # The latest released version does not support LoongArch.
7
+ COPY scripts/crosstool-ng-git.sh /scripts/
8
+ RUN sh /scripts/crosstool-ng-git.sh
9
+
10
+ COPY scripts/rustbuild-setup.sh /scripts/
11
+ RUN sh /scripts/rustbuild-setup.sh
12
+ WORKDIR /tmp
13
+
14
+ COPY scripts/crosstool-ng-build.sh /scripts/
15
+ COPY host-x86_64/dist-loongarch64-linux/loongarch64-unknown-linux-gnu.defconfig /tmp/crosstool.defconfig
16
+ RUN /scripts/crosstool-ng-build.sh
17
+
18
+ COPY scripts/sccache.sh /scripts/
19
+ RUN sh /scripts/sccache.sh
20
+
21
+ ENV PATH=$PATH:/x-tools/loongarch64-unknown-linux-gnu/bin
22
+
23
+ ENV CC_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-gcc \
24
+ AR_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-ar \
25
+ CXX_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-g++
26
+
27
+ ENV HOSTS=loongarch64-unknown-linux-gnu
28
+
29
+ ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
30
+ ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
Original file line number Diff line number Diff line change
1
+ CT_CONFIG_VERSION="4"
2
+ CT_EXPERIMENTAL=y
3
+ CT_PREFIX_DIR="/x-tools/${CT_TARGET}"
4
+ CT_USE_MIRROR=y
5
+ CT_MIRROR_BASE_URL="https://ci-mirrors.rust-lang.org/rustc"
6
+ CT_ARCH_LOONGARCH=y
7
+ # CT_DEMULTILIB is not set
8
+ CT_ARCH_USE_MMU=y
9
+ CT_ARCH_ARCH="loongarch64"
10
+ CT_KERNEL_LINUX=y
11
+ CT_LINUX_V_5_19=y
12
+ CT_GLIBC_V_2_36=y
13
+ CT_CC_GCC_ENABLE_DEFAULT_PIE=y
14
+ CT_CC_LANG_CXX=y
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install
22
22
patch \
23
23
pkg-config \
24
24
python3 \
25
+ rsync \
25
26
sudo \
26
27
texinfo \
27
28
unzip \
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -ex
3
+
4
+ URL=https://github.com/crosstool-ng/crosstool-ng
5
+ REV=943364711a650d9b9e84c1b42c91cc0265b6ab5c
6
+
7
+ mkdir crosstool-ng
8
+ cd crosstool-ng
9
+ git init
10
+ git fetch --depth=1 ${URL} ${REV}
11
+ git reset --hard FETCH_HEAD
12
+ ./bootstrap
13
+ ./configure --prefix=/usr/local
14
+ make -j$( nproc)
15
+ make install
16
+ cd ..
17
+ rm -rf crosstool-ng
Original file line number Diff line number Diff line change @@ -354,6 +354,9 @@ jobs:
354
354
- name : dist-i686-linux
355
355
<< : *job-linux-xl
356
356
357
+ - name : dist-loongarch64-linux
358
+ << : *job-linux-8c
359
+
357
360
- name : dist-mips-linux
358
361
<< : *job-linux-xl
359
362
You can’t perform that action at this time.
0 commit comments