Skip to content
This repository was archived by the owner on Nov 21, 2018. It is now read-only.

Commit f7b7fa2

Browse files
authored
Merge pull request #109 from japaric/arm-musl
prepare for binary releases of std for arm-musl
2 parents a35c53e + c63a058 commit f7b7fa2

File tree

6 files changed

+1670
-0
lines changed

6 files changed

+1670
-0
lines changed

slaves/linux-cross/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ RUN /bin/bash build_toolchain_root.sh && \
5151
COPY linux-cross/build_toolchain.sh \
5252
linux-cross/aarch64-linux-gnu.config \
5353
linux-cross/arm-linux-gnueabi.config \
54+
linux-cross/arm-linux-musleabi.config \
5455
linux-cross/arm-linux-gnueabihf.config \
56+
linux-cross/arm-linux-musleabihf.config \
5557
linux-cross/mips-linux-musl.config \
5658
linux-cross/mipsel-linux-musl.config \
5759
linux-cross/armv7-linux-gnueabihf.config \
60+
linux-cross/armv7-linux-musleabihf.config \
5861
/build/
5962
USER rustbuild
6063

@@ -98,6 +101,11 @@ RUN /bin/bash build_toolchain.sh mipsel-linux-musl
98101
# for armv7 instead of for armv6 should make rustc (slightly) faster.
99102
RUN /bin/bash build_toolchain.sh armv7-linux-gnueabihf
100103

104+
# Build a bunch of toolchains for ARM musl targets
105+
RUN /bin/bash build_toolchain.sh arm-linux-musleabi
106+
RUN /bin/bash build_toolchain.sh arm-linux-musleabihf
107+
RUN /bin/bash build_toolchain.sh armv7-linux-musleabihf
108+
101109
USER root
102110

103111
# Rename all the compilers we just built into /usr/bin and also without
@@ -124,12 +132,27 @@ RUN bash /tmp/build_dragonfly_toolchain.sh
124132
COPY linux-cross/build_netbsd_toolchain.sh /tmp/
125133
RUN bash /tmp/build_netbsd_toolchain.sh
126134

135+
# Also build libunwind.a for the ARM musl targets
136+
COPY linux-cross/build-libunwind.sh \
137+
/build/
138+
RUN /bin/bash build-libunwind.sh arm-unknown-linux-musleabi
139+
RUN /bin/bash build-libunwind.sh arm-unknown-linux-musleabihf
140+
RUN /bin/bash build-libunwind.sh armv7-unknown-linux-musleabihf
127141

128142
# Instruct rustbuild to use the armv7-linux-gnueabihf toolchain instead of the
129143
# default arm-linux-gnueabihf one
130144
ENV AR_armv7_unknown_linux_gnueabihf=armv7-linux-gnueabihf-ar \
131145
CC_armv7_unknown_linux_gnueabihf=armv7-linux-gnueabihf-gcc \
132146
CXX_armv7_unknown_linux_gnueabihf=armv7-linux-gnueabihf-g++ \
147+
AR_arm_unknown_linux_musleabi=arm-linux-musleabi-ar \
148+
CC_arm_unknown_linux_musleabi=arm-linux-musleabi-gcc \
149+
CXX_arm_unknown_linux_musleabi=arm-linux-musleabi-g++ \
150+
AR_arm_unknown_linux_musleabihf=arm-linux-musleabihf-ar \
151+
CC_arm_unknown_linux_musleabihf=arm-linux-musleabihf-gcc \
152+
CXX_arm_unknown_linux_musleabihf=arm-linux-musleabihf-g++ \
153+
AR_armv7_unknown_linux_musleabihf=armv7-linux-musleabihf-ar \
154+
CC_armv7_unknown_linux_musleabihf=armv7-linux-musleabihf-gcc \
155+
CXX_armv7_unknown_linux_musleabihf=armv7-linux-musleabihf-g++ \
133156
AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-ar \
134157
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-gcc \
135158
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-g++ \

slaves/linux-cross/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,20 @@ For targets: `arm-unknown-linux-gnueabi`
8989
- C compiler > gcc version = 4.9.3
9090
- C compiler > C++ = ENABLE -- to cross compile LLVM
9191

92+
## `arm-linux-musleabi.config`
93+
94+
For targets: `arm-unknown-linux-musleabi`
95+
96+
- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
97+
- Target options > Target Architecture = arm
98+
- Target options > Architecture level = armv6 -- (+)
99+
- Target options > Floating point = software (no FPU) -- (\*)
100+
- Operating System > Target OS = linux
101+
- Operating System > Linux kernel version = 3.2.72 -- Precise kernel
102+
- C-library > C library = musl
103+
- C compiler > gcc version = 5.2.0
104+
- C compiler > C++ = ENABLE -- to cross compile LLVM
105+
92106
## `arm-linux-gnueabihf.config`
93107

94108
For targets: `arm-unknown-linux-gnueabihf`
@@ -105,6 +119,22 @@ For targets: `arm-unknown-linux-gnueabihf`
105119
- C compiler > gcc version = 4.9.3
106120
- C compiler > C++ = ENABLE -- to cross compile LLVM
107121

122+
## `arm-linux-musleabihf.config`
123+
124+
For targets: `arm-unknown-linux-musleabihf`
125+
126+
- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
127+
- Target options > Target Architecture = arm
128+
- Target options > Architecture level = armv6 -- (+)
129+
- Target options > Use specific FPU = vfp -- (+)
130+
- Target options > Floating point = hardware (FPU) -- (\*)
131+
- Target options > Default instruction set mode = arm -- (+)
132+
- Operating System > Target OS = linux
133+
- Operating System > Linux kernel version = 3.2.72 -- Precise kernel
134+
- C-library > C library = musl
135+
- C compiler > gcc version = 5.2.0
136+
- C compiler > C++ = ENABLE -- to cross compile LLVM
137+
108138
## `armv7-linux-gnueabihf.config`
109139

110140
For targets: `armv7-unknown-linux-gnueabihf`
@@ -128,6 +158,23 @@ For targets: `armv7-unknown-linux-gnueabihf`
128158
libraries like jemalloc. See the mk/cfg/arm(v7)-uknown-linux-gnueabi{,hf}.mk
129159
file in Rust's source code.
130160

161+
## `armv7-linux-musleabihf.config`
162+
163+
For targets: `armv7-unknown-linux-musleabihf`
164+
165+
- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
166+
- Target options > Target Architecture = arm
167+
- Target options > Suffix to the arch-part = v7
168+
- Target options > Architecture level = armv7-a -- (+)
169+
- Target options > Use specific FPU = vfpv3-d16 -- (\*)
170+
- Target options > Floating point = hardware (FPU) -- (\*)
171+
- Target options > Default instruction set mode = thumb -- (\*)
172+
- Operating System > Target OS = linux
173+
- Operating System > Linux kernel version = 3.2.72 -- Precise kernel
174+
- C-library > C library = musl
175+
- C compiler > gcc version = 5.2.0
176+
- C compiler > C++ = ENABLE -- to cross compile LLVM
177+
131178
## `aarch64-linux-gnu.config`
132179

133180
For targets: `aarch64-unknown-linux-gnu`

0 commit comments

Comments
 (0)