mirror of
https://github.com/containers/youki
synced 2024-11-23 01:11:58 +01:00
ff79c54968
* add cross configuration for musl Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com> * use cargo.sh wapper in build.sh Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com> * make tests build with musl Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com> * add targets to run musl tests Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com> * Use cargo.sh wrapper and cross in CI Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com> * Update scripts/cargo.sh Co-Authored-By: adrianalin <pop.adrian61@gmail.com> Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com> * Use glibc as cross default target --------- Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com> Co-authored-by: adrianalin <pop.adrian61@gmail.com>
33 lines
999 B
Docker
33 lines
999 B
Docker
ARG CROSS_BASE_IMAGE
|
|
FROM $CROSS_BASE_IMAGE
|
|
|
|
COPY --from=jorgeprendes420/apk-anywhere / /
|
|
ENV MARCH=${CROSS_CMAKE_SYSTEM_PROCESSOR}
|
|
RUN apk-init ${MARCH} ${CROSS_SYSROOT}
|
|
|
|
RUN apk-${MARCH} add \
|
|
# dependencies required to build libsecccomp-rs
|
|
libseccomp-static libseccomp-dev \
|
|
# dependencies required to build libbpf-sys
|
|
libelf-static elfutils-dev \
|
|
zlib-dev zlib-static \
|
|
# dependencies to build wasmedge-sys
|
|
g++ zstd-static
|
|
|
|
# configure libsecccomp-rs to use static linking
|
|
ENV LIBSECCOMP_LINK_TYPE="static"
|
|
ENV LIBSECCOMP_LIB_PATH="${CROSS_SYSROOT}/lib"
|
|
|
|
# configure wasmedge-sys to link stdc++ statically
|
|
ENV WASMEDGE_DEP_STDCXX_LINK_TYPE="static"
|
|
ENV WASMEDGE_DEP_STDCXX_LIB_PATH="${CROSS_SYSROOT}/lib"
|
|
|
|
# wasmedge-sys (through llvm) needs some symbols defined in libgcc
|
|
RUN mkdir /.cargo && cat <<'EOF' > /.cargo/config.toml
|
|
[target.'cfg(target_env = "musl")']
|
|
rustflags = ["-Clink-arg=-lgcc"]
|
|
EOF
|
|
|
|
RUN apt-get -y update && \
|
|
apt-get install -y pkg-config
|