File tree 6 files changed +87
-22
lines changed
6 files changed +87
-22
lines changed Original file line number Diff line number Diff line change @@ -15,17 +15,18 @@ matrix:
15
15
- env : IMAGE=arm-android
16
16
- env : IMAGE=armhf-gnu
17
17
- env : IMAGE=cross DEPLOY=1
18
- - env : IMAGE=linux-tested-targets DEPLOY=1
19
18
- env : IMAGE=dist-android DEPLOY=1
20
19
- env : IMAGE=dist-arm-linux DEPLOY=1
21
20
- env : IMAGE=dist-armv7-aarch64-linux DEPLOY=1
22
21
- env : IMAGE=dist-freebsd DEPLOY=1
22
+ - env : IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
23
23
- env : IMAGE=dist-mips-linux DEPLOY=1
24
24
- env : IMAGE=dist-mips64-linux DEPLOY=1
25
25
- env : IMAGE=dist-powerpc-linux DEPLOY=1
26
26
- env : IMAGE=dist-powerpc64-linux DEPLOY=1
27
27
- env : IMAGE=dist-s390x-linux-netbsd DEPLOY=1
28
28
- env : IMAGE=dist-x86-linux DEPLOY=1
29
+ - env : IMAGE=dist-x86_64-musl DEPLOY=1
29
30
- env : IMAGE=emscripten
30
31
- env : IMAGE=i686-gnu
31
32
- env : IMAGE=i686-gnu-nopt
Original file line number Diff line number Diff line change @@ -30,25 +30,21 @@ RUN curl -o /usr/local/bin/sccache \
30
30
chmod +x /usr/local/bin/sccache
31
31
32
32
ENV RUST_CONFIGURE_ARGS \
33
- --target=x86_64-unknown-linux-musl,i686-unknown-linux-musl,i586-unknown-linux-gnu \
34
- --musl-root-x86_64=/musl-x86_64 \
33
+ --target=i686-unknown-linux-musl,i586-unknown-linux-gnu \
35
34
--musl-root-i686=/musl-i686
36
35
37
36
# Newer binutils broke things on some vms/distros (i.e., linking against
38
37
# unknown relocs disabled by the following flag), so we need to go out of our
39
38
# way to produce "super compatible" binaries.
40
39
#
41
40
# See: https://github.com/rust-lang/rust/issues/34978
42
- ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no \
43
- CFLAGS_x86_64_unknown_linux_musl=-Wa,-mrelax-relocations=no
41
+ ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
44
42
45
43
ENV SCRIPT \
46
44
python2.7 ../x.py test \
47
- --target x86_64-unknown-linux-musl \
48
45
--target i686-unknown-linux-musl \
49
46
--target i586-unknown-linux-gnu \
50
47
&& \
51
48
python2.7 ../x.py dist \
52
- --target x86_64-unknown-linux-musl \
53
49
--target i686-unknown-linux-musl \
54
50
--target i586-unknown-linux-gnu
Original file line number Diff line number Diff line change @@ -18,11 +18,6 @@ export CXXFLAGS="-Wa,-mrelax-relocations=no"
18
18
MUSL=musl-1.1.14
19
19
curl https://www.musl-libc.org/releases/$MUSL .tar.gz | tar xzf -
20
20
cd $MUSL
21
- ./configure --prefix=/musl-x86_64 --disable-shared
22
- make -j10
23
- make install
24
- make clean
25
- # for i686
26
21
CFLAGS=" $CFLAGS -m32" ./configure --prefix=/musl-i686 --disable-shared --target=i686
27
22
make -j10
28
23
make install
50
45
51
46
mkdir libunwind-build
52
47
cd libunwind-build
53
- cmake ../libunwind-release_37 -DLLVM_PATH=/build/llvm-release_37 \
54
- -DLIBUNWIND_ENABLE_SHARED=0
55
- make -j10
56
- cp lib/libunwind.a /musl-x86_64/lib
57
-
58
- # (Note: the next cmake call doesn't fully override the previous cached one, so remove the cached
59
- # configuration manually. IOW, if don't do this or call make clean we'll end up building libunwind
60
- # for x86_64 again)
61
- rm -rf *
62
- # for i686
63
48
CFLAGS=" $CFLAGS -m32" CXXFLAGS=" $CXXFLAGS -m32" cmake ../libunwind-release_37 \
64
49
-DLLVM_PATH=/build/llvm-release_37 \
65
50
-DLIBUNWIND_ENABLE_SHARED=0
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:16.04
2
+
3
+ RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ g++ \
5
+ make \
6
+ file \
7
+ curl \
8
+ ca-certificates \
9
+ python2.7 \
10
+ git \
11
+ cmake \
12
+ xz-utils \
13
+ sudo \
14
+ gdb \
15
+ patch \
16
+ libssl-dev \
17
+ pkg-config
18
+
19
+ WORKDIR /build/
20
+ COPY build-musl.sh /build/
21
+ RUN sh /build/build-musl.sh && rm -rf /build
22
+
23
+ RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
24
+ dpkg -i dumb-init_*.deb && \
25
+ rm dumb-init_*.deb
26
+ ENTRYPOINT ["/usr/bin/dumb-init" , "--" ]
27
+
28
+ RUN curl -o /usr/local/bin/sccache \
29
+ https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-02-25-sccache-x86_64-unknown-linux-musl && \
30
+ chmod +x /usr/local/bin/sccache
31
+
32
+ ENV RUST_CONFIGURE_ARGS \
33
+ --target=x86_64-unknown-linux-musl \
34
+ --musl-root-x86_64=/musl-x86_64
35
+
36
+ # Newer binutils broke things on some vms/distros (i.e., linking against
37
+ # unknown relocs disabled by the following flag), so we need to go out of our
38
+ # way to produce "super compatible" binaries.
39
+ #
40
+ # See: https://github.com/rust-lang/rust/issues/34978
41
+ ENV CFLAGS_x86_64_unknown_linux_musl=-Wa,-mrelax-relocations=no
42
+
43
+ ENV SCRIPT \
44
+ python2.7 ../x.py test --target x86_64-unknown-linux-musl && \
45
+ python2.7 ../x.py dist --target x86_64-unknown-linux-musl
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3
+ # file at the top-level directory of this distribution and at
4
+ # http://rust-lang.org/COPYRIGHT.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7
+ # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8
+ # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9
+ # option. This file may not be copied, modified, or distributed
10
+ # except according to those terms.
11
+
12
+ set -ex
13
+
14
+ # We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
15
+ export CFLAGS=" -fPIC -Wa,-mrelax-relocations=no"
16
+ export CXXFLAGS=" -Wa,-mrelax-relocations=no"
17
+
18
+ MUSL=musl-1.1.14
19
+ curl https://www.musl-libc.org/releases/$MUSL .tar.gz | tar xzf -
20
+ cd $MUSL
21
+ ./configure --prefix=/musl-x86_64 --disable-shared
22
+ make -j10
23
+ make install
24
+
25
+ cd ..
26
+ rm -rf $MUSL
27
+
28
+ # To build MUSL we're going to need a libunwind lying around, so acquire that
29
+ # here and build it.
30
+ curl -L https://github.com/llvm-mirror/llvm/archive/release_37.tar.gz | tar xzf -
31
+ curl -L https://github.com/llvm-mirror/libunwind/archive/release_37.tar.gz | tar xzf -
32
+
33
+ mkdir libunwind-build
34
+ cd libunwind-build
35
+ cmake ../libunwind-release_37 -DLLVM_PATH=/build/llvm-release_37 \
36
+ -DLIBUNWIND_ENABLE_SHARED=0
37
+ make -j10
38
+ cp lib/libunwind.a /musl-x86_64/lib
You can’t perform that action at this time.
0 commit comments