build-styles: add zig-build

We call this "zig-build" instead of just "zig" as this build-style
relies on usage of the zig build system. In the future, other build
systems such as meson may support zig code. Furthermore, the zig
build system may be used to build C/C++ code as well, not just zig.
This commit is contained in:
Isaac Freund 2021-11-11 11:24:26 +01:00 committed by Érico Nogueira Rolim
parent c9e79da765
commit 020e1aa54b
46 changed files with 133 additions and 0 deletions

View File

@ -998,6 +998,10 @@ configure arguments can be specified via `cross_*_configure_args` where `*` is `
additionally passed to both early and final `gcc`. You can also specify custom `CFLAGS`
and `LDFLAGS` for the libc as `cross_(glibc|musl)_(cflags|ldflags)`.
- `zig-build` For packages using [Zig](https://ziglang.org)'s build
system. Additional arguments may be passed to the `zig build` invocation using
`configure_args`.
For packages that use the Python module build method (`setup.py` or
[PEP 517](https://www.python.org/dev/peps/pep-0517/)), you can choose one of the following:

View File

@ -9,6 +9,8 @@ for a specific architecture:
- XBPS_CXXFLAGS (C++ compiler flags for the host compiler)
- XBPS_FFLAGS (Fortran compiler flags for the host compiler)
- XBPS_RUST_TARGET (the compiler triplet for usage by cargo)
- XBPS_ZIG_TARGET (the arch-os-abi target triplet for zig)
- XBPS_ZIG_CPU (the cpu/feature set for zig)
These properties are also set in a cross environment, but the compiler
flags are not added into the global flags. XBPS_RUST_TARGET is also

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="aarch64-unknown-linux-musl"
XBPS_RUST_TARGET="$XBPS_TRIPLET"
XBPS_ZIG_TARGET="aarch64-linux-musl"
XBPS_ZIG_CPU="baseline"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="aarch64-unknown-linux-gnu"
XBPS_RUST_TARGET="$XBPS_TRIPLET"
XBPS_ZIG_TARGET="aarch64-linux-gnu"
XBPS_ZIG_CPU="baseline"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="armv6l-linux-musleabihf"
XBPS_RUST_TARGET="arm-unknown-linux-musleabihf"
XBPS_ZIG_TARGET="arm-linux-musleabihf"
XBPS_ZIG_CPU="generic+v6"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="armv6l-unknown-linux-gnueabihf"
XBPS_RUST_TARGET="arm-unknown-linux-gnueabihf"
XBPS_ZIG_TARGET="arm-linux-gnueabihf"
XBPS_ZIG_CPU="generic+v6"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_CXXFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="armv7l-linux-musleabihf"
XBPS_RUST_TARGET="armv7-unknown-linux-musleabihf"
XBPS_ZIG_TARGET="arm-linux-musleabihf"
XBPS_ZIG_CPU="generic+v7a+vfp3"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="armv7l-unknown-linux-gnueabihf"
XBPS_RUST_TARGET="armv7-unknown-linux-gnueabihf"
XBPS_CROSS_ZIG_TARGET="arm-linux-gnueabihf"
XBPS_CROSS_ZIG_CPU="generic+v7a+vfp3"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="i686-linux-musl"
XBPS_RUST_TARGET="i686-unknown-linux-musl"
XBPS_ZIG_TARGET="i686-linux-musl"
XBPS_ZIG_CPU="baseline"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="i686-pc-linux-gnu"
XBPS_RUST_TARGET="i686-unknown-linux-gnu"
XBPS_ZIG_TARGET="i386-linux-gnu"
XBPS_ZIG_CPU="_i686+sse2"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="powerpc-linux-musl"
XBPS_RUST_TARGET="powerpc-unknown-linux-musl"
XBPS_ZIG_TARGET="powerpc-linux-musl"
XBPS_ZIG_CPU="baseline"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="powerpc-linux-gnu"
XBPS_RUST_TARGET="powerpc-unknown-linux-gnu"
XBPS_ZIG_TARGET="powerpc-linux-gnu"
XBPS_ZIG_CPU="baseline"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="powerpc64-unknown-linux-musl"
XBPS_RUST_TARGET="$XBPS_TRIPLET"
XBPS_ZIG_TARGET="powerpc64-linux-musl"
XBPS_ZIG_CPU="970"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="powerpc64-unknown-linux-gnu"
XBPS_RUST_TARGET="$XBPS_TRIPLET"
XBPS_ZIG_TARGET="powerpc64-linux-gnu"
XBPS_ZIG_CPU="970"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="powerpc64le-unknown-linux-musl"
XBPS_RUST_TARGET="$XBPS_TRIPLET"
XBPS_ZIG_TARGET="powerpc64le-linux-musl"
XBPS_ZIG_CPU="baseline"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="powerpc64le-unknown-linux-gnu"
XBPS_RUST_TARGET="$XBPS_TRIPLET"
XBPS_ZIG_TARGET="powerpc64le-linux-gnu"
XBPS_ZIG_CPU="baseline"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="powerpcle-linux-musl"
XBPS_RUST_TARGET="powerpcle-unknown-linux-musl"
XBPS_ZIG_TARGET="powerpcle-linux-musl"
XBPS_ZIG_CPU="pwr8"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="powerpcle-linux-gnu"
XBPS_RUST_TARGET="powerpcle-unknown-linux-gnu"
XBPS_ZIG_TARGET="powerpcle-linux-gnu"
XBPS_ZIG_CPU="pwr8"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="x86_64-unknown-linux-musl"
XBPS_RUST_TARGET="${XBPS_TRIPLET}"
XBPS_ZIG_TARGET="x86_64-linux-musl"
XBPS_ZIG_CPU="baseline"

View File

@ -3,3 +3,5 @@ XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS"
XBPS_TRIPLET="x86_64-unknown-linux-gnu"
XBPS_RUST_TARGET="${XBPS_TRIPLET}"
XBPS_ZIG_TARGET="x86_64-linux-gnu"
XBPS_ZIG_CPU="baseline"

View File

@ -0,0 +1,41 @@
do_build() {
local zig_target zig_cpu
# TODO: This duplication between build-profiles and cross-profiles
# is totally unnecessary. It would be nice if there was some way to
# avoid it.
if [ "$CROSS_BUILD" ]; then
zig_target="${XBPS_CROSS_ZIG_TARGET}"
zig_cpu="${XBPS_CROSS_ZIG_CPU}"
else
zig_target="${XBPS_ZIG_TARGET}"
zig_cpu="${XBPS_ZIG_CPU}"
fi
# Inform zig of the required libc include paths.
cat > xbps_zig_libc.txt <<-EOF
include_dir=${XBPS_CROSS_BASE}/usr/include
sys_include_dir=${XBPS_CROSS_BASE}/usr/include
crt_dir=${XBPS_CROSS_BASE}/usr/lib
msvc_lib_dir=
kernel32_lib_dir=
gcc_dir=
EOF
# The Zig build system only has a single install step, there is no
# way to build artifacts for a given prefix and then install those artifacts
# to that prefix at some later time. Therefore, we build and install to the zig-out
# directory and later copy the artifacts to the destdir in do_install().
# We use zig-out to avoid path conflicts as it is the default install
# prefix used by the zig build system.
DESTDIR="zig-out" zig build \
--sysroot "${XBPS_CROSS_BASE}" \
--libc xbps_zig_libc.txt \
-Dtarget="${zig_target}" -Dcpu="${zig_cpu}" \
-Drelease-safe --prefix /usr install \
${configure_args}
}
do_install() {
cp -r zig-out/* "${DESTDIR}"
}

View File

@ -13,5 +13,7 @@ A cross profile file must provide the following variables:
- XBPS_CROSS_LDFLAGS (Linker flags for the cross compiler)
- XBPS_CROSS_RUST_TARGET (the rust triplet for the rust cross compiler)
- XBPS_CROSS_RUSTFLAGS (rust compiler flags for the cross compiler)
- XBPS_CROSS_ZIG_TARGET (the arch-os-abi target triplet for zig)
- XBPS_CROSS_ZIG_CPU (the cpu/feature set for zig)
A source package matching `cross-${XBPS_CROSS_TRIPLET}' must also exist.

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="aarch64-unknown-linux-musl"
XBPS_CROSS_ZIG_TARGET="aarch64-linux-musl"
XBPS_CROSS_ZIG_CPU="baseline"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="aarch64-unknown-linux-gnu"
XBPS_CROSS_ZIG_TARGET="aarch64-linux-gnu"
XBPS_CROSS_ZIG_CPU="baseline"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="arm-unknown-linux-musleabi"
XBPS_CROSS_ZIG_TARGET="arm-linux-musleabi"
XBPS_CROSS_ZIG_CPU="generic+v5te+soft_float"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="arm-unknown-linux-gnueabi"
XBPS_CROSS_ZIG_TARGET="arm-linux-gnueabi"
XBPS_CROSS_ZIG_CPU="generic+v5te+soft_float"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="arm-unknown-linux-musleabihf"
XBPS_CROSS_ZIG_TARGET="arm-linux-musleabihf"
XBPS_CROSS_ZIG_CPU="generic+v6"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="arm-unknown-linux-gnueabihf"
XBPS_CROSS_ZIG_TARGET="arm-linux-gnueabihf"
XBPS_CROSS_ZIG_CPU="generic+v6"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="armv7-unknown-linux-musleabihf"
XBPS_CROSS_ZIG_TARGET="arm-linux-musleabihf"
XBPS_CROSS_ZIG_CPU="generic+v7a+vfp3"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="armv7-unknown-linux-gnueabihf"
XBPS_CROSS_ZIG_TARGET="arm-linux-gnueabihf"
XBPS_CROSS_ZIG_CPU="generic+v7a+vfp3"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="i686-unknown-linux-musl"
XBPS_CROSS_ZIG_TARGET="i686-linux-musl"
XBPS_CROSS_ZIG_CPU="baseline"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="i686-unknown-linux-gnu"
XBPS_CROSS_ZIG_TARGET="i386-linux-gnu"
XBPS_CROSS_ZIG_CPU="_i686+sse2"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="mips-unknown-linux-musl"
XBPS_CROSS_ZIG_TARGET="mips-linux-musl"
XBPS_CROSS_ZIG_CPU="generic+soft_float"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="mipsel-unknown-linux-musl"
XBPS_CROSS_ZIG_TARGET="mipsel-linux-musl"
XBPS_CROSS_ZIG_CPU="generic+soft_float"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="mipsel-unknown-linux-musl"
XBPS_CROSS_ZIG_TARGET="mipsel-linux-musl"
XBPS_CROSS_ZIG_CPU="generic"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="mips-unknown-linux-musl"
XBPS_CROSS_ZIG_TARGET="mips-linux-musl"
XBPS_CROSS_ZIG_CPU="generic"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="powerpc-unknown-linux-musl"
XBPS_ZIG_TARGET="powerpc-linux-musl"
XBPS_ZIG_CPU="baseline"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="powerpc-unknown-linux-gnu"
XBPS_ZIG_TARGET="powerpc-linux-gnu"
XBPS_ZIG_CPU="baseline"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="powerpc64-unknown-linux-musl"
XBPS_CROSS_ZIG_TARGET="powerpc64-linux-musl"
XBPS_CROSS_ZIG_CPU="970"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="powerpc64-unknown-linux-gnu"
XBPS_CROSS_ZIG_TARGET="powerpc64-linux-gnu"
XBPS_CROSS_ZIG_CPU="970"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="powerpc64le-unknown-linux-musl"
XBPS_CROSS_ZIG_TARGET="powerpc64le-linux-musl"
XBPS_CROSS_ZIG_CPU="baseline"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="powerpc64le-unknown-linux-gnu"
XBPS_CROSS_ZIG_TARGET="powerpc64le-linux-gnu"
XBPS_CROSS_ZIG_CPU="baseline"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="powerpcle-unknown-linux-musl"
XBPS_CROSS_ZIG_TARGET="powerpcle-linux-musl"
XBPS_CROSS_ZIG_CPU="pwr8"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="powerpcle-unknown-linux-gnu"
XBPS_CROSS_ZIG_TARGET="powerpcle-linux-gnu"
XBPS_CROSS_ZIG_CPU="pwr8"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="x86_64-unknown-linux-musl"
XBPS_CROSS_ZIG_TARGET="x86_64-linux-musl"
XBPS_CROSS_ZIG_CPU="baseline"

View File

@ -8,3 +8,5 @@ XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="x86_64-unknown-linux-gnu"
XBPS_CROSS_ZIG_TARGET="x86_64-linux-gnu"
XBPS_CROSS_ZIG_CPU="baseline"