From 5922df60c7515ee8c5db1c7a4b2a78d18cf07935 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 3 Jan 2021 13:59:48 +0100 Subject: [PATCH] xbps-src: make sure to apply FFLAGS properly like CFLAGS --- common/build-profiles/aarch64-musl.sh | 2 +- common/build-profiles/aarch64.sh | 2 +- common/build-profiles/armv6l-musl.sh | 2 +- common/build-profiles/armv6l.sh | 2 +- common/build-profiles/armv7l-musl.sh | 2 +- common/build-profiles/armv7l.sh | 2 +- common/build-profiles/i686-musl.sh | 2 +- common/build-profiles/i686.sh | 2 +- common/build-profiles/ppc-musl.sh | 2 +- common/build-profiles/ppc.sh | 2 +- common/build-profiles/ppc64-musl.sh | 2 +- common/build-profiles/ppc64.sh | 2 +- common/build-profiles/ppc64le-musl.sh | 2 +- common/build-profiles/ppc64le.sh | 2 +- common/build-profiles/ppcle-musl.sh | 2 +- common/build-profiles/ppcle.sh | 2 +- common/build-profiles/x86_64-musl.sh | 2 +- common/build-profiles/x86_64.sh | 2 +- common/cross-profiles/aarch64-musl.sh | 2 +- common/cross-profiles/aarch64.sh | 2 +- common/cross-profiles/armv5tel-musl.sh | 2 +- common/cross-profiles/armv5tel.sh | 2 +- common/cross-profiles/armv6l-musl.sh | 2 +- common/cross-profiles/armv6l.sh | 2 +- common/cross-profiles/armv7l-musl.sh | 2 +- common/cross-profiles/armv7l.sh | 2 +- common/cross-profiles/i686-musl.sh | 2 +- common/cross-profiles/i686.sh | 2 +- common/cross-profiles/mips-musl.sh | 2 +- common/cross-profiles/mipsel-musl.sh | 2 +- common/cross-profiles/mipselhf-musl.sh | 2 +- common/cross-profiles/mipshf-musl.sh | 2 +- common/cross-profiles/ppc-musl.sh | 2 +- common/cross-profiles/ppc.sh | 2 +- common/cross-profiles/ppc64-musl.sh | 2 +- common/cross-profiles/ppc64.sh | 2 +- common/cross-profiles/ppc64le-musl.sh | 2 +- common/cross-profiles/ppc64le.sh | 2 +- common/cross-profiles/ppcle-musl.sh | 2 +- common/cross-profiles/ppcle.sh | 2 +- common/cross-profiles/x86_64-musl.sh | 2 +- common/cross-profiles/x86_64.sh | 2 +- common/environment/configure/hardening.sh | 2 ++ common/xbps-src/shutils/chroot.sh | 2 +- common/xbps-src/shutils/common.sh | 10 ++++++---- etc/defaults.conf | 3 ++- 46 files changed, 53 insertions(+), 48 deletions(-) diff --git a/common/build-profiles/aarch64-musl.sh b/common/build-profiles/aarch64-musl.sh index 8e52f1eaee..76249d0b75 100644 --- a/common/build-profiles/aarch64-musl.sh +++ b/common/build-profiles/aarch64-musl.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-march=armv8-a" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="aarch64-unknown-linux-musl" XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/aarch64.sh b/common/build-profiles/aarch64.sh index 233445d8f2..ccf7d5af3d 100644 --- a/common/build-profiles/aarch64.sh +++ b/common/build-profiles/aarch64.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-march=armv8-a" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="aarch64-unknown-linux-gnu" XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/armv6l-musl.sh b/common/build-profiles/armv6l-musl.sh index 1c94bf70d1..172e56e81a 100644 --- a/common/build-profiles/armv6l-musl.sh +++ b/common/build-profiles/armv6l-musl.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="armv6l-linux-musleabihf" XBPS_RUST_TARGET="arm-unknown-linux-musleabihf" diff --git a/common/build-profiles/armv6l.sh b/common/build-profiles/armv6l.sh index 384e328a6e..d84b6bdb2c 100644 --- a/common/build-profiles/armv6l.sh +++ b/common/build-profiles/armv6l.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="armv6l-unknown-linux-gnueabihf" XBPS_RUST_TARGET="arm-unknown-linux-gnueabihf" diff --git a/common/build-profiles/armv7l-musl.sh b/common/build-profiles/armv7l-musl.sh index caadaee541..f81ad699e0 100644 --- a/common/build-profiles/armv7l-musl.sh +++ b/common/build-profiles/armv7l-musl.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard" XBPS_TARGET_CXXFLAGS="$XBPS_CXXFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="armv7l-linux-musleabihf" XBPS_RUST_TARGET="armv7-unknown-linux-musleabihf" diff --git a/common/build-profiles/armv7l.sh b/common/build-profiles/armv7l.sh index 89c8badd2a..a100e410f9 100644 --- a/common/build-profiles/armv7l.sh +++ b/common/build-profiles/armv7l.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="armv7l-unknown-linux-gnueabihf" XBPS_RUST_TARGET="armv7-unknown-linux-gnueabihf" diff --git a/common/build-profiles/i686-musl.sh b/common/build-profiles/i686-musl.sh index c690a2e211..7b9e232723 100644 --- a/common/build-profiles/i686-musl.sh +++ b/common/build-profiles/i686-musl.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mtune=i686" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="i686-pc-linux-musl" XBPS_RUST_TARGET="i686-unknown-linux-musl" diff --git a/common/build-profiles/i686.sh b/common/build-profiles/i686.sh index 550bbf5b9f..036a91b2b9 100644 --- a/common/build-profiles/i686.sh +++ b/common/build-profiles/i686.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mtune=i686" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="i686-pc-linux-gnu" XBPS_RUST_TARGET="i686-unknown-linux-gnu" diff --git a/common/build-profiles/ppc-musl.sh b/common/build-profiles/ppc-musl.sh index dd3255a4ce..17296432e9 100644 --- a/common/build-profiles/ppc-musl.sh +++ b/common/build-profiles/ppc-musl.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mtune=G4" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="powerpc-linux-musl" XBPS_RUST_TARGET="powerpc-unknown-linux-musl" diff --git a/common/build-profiles/ppc.sh b/common/build-profiles/ppc.sh index b5a0a70326..f7ec35b69a 100644 --- a/common/build-profiles/ppc.sh +++ b/common/build-profiles/ppc.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mtune=G4" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="powerpc-linux-gnu" XBPS_RUST_TARGET="powerpc-unknown-linux-gnu" diff --git a/common/build-profiles/ppc64-musl.sh b/common/build-profiles/ppc64-musl.sh index d28f9ed303..53c5ea6fb3 100644 --- a/common/build-profiles/ppc64-musl.sh +++ b/common/build-profiles/ppc64-musl.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mcpu=970 -mtune=power9" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="powerpc64-unknown-linux-musl" XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/ppc64.sh b/common/build-profiles/ppc64.sh index 3e44e8f5fa..aa9af966ea 100644 --- a/common/build-profiles/ppc64.sh +++ b/common/build-profiles/ppc64.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mcpu=970 -mtune=power9" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="powerpc64-unknown-linux-gnu" XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/ppc64le-musl.sh b/common/build-profiles/ppc64le-musl.sh index e78e3f7bd0..cb9423f997 100644 --- a/common/build-profiles/ppc64le-musl.sh +++ b/common/build-profiles/ppc64le-musl.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mtune=power9" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="powerpc64le-unknown-linux-musl" XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/ppc64le.sh b/common/build-profiles/ppc64le.sh index bdace1eaaf..c91ea05478 100644 --- a/common/build-profiles/ppc64le.sh +++ b/common/build-profiles/ppc64le.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mtune=power9" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="powerpc64le-unknown-linux-gnu" XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/ppcle-musl.sh b/common/build-profiles/ppcle-musl.sh index 6d6efc65b8..7585c4f691 100644 --- a/common/build-profiles/ppcle-musl.sh +++ b/common/build-profiles/ppcle-musl.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mcpu=power8 -mtune=power9" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="powerpcle-linux-musl" XBPS_RUST_TARGET="powerpcle-unknown-linux-musl" diff --git a/common/build-profiles/ppcle.sh b/common/build-profiles/ppcle.sh index eb256542a4..0cdc6cc853 100644 --- a/common/build-profiles/ppcle.sh +++ b/common/build-profiles/ppcle.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mcpu=power8 -mtune=power9" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="powerpcle-linux-gnu" XBPS_RUST_TARGET="powerpcle-unknown-linux-gnu" diff --git a/common/build-profiles/x86_64-musl.sh b/common/build-profiles/x86_64-musl.sh index 303f747bd3..b0bbb30bd1 100644 --- a/common/build-profiles/x86_64-musl.sh +++ b/common/build-profiles/x86_64-musl.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mtune=generic" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="x86_64-unknown-linux-musl" XBPS_RUST_TARGET="${XBPS_TRIPLET}" diff --git a/common/build-profiles/x86_64.sh b/common/build-profiles/x86_64.sh index 4f0647f197..a53f4aafda 100644 --- a/common/build-profiles/x86_64.sh +++ b/common/build-profiles/x86_64.sh @@ -1,5 +1,5 @@ XBPS_TARGET_CFLAGS="-mtune=generic" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" -XBPS_TARGET_FFLAGS="" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" XBPS_TRIPLET="x86_64-unknown-linux-gnu" XBPS_RUST_TARGET="${XBPS_TRIPLET}" diff --git a/common/cross-profiles/aarch64-musl.sh b/common/cross-profiles/aarch64-musl.sh index 143cfa5262..56ce2d3296 100644 --- a/common/cross-profiles/aarch64-musl.sh +++ b/common/cross-profiles/aarch64-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="aarch64" XBPS_CROSS_TRIPLET="aarch64-linux-musl" XBPS_CROSS_CFLAGS="-march=armv8-a" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="aarch64-unknown-linux-musl" diff --git a/common/cross-profiles/aarch64.sh b/common/cross-profiles/aarch64.sh index 2b549a4e99..068870a315 100644 --- a/common/cross-profiles/aarch64.sh +++ b/common/cross-profiles/aarch64.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="aarch64" XBPS_CROSS_TRIPLET="aarch64-linux-gnu" XBPS_CROSS_CFLAGS="-march=armv8-a" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="aarch64-unknown-linux-gnu" diff --git a/common/cross-profiles/armv5tel-musl.sh b/common/cross-profiles/armv5tel-musl.sh index 15ed04e93a..3894f0c873 100644 --- a/common/cross-profiles/armv5tel-musl.sh +++ b/common/cross-profiles/armv5tel-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="arm" XBPS_CROSS_TRIPLET="arm-linux-musleabi" XBPS_CROSS_CFLAGS="-march=armv5te -msoft-float -mfloat-abi=soft" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="arm-unknown-linux-musleabi" diff --git a/common/cross-profiles/armv5tel.sh b/common/cross-profiles/armv5tel.sh index 9b083866d3..d56c50a800 100644 --- a/common/cross-profiles/armv5tel.sh +++ b/common/cross-profiles/armv5tel.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="arm" XBPS_CROSS_TRIPLET="arm-linux-gnueabi" XBPS_CROSS_CFLAGS="-march=armv5te -msoft-float -mfloat-abi=soft" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="arm-unknown-linux-gnueabi" diff --git a/common/cross-profiles/armv6l-musl.sh b/common/cross-profiles/armv6l-musl.sh index 7d1e6df477..58b67f85a9 100644 --- a/common/cross-profiles/armv6l-musl.sh +++ b/common/cross-profiles/armv6l-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="arm" 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_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="arm-unknown-linux-musleabihf" diff --git a/common/cross-profiles/armv6l.sh b/common/cross-profiles/armv6l.sh index dcac7da43b..b146eb8721 100644 --- a/common/cross-profiles/armv6l.sh +++ b/common/cross-profiles/armv6l.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="arm" 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_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="arm-unknown-linux-gnueabihf" diff --git a/common/cross-profiles/armv7l-musl.sh b/common/cross-profiles/armv7l-musl.sh index b083f68697..93e3cc5b3d 100644 --- a/common/cross-profiles/armv7l-musl.sh +++ b/common/cross-profiles/armv7l-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="arm" 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_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="armv7-unknown-linux-musleabihf" diff --git a/common/cross-profiles/armv7l.sh b/common/cross-profiles/armv7l.sh index e2d9d98cd5..674165e238 100644 --- a/common/cross-profiles/armv7l.sh +++ b/common/cross-profiles/armv7l.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="arm" 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_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="armv7-unknown-linux-gnueabihf" diff --git a/common/cross-profiles/i686-musl.sh b/common/cross-profiles/i686-musl.sh index 1dac5efd75..fcb3d8ec4b 100644 --- a/common/cross-profiles/i686-musl.sh +++ b/common/cross-profiles/i686-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="i386" XBPS_CROSS_TRIPLET="i686-linux-musl" XBPS_CROSS_CFLAGS="-march=i686" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="i686-unknown-linux-musl" diff --git a/common/cross-profiles/i686.sh b/common/cross-profiles/i686.sh index b5a55298de..07ee888370 100644 --- a/common/cross-profiles/i686.sh +++ b/common/cross-profiles/i686.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="i386" XBPS_CROSS_TRIPLET="i686-pc-linux-gnu" XBPS_CROSS_CFLAGS="-march=i686" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="i686-unknown-linux-gnu" diff --git a/common/cross-profiles/mips-musl.sh b/common/cross-profiles/mips-musl.sh index 94feb50673..f1d9fe2fd1 100644 --- a/common/cross-profiles/mips-musl.sh +++ b/common/cross-profiles/mips-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="mips" XBPS_CROSS_TRIPLET="mips-linux-musl" XBPS_CROSS_CFLAGS="-mtune=mips32r2 -mabi=32 -msoft-float" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="mips-unknown-linux-musl" diff --git a/common/cross-profiles/mipsel-musl.sh b/common/cross-profiles/mipsel-musl.sh index d0e736262b..0d1117deb0 100644 --- a/common/cross-profiles/mipsel-musl.sh +++ b/common/cross-profiles/mipsel-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="mipsel" XBPS_CROSS_TRIPLET="mipsel-linux-musl" XBPS_CROSS_CFLAGS="-mtune=mips32r2 -mabi=32 -msoft-float" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="mipsel-unknown-linux-musl" diff --git a/common/cross-profiles/mipselhf-musl.sh b/common/cross-profiles/mipselhf-musl.sh index f0012ee8b1..8587a88e6c 100644 --- a/common/cross-profiles/mipselhf-musl.sh +++ b/common/cross-profiles/mipselhf-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="mipsel" XBPS_CROSS_TRIPLET="mipsel-linux-muslhf" XBPS_CROSS_CFLAGS="-mtune=mips32r2 -mabi=32 -mhard-float" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="mipsel-unknown-linux-musl" diff --git a/common/cross-profiles/mipshf-musl.sh b/common/cross-profiles/mipshf-musl.sh index 57bfeea9db..2914eaf19f 100644 --- a/common/cross-profiles/mipshf-musl.sh +++ b/common/cross-profiles/mipshf-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="mips" XBPS_CROSS_TRIPLET="mips-linux-muslhf" XBPS_CROSS_CFLAGS="-mtune=mips32r2 -mabi=32 -mhard-float" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="mips-unknown-linux-musl" diff --git a/common/cross-profiles/ppc-musl.sh b/common/cross-profiles/ppc-musl.sh index 97e068c7a1..631b1fb427 100644 --- a/common/cross-profiles/ppc-musl.sh +++ b/common/cross-profiles/ppc-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="ppc" XBPS_CROSS_TRIPLET="powerpc-linux-musl" XBPS_CROSS_CFLAGS="-mtune=G4" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="powerpc-unknown-linux-musl" diff --git a/common/cross-profiles/ppc.sh b/common/cross-profiles/ppc.sh index d5298a02bf..4647c62de2 100644 --- a/common/cross-profiles/ppc.sh +++ b/common/cross-profiles/ppc.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="ppc" XBPS_CROSS_TRIPLET="powerpc-linux-gnu" XBPS_CROSS_CFLAGS="-mtune=G4" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="powerpc-unknown-linux-gnu" diff --git a/common/cross-profiles/ppc64-musl.sh b/common/cross-profiles/ppc64-musl.sh index 5003e2b3fe..2cc74b352a 100644 --- a/common/cross-profiles/ppc64-musl.sh +++ b/common/cross-profiles/ppc64-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="ppc64" XBPS_CROSS_TRIPLET="powerpc64-linux-musl" XBPS_CROSS_CFLAGS="-mcpu=970 -mtune=power9" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="powerpc64-unknown-linux-musl" diff --git a/common/cross-profiles/ppc64.sh b/common/cross-profiles/ppc64.sh index 50f77bcdd5..4fedf21000 100644 --- a/common/cross-profiles/ppc64.sh +++ b/common/cross-profiles/ppc64.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="ppc64" XBPS_CROSS_TRIPLET="powerpc64-linux-gnu" XBPS_CROSS_CFLAGS="-mcpu=970 -mtune=power9" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="powerpc64-unknown-linux-gnu" diff --git a/common/cross-profiles/ppc64le-musl.sh b/common/cross-profiles/ppc64le-musl.sh index db30008738..b08f78c91f 100644 --- a/common/cross-profiles/ppc64le-musl.sh +++ b/common/cross-profiles/ppc64le-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="ppc64le" XBPS_CROSS_TRIPLET="powerpc64le-linux-musl" XBPS_CROSS_CFLAGS="-mtune=power9" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="powerpc64le-unknown-linux-musl" diff --git a/common/cross-profiles/ppc64le.sh b/common/cross-profiles/ppc64le.sh index 7ea6342114..88e8649a76 100644 --- a/common/cross-profiles/ppc64le.sh +++ b/common/cross-profiles/ppc64le.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="ppc64le" XBPS_CROSS_TRIPLET="powerpc64le-linux-gnu" XBPS_CROSS_CFLAGS="-mtune=power9" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="powerpc64le-unknown-linux-gnu" diff --git a/common/cross-profiles/ppcle-musl.sh b/common/cross-profiles/ppcle-musl.sh index 36607ad6a7..4c69ceb140 100644 --- a/common/cross-profiles/ppcle-musl.sh +++ b/common/cross-profiles/ppcle-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="ppc" XBPS_CROSS_TRIPLET="powerpcle-linux-musl" XBPS_CROSS_CFLAGS="-mcpu=power8 -mtune=power9" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="powerpcle-unknown-linux-musl" diff --git a/common/cross-profiles/ppcle.sh b/common/cross-profiles/ppcle.sh index d35857acbb..c4ece96b7b 100644 --- a/common/cross-profiles/ppcle.sh +++ b/common/cross-profiles/ppcle.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="ppc" XBPS_CROSS_TRIPLET="powerpcle-linux-gnu" XBPS_CROSS_CFLAGS="-mcpu=power8 -mtune=power9" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="powerpcle-unknown-linux-gnu" diff --git a/common/cross-profiles/x86_64-musl.sh b/common/cross-profiles/x86_64-musl.sh index 83834b8274..a1c27c6f79 100644 --- a/common/cross-profiles/x86_64-musl.sh +++ b/common/cross-profiles/x86_64-musl.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="x86_64" XBPS_CROSS_TRIPLET="x86_64-linux-musl" XBPS_CROSS_CFLAGS="-mtune=generic" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="x86_64-unknown-linux-musl" diff --git a/common/cross-profiles/x86_64.sh b/common/cross-profiles/x86_64.sh index f389cd6207..360dd2068f 100644 --- a/common/cross-profiles/x86_64.sh +++ b/common/cross-profiles/x86_64.sh @@ -5,6 +5,6 @@ XBPS_TARGET_QEMU_MACHINE="x86_64" XBPS_CROSS_TRIPLET="x86_64-linux-gnu" XBPS_CROSS_CFLAGS="-mtune=generic" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" -XBPS_CROSS_FFLAGS="" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" XBPS_CROSS_RUST_TARGET="x86_64-unknown-linux-gnu" diff --git a/common/environment/configure/hardening.sh b/common/environment/configure/hardening.sh index 10b67c75fd..9e02364f2a 100644 --- a/common/environment/configure/hardening.sh +++ b/common/environment/configure/hardening.sh @@ -19,10 +19,12 @@ if [ -z "$nopie" ]; then # Enable FORITFY_SOURCE=2 CFLAGS="-fstack-clash-protection -D_FORTIFY_SOURCE=2 ${CFLAGS}" CXXFLAGS="-fstack-clash-protection -D_FORTIFY_SOURCE=2 ${CXXFLAGS}" + FFLAGS="-fstack-clash-protection ${FFLAGS}" LDFLAGS="-Wl,-z,relro -Wl,-z,now ${LDFLAGS}" fi else CFLAGS="-fno-PIE ${CFLAGS}" CXXFLAGS="-fno-PIE ${CFLAGS}" + FFLAGS="-fno-PIE ${FFLAGS}" LDFLAGS="-no-pie ${LDFLAGS}" fi diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index a03d5866bc..8646d75854 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -69,7 +69,7 @@ $(grep -E '^XBPS_.*' "$XBPS_CONFIG_FILE") XBPS_MASTERDIR=/ XBPS_CFLAGS="$XBPS_CFLAGS" XBPS_CXXFLAGS="$XBPS_CXXFLAGS" -XBPS_FFLAGS="-fPIC -pipe" +XBPS_FFLAGS="$XBPS_FFLAGS" XBPS_CPPFLAGS="$XBPS_CPPFLAGS" XBPS_LDFLAGS="$XBPS_LDFLAGS" XBPS_HOSTDIR=/host diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 4e5e83f416..be75d31e62 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -342,7 +342,7 @@ setup_pkg() { if [ -n "$cross" ]; then source_file $XBPS_CROSSPFDIR/${cross}.sh - _vars="TARGET_MACHINE CROSS_TRIPLET CROSS_CFLAGS CROSS_CXXFLAGS TARGET_QEMU_MACHINE" + _vars="TARGET_MACHINE CROSS_TRIPLET CROSS_CFLAGS CROSS_CXXFLAGS CROSS_FFLAGS TARGET_QEMU_MACHINE" for f in ${_vars}; do eval val="\$XBPS_$f" if [ -z "$val" ]; then @@ -507,7 +507,7 @@ setup_pkg() { export CFLAGS="$XBPS_CFLAGS $XBPS_CROSS_CFLAGS $CFLAGS $dbgflags" export CXXFLAGS="$XBPS_CXXFLAGS $XBPS_CROSS_CXXFLAGS $CXXFLAGS $dbgflags" - export FFLAGS="$XBPS_FFLAGS $XBPS_CROSS_FFLAGS $FFLAGS" + export FFLAGS="$XBPS_FFLAGS $XBPS_CROSS_FFLAGS $FFLAGS $dbgflags" export CPPFLAGS="$XBPS_CPPFLAGS $XBPS_CROSS_CPPFLAGS $CPPFLAGS" export LDFLAGS="$XBPS_LDFLAGS $XBPS_CROSS_LDFLAGS $LDFLAGS" @@ -571,6 +571,7 @@ setup_pkg() { export CXXFLAGS_target="$CXXFLAGS" export CPPFLAGS_target="$CPPFLAGS" export LDFLAGS_target="$LDFLAGS" + export FFLAGS_target="$FFLAGS" # Host tools export CC_host="cc" export CXX_host="g++" @@ -591,6 +592,7 @@ setup_pkg() { export CXXFLAGS_host="$XBPS_CXXFLAGS" export CPPFLAGS_host="$XBPS_CPPFLAGS" export LDFLAGS_host="$XBPS_LDFLAGS" + export FFLAGS_host="$XBPS_FFLAGS" # Rust flags which are passed to rustc export RUSTFLAGS="$XBPS_CROSS_RUSTFLAGS" # Rust target, which differs from our triplets @@ -625,10 +627,10 @@ setup_pkg() { # Unset 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 - unset CFLAGS_target CXXFLAGS_target CPPFLAGS_target LDFLAGS_target + unset CFLAGS_target CXXFLAGS_target CPPFLAGS_target LDFLAGS_target FFLAGS_target unset CC_host CXX_host CPP_host GCC_host FC_host LD_host AR_host AS_host unset RANLIB_host STRIP_host OBJDUMP_host OBJCOPY_host NM_host READELF_host - unset CFLAGS_host CXXFLAGS_host CPPFLAGS_host LDFLAGS_host + unset CFLAGS_host CXXFLAGS_host CPPFLAGS_host LDFLAGS_host FFLAGS_host unset RUSTFLAGS fi diff --git a/etc/defaults.conf b/etc/defaults.conf index 60980ee3f6..bc93457747 100644 --- a/etc/defaults.conf +++ b/etc/defaults.conf @@ -25,11 +25,12 @@ #XBPS_INSTALL_ARGS="" # [OPTIONAL] -# Native Compilation/Preprocessor flags for C and C++. Additional settings +# Native Compilation/Preprocessor flags for C/C++/Fortran. Additional settings # for the target architecture are also declared in common/build-profiles/.sh. # XBPS_CFLAGS="-O2 -pipe" XBPS_CXXFLAGS="${XBPS_CFLAGS}" +XBPS_FFLAGS="${XBPS_CFLAGS}" # [OPTIONAL] # Linker flags passed to the compiler.