Skip to content

Commit 9b13e40

Browse files
committed
Build musl with -fPIC for all targets
1 parent abc1061 commit 9b13e40

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1818

1919
WORKDIR /build/
2020
COPY scripts/musl.sh /build/
21-
RUN CC=gcc CFLAGS="-m32 -fPIC -Wa,-mrelax-relocations=no" \
21+
RUN CC=gcc CFLAGS="-m32 -Wa,-mrelax-relocations=no" \
2222
CXX=g++ CXXFLAGS="-m32 -Wa,-mrelax-relocations=no" \
2323
bash musl.sh i686 --target=i686 && \
24-
CC=gcc CFLAGS="-march=pentium -m32 -fPIC -Wa,-mrelax-relocations=no" \
24+
CC=gcc CFLAGS="-march=pentium -m32 -Wa,-mrelax-relocations=no" \
2525
CXX=g++ CXXFLAGS="-march=pentium -m32 -Wa,-mrelax-relocations=no" \
2626
bash musl.sh i586 --target=i586 && \
2727
rm -rf /build

src/ci/docker/dist-various-1/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
8989
CFLAGS_armv5te_unknown_linux_gnueabi="-march=armv5te -marm -mfloat-abi=soft"
9090

9191
ENV RUST_CONFIGURE_ARGS \
92-
--enable-extended \
9392
--target=$TARGETS \
9493
--musl-root-arm=/musl-arm \
9594
--musl-root-armhf=/musl-armhf \

src/ci/docker/dist-x86_64-musl/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ WORKDIR /build/
2121
COPY scripts/musl.sh /build/
2222
# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
2323
RUN CC=gcc \
24-
CFLAGS="-fPIC -Wa,-mrelax-relocations=no" \
24+
CFLAGS="-Wa,-mrelax-relocations=no" \
2525
CXX=g++ \
2626
CXXFLAGS="-Wa,-mrelax-relocations=no" \
2727
bash musl.sh x86_64 && rm -rf /build

src/ci/docker/scripts/musl.sh

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ exit 1
3030
TAG=$1
3131
shift
3232

33+
export CFLAGS="-fPIC $CFLAGS"
34+
3335
MUSL=musl-1.1.18
3436

3537
# may have been downloaded in a previous run

0 commit comments

Comments
 (0)