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 8e52f1eaee0..76249d0b75c 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 233445d8f2c..ccf7d5af3d5 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 1c94bf70d13..172e56e81a8 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 384e328a6e6..d84b6bdb2cc 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 caadaee541a..f81ad699e07 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 89c8badd2af..a100e410f9a 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 c690a2e211b..7b9e232723c 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 550bbf5b9f6..036a91b2b92 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 dd3255a4ced..17296432e97 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 b5a0a703267..f7ec35b69a6 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 d28f9ed303d..53c5ea6fb3f 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 3e44e8f5fa6..aa9af966ea7 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 e78e3f7bd05..cb9423f9974 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 bdace1eaaf5..c91ea054789 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 6d6efc65b86..7585c4f6919 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 eb256542a45..0cdc6cc853c 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 303f747bd3e..b0bbb30bd16 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 4f0647f1976..a53f4aafdac 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 143cfa5262b..56ce2d32964 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 2b549a4e99c..068870a3158 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 15ed04e93a8..3894f0c8731 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 9b083866d33..d56c50a8006 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 7d1e6df477f..58b67f85a97 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 dcac7da43b9..b146eb87219 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 b083f686971..93e3cc5b3d7 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 e2d9d98cd56..674165e238a 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 1dac5efd757..fcb3d8ec4b4 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 b5a55298de9..07ee8883707 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 94feb50673e..f1d9fe2fd1a 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 d0e736262bd..0d1117deb06 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 f0012ee8b12..8587a88e6ca 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 57bfeea9db4..2914eaf19f8 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 97e068c7a12..631b1fb427e 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 d5298a02bfc..4647c62de2d 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 5003e2b3fec..2cc74b352a1 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 50f77bcdd56..4fedf210000 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 db300087386..b08f78c91f3 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 7ea6342114e..88e8649a765 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 36607ad6a74..4c69ceb140a 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 d35857acbb7..c4ece96b7bf 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 83834b82746..a1c27c6f793 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 f389cd6207c..360dd2068fc 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 10b67c75fd8..9e02364f2a1 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 a03d5866bcf..8646d758549 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 4e5e83f416a..be75d31e622 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 60980ee3f69..bc93457747f 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.