Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add powerpc-musl images #46

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docker/Dockerfile.powerpc-unknown-linux-musl-cross
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive

COPY common.sh lib.sh /
RUN /common.sh

COPY cmake.sh /
RUN /cmake.sh

COPY musl.sh /
RUN /musl.sh TARGET=powerpc-linux-musl

COPY qemu.sh /
RUN /qemu.sh ppc softmmu

ENV CROSS_TOOLCHAIN_PREFIX=powerpc-linux-musl-
ENV CROSS_SYSROOT=/usr/local/powerpc-linux-musl
COPY musl-symlink.sh /
RUN /musl-symlink.sh $CROSS_SYSROOT powerpc

COPY qemu-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake

ENV CROSS_TARGET_RUNNER="/qemu-runner powerpc"
ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_MUSL_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_POWERPC_UNKNOWN_LINUX_MUSL_RUNNER="$CROSS_TARGET_RUNNER" \
AR_powerpc_unknown_linux_musl="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_powerpc_unknown_linux_musl="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_powerpc_unknown_linux_musl="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_powerpc_unknown_linux_musl=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_powerpc_unknown_linux_musl="--sysroot=$CROSS_SYSROOT" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
PKG_CONFIG_PATH="/usr/lib/powerpc-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}" \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=powerpc \
CROSS_CMAKE_CRT=musl \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC"
37 changes: 37 additions & 0 deletions docker/Dockerfile.powerpc-unknown-linux-muslsf-cross
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive

COPY common.sh lib.sh /
RUN /common.sh

COPY cmake.sh /
RUN /cmake.sh

COPY musl.sh /
RUN /musl.sh TARGET=powerpc-linux-muslsf

COPY qemu.sh /
RUN /qemu.sh ppc softmmu

ENV CROSS_TOOLCHAIN_PREFIX=powerpc-linux-musl-
ENV CROSS_SYSROOT=/usr/local/powerpc-linux-muslsf
COPY musl-symlink.sh /
RUN /musl-symlink.sh $CROSS_SYSROOT powerpc

COPY qemu-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake

ENV CROSS_TARGET_RUNNER="/qemu-runner powerpc"
ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_MUSL_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_POWERPC_UNKNOWN_LINUX_MUSL_RUNNER="$CROSS_TARGET_RUNNER" \
AR_powerpc_unknown_linux_musl="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_powerpc_unknown_linux_musl="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_powerpc_unknown_linux_musl="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_powerpc_unknown_linux_musl=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_powerpc_unknown_linux_musl="--sysroot=$CROSS_SYSROOT" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
PKG_CONFIG_PATH="/usr/lib/powerpc-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}" \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=powerpc \
CROSS_CMAKE_CRT=musl \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC"