File tree 2 files changed +17
-8
lines changed
2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
17
17
pkg-config
18
18
19
19
WORKDIR /build/
20
- COPY dist-x86_64-musl/build-musl.sh /build/
21
- RUN sh /build/build-musl.sh && rm -rf /build
20
+
21
+ COPY scripts/musl.sh /build/
22
+ # We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
23
+ RUN CC=gcc \
24
+ CFLAGS="-fPIC -Wa,-mrelax-relocations=no" \
25
+ CXX=g++ \
26
+ CXXFLAGS="-Wa,-mrelax-relocations=no" \
27
+ bash musl.sh x86_64 && rm -rf /build
22
28
23
29
COPY scripts/sccache.sh /scripts/
24
30
RUN sh /scripts/sccache.sh
Original file line number Diff line number Diff line change 11
11
12
12
set -ex
13
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"
14
+ TAG=$1
15
+ shift
17
16
18
17
MUSL=musl-1.1.17
19
18
curl https://www.musl-libc.org/releases/$MUSL .tar.gz | tar xzf -
20
19
cd $MUSL
21
- ./configure --prefix=/musl-x86_64 --disable-shared
20
+ ./configure --disable-shared -- prefix=/musl-$TAG $@
22
21
make -j10
23
22
make install
24
23
@@ -33,6 +32,10 @@ curl -L https://github.com/llvm-mirror/libunwind/archive/release_37.tar.gz | tar
33
32
mkdir libunwind-build
34
33
cd libunwind-build
35
34
cmake ../libunwind-release_37 -DLLVM_PATH=/build/llvm-release_37 \
36
- -DLIBUNWIND_ENABLE_SHARED=0
35
+ -DLIBUNWIND_ENABLE_SHARED=0 \
36
+ -DCMAKE_C_COMPILER=$CC \
37
+ -DCMAKE_CXX_COMPILER=$CXX \
38
+ -DCMAKE_C_FLAGS=" $CFLAGS " \
39
+ -DCMAKE_CXX_FLAGS=" $CXXFLAGS "
37
40
make -j10
38
- cp lib/libunwind.a /musl-x86_64 /lib
41
+ cp lib/libunwind.a /musl-$TAG /lib
You can’t perform that action at this time.
0 commit comments