cross-profiles: set XBPS_CROSS_RUST_FLAGS&XBPS_CROSS_RUST_TARGET

only added to platforms which support rust
This commit is contained in:
Rasmus Thomsen 2018-10-11 20:35:46 +02:00 committed by Enno Boland
parent 04e858dedd
commit 9141df9698
10 changed files with 23 additions and 0 deletions

View file

@ -5,3 +5,5 @@ XBPS_CROSS_TRIPLET="aarch64-linux-musl"
XBPS_CROSS_CFLAGS="-march=armv8-a"
XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS=""
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="aarch64-unknown-linux-musl"

View file

@ -7,3 +7,5 @@ XBPS_CXXFLAGS="$XBPS_CFLAGS"
XBPS_CROSS_CFLAGS="-march=armv8-a"
XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS=""
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="aarch64-unknown-linux-gnu"

View file

@ -5,3 +5,5 @@ XBPS_CROSS_TRIPLET="arm-linux-musleabihf"
XBPS_CROSS_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard"
XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS=""
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="arm-unknown-linux-musleabihf"

View file

@ -5,3 +5,5 @@ XBPS_CROSS_TRIPLET="arm-linux-gnueabihf"
XBPS_CROSS_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard"
XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS=""
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="arm-unknown-linux-gnueabihf"

View file

@ -5,3 +5,5 @@ XBPS_CROSS_TRIPLET="armv7l-linux-musleabihf"
XBPS_CROSS_CFLAGS="-march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard"
XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS=""
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="armv7-unknown-linux-musleabihf"

View file

@ -5,3 +5,5 @@ XBPS_CROSS_TRIPLET="armv7l-linux-gnueabihf"
XBPS_CROSS_CFLAGS="-march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard"
XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS=""
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="armv7-unknown-linux-gnueabihf"

View file

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

View file

@ -5,3 +5,5 @@ XBPS_CROSS_TRIPLET="i686-pc-linux-gnu"
XBPS_CROSS_CFLAGS="-march=i686"
XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS=""
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="i686-unknown-linux-gnu"

View file

@ -5,3 +5,5 @@ XBPS_CROSS_TRIPLET="x86_64-linux-musl"
XBPS_CROSS_CFLAGS="-mtune=generic"
XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS"
XBPS_CROSS_FFLAGS=""
XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr"
XBPS_CROSS_RUST_TARGET="${XBPS_CROSS_TRIPLET}"

View file

@ -522,6 +522,10 @@ setup_pkg() {
export CXXFLAGS_host="$XBPS_CXXFLAGS"
export CPPFLAGS_host="$XBPS_CPPFLAGS"
export LDFLAGS_host="$XBPS_LDFLAGS"
# Rust flags which are passed to rustc
export RUSTFLAGS="$XBPS_CROSS_RUSTFLAGS"
# Rust target, which differs from our triplets
export RUST_TARGET="$XBPS_CROSS_RUST_TARGET"
else
export CC="cc"
export CXX="g++"
@ -537,6 +541,7 @@ setup_pkg() {
export OBJCOPY="objcopy"
export NM="nm"
export READELF="readelf"
export RUST_TARGET="$XBPS_RUST_TARGET"
# Unse cross evironment variables
unset CC_target CXX_target CPP_target GCC_target FC_target LD_target AR_target AS_target
unset RANLIB_target STRIP_target OBJDUMP_target OBJCOPY_target NM_target READELF_target