diff --git a/common/build-profiles/aarch64-musl.sh b/common/build-profiles/aarch64-musl.sh index bfa9a537326..795db9f870b 100644 --- a/common/build-profiles/aarch64-musl.sh +++ b/common/build-profiles/aarch64-musl.sh @@ -1,3 +1,4 @@ XBPS_TARGET_CFLAGS="-march=armv8-a" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" XBPS_TRIPLET="aarch64-unknown-linux-musl" diff --git a/common/build-profiles/aarch64.sh b/common/build-profiles/aarch64.sh index 2e7fe408b6d..0c4cd3dafba 100644 --- a/common/build-profiles/aarch64.sh +++ b/common/build-profiles/aarch64.sh @@ -1,3 +1,4 @@ XBPS_TARGET_CFLAGS="-march=armv8-a" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" XBPS_TRIPLET="aarch64-unknown-linux-gnu" diff --git a/common/build-profiles/armv6l-musl.sh b/common/build-profiles/armv6l-musl.sh index 7dcb03e3a49..f58452e44d0 100644 --- a/common/build-profiles/armv6l-musl.sh +++ b/common/build-profiles/armv6l-musl.sh @@ -1,3 +1,4 @@ XBPS_TARGET_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" XBPS_TRIPLET="armv6l-linux-musleabihf" diff --git a/common/build-profiles/armv6l.sh b/common/build-profiles/armv6l.sh index 873be80a375..a08c589d891 100644 --- a/common/build-profiles/armv6l.sh +++ b/common/build-profiles/armv6l.sh @@ -1,3 +1,4 @@ XBPS_TARGET_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" XBPS_TRIPLET="armv6l-unknown-linux-gnueabihf" diff --git a/common/build-profiles/armv7l-musl.sh b/common/build-profiles/armv7l-musl.sh index 107e2b6001b..a8fadb347a7 100644 --- a/common/build-profiles/armv7l-musl.sh +++ b/common/build-profiles/armv7l-musl.sh @@ -1,3 +1,4 @@ XBPS_TARGET_CFLAGS="-march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard" XBPS_TARGET_CXXFLAGS="$XBPS_CXXFLAGS" +XBPS_TARGET_FFLAGS="" XBPS_TRIPLET="armv7l-linux-musleabihf" diff --git a/common/build-profiles/armv7l.sh b/common/build-profiles/armv7l.sh index 87bed5995df..bde53ea67ce 100644 --- a/common/build-profiles/armv7l.sh +++ b/common/build-profiles/armv7l.sh @@ -1,3 +1,4 @@ XBPS_TARGET_CFLAGS="-march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" XBPS_TRIPLET="armv7l-unknown-linux-gnueabihf" diff --git a/common/build-profiles/i686-musl.sh b/common/build-profiles/i686-musl.sh index eff0c95ae7d..f3bf32cc506 100644 --- a/common/build-profiles/i686-musl.sh +++ b/common/build-profiles/i686-musl.sh @@ -1,3 +1,4 @@ XBPS_TARGET_CFLAGS="-mtune=i686" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" XBPS_TRIPLET="i686-pc-linux-musl" diff --git a/common/build-profiles/i686.sh b/common/build-profiles/i686.sh index 45a9117413b..ea38e8fa6e5 100644 --- a/common/build-profiles/i686.sh +++ b/common/build-profiles/i686.sh @@ -1,3 +1,4 @@ XBPS_TARGET_CFLAGS="-mtune=i686" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" XBPS_TRIPLET="i686-pc-linux-gnu" diff --git a/common/build-profiles/x86_64-musl.sh b/common/build-profiles/x86_64-musl.sh index 7f06682ceb2..7dbb0f5c4bf 100644 --- a/common/build-profiles/x86_64-musl.sh +++ b/common/build-profiles/x86_64-musl.sh @@ -1,3 +1,4 @@ XBPS_TARGET_CFLAGS="-mtune=generic" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" XBPS_TRIPLET="x86_64-unknown-linux-musl" diff --git a/common/build-profiles/x86_64.sh b/common/build-profiles/x86_64.sh index dee94e16947..ff9dd9902f2 100644 --- a/common/build-profiles/x86_64.sh +++ b/common/build-profiles/x86_64.sh @@ -1,3 +1,4 @@ XBPS_TARGET_CFLAGS="-mtune=generic" XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" XBPS_TRIPLET="x86_64-unknown-linux-gnu" diff --git a/common/cross-profiles/README b/common/cross-profiles/README index 0c52195b6b7..9069084a80f 100644 --- a/common/cross-profiles/README +++ b/common/cross-profiles/README @@ -8,6 +8,7 @@ A cross profile file must provide the following variables: - XBPS_CROSS_TRIPLET (the cross compiler triplet) - XBPS_CROSS_CFLAGS (C compiler flags for the cross compiler) - XBPS_CROSS_CXXFLAGS (C++ compiler flags for the cross compiler) + - XBPS_CROSS_FFLAGS (Fortran compiler flags for the cross compiler) - XBPS_CROSS_CPPFLAGS (Preprocessor flags for the cross compiler) - XBPS_CROSS_LDFLAGS (Linker flags for the cross compiler) diff --git a/common/cross-profiles/aarch64-musl.sh b/common/cross-profiles/aarch64-musl.sh index fda5ac09c63..d17a09b5ad2 100644 --- a/common/cross-profiles/aarch64-musl.sh +++ b/common/cross-profiles/aarch64-musl.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="aarch64-musl" XBPS_CROSS_TRIPLET="aarch64-linux-musl" XBPS_CROSS_CFLAGS="-march=armv8-a" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" diff --git a/common/cross-profiles/aarch64.sh b/common/cross-profiles/aarch64.sh index 42e0068d3b2..c4ab53f7884 100644 --- a/common/cross-profiles/aarch64.sh +++ b/common/cross-profiles/aarch64.sh @@ -6,3 +6,4 @@ XBPS_CFLAGS="-O2 -pipe" # XXX not yet supported: -fstack-protector-strong XBPS_CXXFLAGS="$XBPS_CFLAGS" XBPS_CROSS_CFLAGS="-march=armv8-a" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" diff --git a/common/cross-profiles/armv5tel-musl.sh b/common/cross-profiles/armv5tel-musl.sh index a238957968a..cd3020ffab4 100644 --- a/common/cross-profiles/armv5tel-musl.sh +++ b/common/cross-profiles/armv5tel-musl.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="armv5tel-musl" 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="" diff --git a/common/cross-profiles/armv5tel.sh b/common/cross-profiles/armv5tel.sh index d654ad93620..cb1e28a4b06 100644 --- a/common/cross-profiles/armv5tel.sh +++ b/common/cross-profiles/armv5tel.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="armv5tel" 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="" diff --git a/common/cross-profiles/armv6l-musl.sh b/common/cross-profiles/armv6l-musl.sh index ecb78479fbb..b03e7a8d548 100644 --- a/common/cross-profiles/armv6l-musl.sh +++ b/common/cross-profiles/armv6l-musl.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="armv6l-musl" 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="" diff --git a/common/cross-profiles/armv6l.sh b/common/cross-profiles/armv6l.sh index 9576d030d3e..8d52f97cd4a 100644 --- a/common/cross-profiles/armv6l.sh +++ b/common/cross-profiles/armv6l.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="armv6l" 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="" diff --git a/common/cross-profiles/armv7l-musl.sh b/common/cross-profiles/armv7l-musl.sh index bff5aba119c..3b88cd4bada 100644 --- a/common/cross-profiles/armv7l-musl.sh +++ b/common/cross-profiles/armv7l-musl.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="armv7l-musl" 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="" diff --git a/common/cross-profiles/armv7l.sh b/common/cross-profiles/armv7l.sh index d9d439dec36..8e8a378f1fe 100644 --- a/common/cross-profiles/armv7l.sh +++ b/common/cross-profiles/armv7l.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="armv7l" 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="" diff --git a/common/cross-profiles/i686-musl.sh b/common/cross-profiles/i686-musl.sh index 80a5e560d4f..e658725283c 100644 --- a/common/cross-profiles/i686-musl.sh +++ b/common/cross-profiles/i686-musl.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="i686-musl" XBPS_CROSS_TRIPLET="i686-linux-musl" XBPS_CROSS_CFLAGS="-march=i686" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" diff --git a/common/cross-profiles/i686.sh b/common/cross-profiles/i686.sh index c69e94448f4..9937694530a 100644 --- a/common/cross-profiles/i686.sh +++ b/common/cross-profiles/i686.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="i686" XBPS_CROSS_TRIPLET="i686-pc-linux-gnu" XBPS_CROSS_CFLAGS="-march=i686" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" diff --git a/common/cross-profiles/mips-musl.sh b/common/cross-profiles/mips-musl.sh index c20a6ac592d..7867721c38e 100644 --- a/common/cross-profiles/mips-musl.sh +++ b/common/cross-profiles/mips-musl.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="mips-musl" XBPS_CROSS_TRIPLET="mips-linux-musl" XBPS_CROSS_CFLAGS="-mtune=mips32r2 -mabi=32 -msoft-float" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" diff --git a/common/cross-profiles/mipsel-musl.sh b/common/cross-profiles/mipsel-musl.sh index 359b4fe7b09..5866c1f92a3 100644 --- a/common/cross-profiles/mipsel-musl.sh +++ b/common/cross-profiles/mipsel-musl.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="mipsel-musl" XBPS_CROSS_TRIPLET="mipsel-linux-musl" XBPS_CROSS_CFLAGS="-mtune=mips32r2 -mabi=32 -msoft-float" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" diff --git a/common/cross-profiles/mipselhf-musl.sh b/common/cross-profiles/mipselhf-musl.sh index c75451bc30b..5989669e949 100644 --- a/common/cross-profiles/mipselhf-musl.sh +++ b/common/cross-profiles/mipselhf-musl.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="mipselhf-musl" XBPS_CROSS_TRIPLET="mipsel-linux-muslhf" XBPS_CROSS_CFLAGS="-mtune=mips32r2 -mabi=32 -mhard-float" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" diff --git a/common/cross-profiles/x86_64-musl.sh b/common/cross-profiles/x86_64-musl.sh index 3ef9244250c..58df5faa296 100644 --- a/common/cross-profiles/x86_64-musl.sh +++ b/common/cross-profiles/x86_64-musl.sh @@ -4,3 +4,4 @@ XBPS_TARGET_MACHINE="x86_64-musl" XBPS_CROSS_TRIPLET="x86_64-linux-musl" XBPS_CROSS_CFLAGS="-mtune=generic" XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh index ab57f0fd208..915d06ead79 100644 --- a/common/environment/setup/sourcepkg.sh +++ b/common/environment/setup/sourcepkg.sh @@ -9,7 +9,7 @@ unset -v make_cmd make_build_args make_install_args make_build_target make_insta unset -v patch_args disable_parallel_build keep_libtool_archives unset -v reverts subpackages makedepends hostmakedepends depends restricted unset -v nopie build_options build_options_default bootstrap repository reverts -unset -v CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH +unset -v CFLAGS CXXFLAGS FFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH unset -v CC CXX CPP GCC LD AR AS RANLIB NM OBJDUMP OBJCOPY STRIP READELF # hooks/do-extract/00-distfiles diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index e15fce4a341..2f578143bbb 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -1,5 +1,7 @@ # vim: set ts=4 sw=4 et: +# FIXME: $XBPS_FFLAGS is not set when chroot_init() is run +# It is set in common/build-profiles/bootstrap.sh but lost somewhere? chroot_init() { XBPSSRC_CF=$XBPS_MASTERDIR/etc/xbps/xbps-src.conf @@ -15,9 +17,9 @@ _EOF XBPS_MASTERDIR=/ XBPS_CFLAGS="$XBPS_CFLAGS" XBPS_CXXFLAGS="$XBPS_CXXFLAGS" +XBPS_FFLAGS="-fPIC -pipe" XBPS_CPPFLAGS="$XBPS_CPPFLAGS" XBPS_LDFLAGS="$XBPS_LDFLAGS" -XBPS_FFLAGS="$XBPS_FFLAGS" XBPS_HOSTDIR=/host _EOF diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 0f140f03481..5a6b52379e3 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -219,7 +219,7 @@ setup_pkg() { basepkg=${pkg%-32bit} # Start with a sane environment - unset -v PKG_BUILD_OPTIONS XBPS_CROSS_CFLAGS XBPS_CROSS_CXXFLAGS XBPS_CROSS_CPPFLAGS XBPS_CROSS_LDFLAGS + unset -v PKG_BUILD_OPTIONS XBPS_CROSS_CFLAGS XBPS_CROSS_CXXFLAGS XBPS_CROSS_FFLAGS XBPS_CROSS_CPPFLAGS XBPS_CROSS_LDFLAGS unset -v subpackages run_depends build_depends host_build_depends unset_package_funcs @@ -249,7 +249,7 @@ setup_pkg() { else export XBPS_TARGET_MACHINE=${XBPS_ARCH:-$XBPS_MACHINE} - unset XBPS_CROSS_BASE XBPS_CROSS_LDFLAGS + unset XBPS_CROSS_BASE XBPS_CROSS_LDFLAGS XBPS_CROSS_FFLAGS unset XBPS_CROSS_CFLAGS XBPS_CROSS_CXXFLAGS XBPS_CROSS_CPPFLAGS XBPS_INSTALL_XCMD="$XBPS_INSTALL_CMD" @@ -380,9 +380,9 @@ setup_pkg() { export CFLAGS="$XBPS_TARGET_CFLAGS $XBPS_CFLAGS $XBPS_CROSS_CFLAGS $CFLAGS $dbgflags" export CXXFLAGS="$XBPS_TARGET_CXXFLAGS $XBPS_CXXFLAGS $XBPS_CROSS_CXXFLAGS $CXXFLAGS $dbgflags" + export FFLAGS="$XBPS_TARGET_FFLAGS $XBPS_FFLAGS $XBPS_CROSS_FFLAGS $FFLAGS" export CPPFLAGS="$XBPS_TARGET_CPPFLAGS $XBPS_CPPFLAGS $XBPS_CROSS_CPPFLAGS $CPPFLAGS" export LDFLAGS="$XBPS_TARGET_LDFLAGS $XBPS_LDFLAGS $XBPS_CROSS_LDFLAGS $LDFLAGS" - export FFLAGS="$XBPS_TARGET_FFLAGS $XBPS_FFLAGS $XBPS_CROSS_FFLAGS $FFLAGS" export BUILD_CC="cc" export BUILD_CFLAGS="$XBPS_CFLAGS" diff --git a/xbps-src b/xbps-src index a7858c6ee71..bc200b9fc34 100755 --- a/xbps-src +++ b/xbps-src @@ -566,8 +566,8 @@ export XBPS_SHUTILSDIR XBPS_CROSSPFDIR XBPS_TRIGGERSDIR \ XBPS_REPOSITORY XBPS_ALT_REPOSITORY XBPS_SRCDISTDIR XBPS_DIGEST_CMD \ XBPS_UHELPER_CMD XBPS_INSTALL_CMD XBPS_QUERY_CMD \ XBPS_RINDEX_CMD XBPS_RECONFIGURE_CMD XBPS_REMOVE_CMD \ - XBPS_CMPVER_CMD XBPS_FETCH_CMD XBPS_VERSION XBPS_APIVER \ - XBPS_BUILDSTYLEDIR XBPS_CPPFLAGS XBPS_CFLAGS XBPS_CXXFLAGS XBPS_LDFLAGS \ + XBPS_CMPVER_CMD XBPS_FETCH_CMD XBPS_VERSION XBPS_APIVER XBPS_BUILDSTYLEDIR \ + XBPS_CPPFLAGS XBPS_CFLAGS XBPS_CXXFLAGS XBPS_FFLAGS XBPS_LDFLAGS \ XBPS_MAKEJOBS XBPS_BUILD_FORCEMODE XBPS_USE_GIT_REVS XBPS_DEBUG_PKGS \ XBPS_CCACHE XBPS_DISTCC XBPS_DISTCC_HOSTS XBPS_SKIP_DEPS \ XBPS_SKIP_REMOTEREPOS XBPS_CROSS_BUILD XBPS_PKG_OPTIONS XBPS_CONFIG_FILE \