@@ -3,23 +3,46 @@ FROM ubuntu:22.04
33COPY scripts/cross-apt-packages.sh /scripts/
44RUN sh /scripts/cross-apt-packages.sh
55
6+ COPY scripts/crosstool-ng-git.sh /scripts/
7+ RUN sh /scripts/crosstool-ng-git.sh
8+
69COPY scripts/rustbuild-setup.sh /scripts/
710RUN sh /scripts/rustbuild-setup.sh
11+
812WORKDIR /tmp
913
14+ COPY scripts/crosstool-ng-build.sh /scripts/
15+ COPY host-x86_64/dist-powerpc64le-linux/powerpc64le-unknown-linux-musl.defconfig /tmp/crosstool.defconfig
16+ RUN /scripts/crosstool-ng-build.sh
17+
18+ WORKDIR /build
19+
1020RUN apt-get install -y --no-install-recommends rpm2cpio cpio
11- COPY host-x86_64/dist-powerpc64le-linux/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /tmp /
21+ COPY host-x86_64/dist-powerpc64le-linux/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /build /
1222RUN ./build-powerpc64le-toolchain.sh
1323
1424COPY scripts/sccache.sh /scripts/
1525RUN sh /scripts/sccache.sh
1626
27+ ENV PATH=$PATH:/x-tools/powerpc64le-unknown-linux-musl/bin
28+
1729ENV \
1830 AR_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-ar \
1931 CC_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-gcc \
20- CXX_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-g++
32+ CXX_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-g++ \
33+ AR_powerpc64le_unknown_linux_musl=powerpc64le-unknown-linux-musl-ar \
34+ CC_powerpc64le_unknown_linux_musl=powerpc64le-unknown-linux-musl-gcc \
35+ CXX_powerpc64le_unknown_linux_musl=powerpc64le-unknown-linux-musl-g++
36+
37+ ENV HOSTS=powerpc64le-unknown-linux-gnu,powerpc64le-unknown-linux-musl
2138
22- ENV HOSTS=powerpc64le-unknown-linux-gnu
39+ ENV RUST_CONFIGURE_ARGS \
40+ --enable-extended \
41+ --enable-full-tools \
42+ --enable-profiler \
43+ --enable-sanitizers \
44+ --disable-docs \
45+ --set target.powerpc64le-unknown-linux-musl.crt-static=false \
46+ --musl-root-powerpc64le=/x-tools/powerpc64le-unknown-linux-musl/powerpc64le-unknown-linux-musl/sysroot/usr
2347
24- ENV RUST_CONFIGURE_ARGS --enable-extended --enable-profiler --disable-docs
2548ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
0 commit comments