From f55630ddd10c1b53cf46e0fb9a29e97099fc2e13 Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Sun, 25 Oct 2026 23:11:34 -0700 Subject: [PATCH] Regenerate artifacts. --- builds/cmake/install-cmake.sh | 17 +++++++++++++---- builds/cmake/install-presets.sh | 17 +++++++++++++---- builds/gnu/install-gnu.sh | 17 +++++++++++++---- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/builds/cmake/install-cmake.sh b/builds/cmake/install-cmake.sh index 34b20afd..cc702a91 100755 --- a/builds/cmake/install-cmake.sh +++ b/builds/cmake/install-cmake.sh @@ -65,6 +65,7 @@ # --build-use-local-src Use existing sources in relevant paths. # --prefix= Installation destination. # Default: /usr/local +# --hardware-optimized Inform compiler to apply applicable optimizations for the host hardware. # --noninteractive Disable any prompt using default. # --verbose Display verbose script output. # --help, -h Display usage, overriding script execution. @@ -142,6 +143,7 @@ main() (--build-parallel=*) PARALLEL="${OPTION#*=}";; (--build-use-local-src) BUILD_USE_LOCAL_SRC="yes";; (--prefix=*) PREFIX="${OPTION#*=}";; + (--hardware-optimized) HARDWARE_OPTIMIZED="yes";; (--noninteractive) NONINTERACTIVE="yes";; (--verbose) DISPLAY_VERBOSE="yes";; (--help|-h) DISPLAY_HELP="yes";; @@ -168,6 +170,7 @@ main() CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-parallel=*/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-use-local-src/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--prefix=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--hardware-optimized/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--noninteractive/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--verbose/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--help/}") @@ -384,6 +387,11 @@ main() msg_verbose "CXX using defined value '${CXX}'" fi + # HARDWARE_OPTIMIZED + if [[ "${HARDWARE_OPTIMIZED}" == "yes" ]]; then + ARCHTUNE="-march=native -mtune=native" + fi + # translate BUILD_CONFIG to ZFLAGS if [[ -n "${BUILD_CONFIG}" ]]; then msg_verbose "*** Build config specified, calculating flags..." @@ -395,20 +403,20 @@ main() fi if [[ -z "${CFLAGS}" ]]; then - export CFLAGS="${BUILD_FLAGS}" + export CFLAGS="${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "Exporting CFLAGS '${CFLAGS}'" else msg_verbose "CFLAGS initially '${CFLAGS}'" - export CFLAGS="${CFLAGS} ${BUILD_FLAGS}" + export CFLAGS="${CFLAGS} ${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "CFLAGS modified to '${CFLAGS}'" fi if [[ -z "${CXXFLAGS}" ]]; then - export CXXFLAGS="${BUILD_FLAGS}" + export CXXFLAGS="${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "Exporting CXXFLAGS '${CXXFLAGS}'" else msg_verbose "CXXFLAGS initially '${CXXFLAGS}'" - export CXXFLAGS="${CXXFLAGS} ${BUILD_FLAGS}" + export CXXFLAGS="${CXXFLAGS} ${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "CXXFLAGS modified to '${CXXFLAGS}'" fi fi @@ -1119,6 +1127,7 @@ help() msg "--build-use-local-src Use existing sources in relevant paths." msg "--prefix= Installation destination." msg " Default: /usr/local" + msg "--hardware-optimized Inform compiler to apply applicable optimizations for the host hardware." msg "--noninteractive Disable any prompt using default." msg "--verbose Display verbose script output." msg "--help, -h Display usage, overriding script execution." diff --git a/builds/cmake/install-presets.sh b/builds/cmake/install-presets.sh index 2222b887..dbe8ac51 100755 --- a/builds/cmake/install-presets.sh +++ b/builds/cmake/install-presets.sh @@ -55,6 +55,7 @@ # --build-parallel= Number of jobs to run simultaneously. # Default: supported platforms use nproc/sysctl # --build-use-local-src Use existing sources in relevant paths. +# --hardware-optimized Inform compiler to apply applicable optimizations for the host hardware. # --noninteractive Disable any prompt using default. # --verbose Display verbose script output. # --help, -h Display usage, overriding script execution. @@ -128,6 +129,7 @@ main() (--build-skip-tests) BUILD_SKIP_TESTS="yes";; (--build-parallel=*) PARALLEL="${OPTION#*=}";; (--build-use-local-src) BUILD_USE_LOCAL_SRC="yes";; + (--hardware-optimized) HARDWARE_OPTIMIZED="yes";; (--noninteractive) NONINTERACTIVE="yes";; (--verbose) DISPLAY_VERBOSE="yes";; (--help|-h) DISPLAY_HELP="yes";; @@ -150,6 +152,7 @@ main() CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-skip-tests/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-parallel=*/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-use-local-src/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--hardware-optimized/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--noninteractive/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--verbose/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--help/}") @@ -400,6 +403,11 @@ main() msg_verbose "CXX using defined value '${CXX}'" fi + # HARDWARE_OPTIMIZED + if [[ "${HARDWARE_OPTIMIZED}" == "yes" ]]; then + ARCHTUNE="-march=native -mtune=native" + fi + # translate BUILD_CONFIG to ZFLAGS if [[ -n "${BUILD_CONFIG}" ]]; then msg_verbose "*** Build config specified, calculating flags..." @@ -411,20 +419,20 @@ main() fi if [[ -z "${CFLAGS}" ]]; then - export CFLAGS="${BUILD_FLAGS}" + export CFLAGS="${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "Exporting CFLAGS '${CFLAGS}'" else msg_verbose "CFLAGS initially '${CFLAGS}'" - export CFLAGS="${CFLAGS} ${BUILD_FLAGS}" + export CFLAGS="${CFLAGS} ${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "CFLAGS modified to '${CFLAGS}'" fi if [[ -z "${CXXFLAGS}" ]]; then - export CXXFLAGS="${BUILD_FLAGS}" + export CXXFLAGS="${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "Exporting CXXFLAGS '${CXXFLAGS}'" else msg_verbose "CXXFLAGS initially '${CXXFLAGS}'" - export CXXFLAGS="${CXXFLAGS} ${BUILD_FLAGS}" + export CXXFLAGS="${CXXFLAGS} ${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "CXXFLAGS modified to '${CXXFLAGS}'" fi fi @@ -1187,6 +1195,7 @@ help() msg "--build-parallel= Number of jobs to run simultaneously." msg " Default: supported platforms use nproc/sysctl" msg "--build-use-local-src Use existing sources in relevant paths." + msg "--hardware-optimized Inform compiler to apply applicable optimizations for the host hardware." msg "--noninteractive Disable any prompt using default." msg "--verbose Display verbose script output." msg "--help, -h Display usage, overriding script execution." diff --git a/builds/gnu/install-gnu.sh b/builds/gnu/install-gnu.sh index b9254146..8f9a4837 100755 --- a/builds/gnu/install-gnu.sh +++ b/builds/gnu/install-gnu.sh @@ -66,6 +66,7 @@ # --build-use-local-src Use existing sources in relevant paths. # --prefix= Installation destination. # Default: /usr/local +# --hardware-optimized Inform compiler to apply applicable optimizations for the host hardware. # --noninteractive Disable any prompt using default. # --verbose Display verbose script output. # --help, -h Display usage, overriding script execution. @@ -144,6 +145,7 @@ main() (--build-parallel=*) PARALLEL="${OPTION#*=}";; (--build-use-local-src) BUILD_USE_LOCAL_SRC="yes";; (--prefix=*) PREFIX="${OPTION#*=}";; + (--hardware-optimized) HARDWARE_OPTIMIZED="yes";; (--noninteractive) NONINTERACTIVE="yes";; (--verbose) DISPLAY_VERBOSE="yes";; (--help|-h) DISPLAY_HELP="yes";; @@ -167,6 +169,7 @@ main() CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-parallel=*/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--build-use-local-src/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--prefix=*/}") + CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--hardware-optimized/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--noninteractive/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--verbose/}") CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/--help/}") @@ -389,6 +392,11 @@ main() msg_verbose "CXX using defined value '${CXX}'" fi + # HARDWARE_OPTIMIZED + if [[ "${HARDWARE_OPTIMIZED}" == "yes" ]]; then + ARCHTUNE="-march=native -mtune=native" + fi + # translate BUILD_CONFIG to ZFLAGS if [[ -n "${BUILD_CONFIG}" ]]; then msg_verbose "*** Build config specified, calculating flags..." @@ -400,20 +408,20 @@ main() fi if [[ -z "${CFLAGS}" ]]; then - export CFLAGS="${BUILD_FLAGS}" + export CFLAGS="${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "Exporting CFLAGS '${CFLAGS}'" else msg_verbose "CFLAGS initially '${CFLAGS}'" - export CFLAGS="${CFLAGS} ${BUILD_FLAGS}" + export CFLAGS="${CFLAGS} ${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "CFLAGS modified to '${CFLAGS}'" fi if [[ -z "${CXXFLAGS}" ]]; then - export CXXFLAGS="${BUILD_FLAGS}" + export CXXFLAGS="${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "Exporting CXXFLAGS '${CXXFLAGS}'" else msg_verbose "CXXFLAGS initially '${CXXFLAGS}'" - export CXXFLAGS="${CXXFLAGS} ${BUILD_FLAGS}" + export CXXFLAGS="${CXXFLAGS} ${ARCHTUNE} ${BUILD_FLAGS}" msg_verbose "CXXFLAGS modified to '${CXXFLAGS}'" fi fi @@ -1179,6 +1187,7 @@ help() msg "--build-use-local-src Use existing sources in relevant paths." msg "--prefix= Installation destination." msg " Default: /usr/local" + msg "--hardware-optimized Inform compiler to apply applicable optimizations for the host hardware." msg "--noninteractive Disable any prompt using default." msg "--verbose Display verbose script output." msg "--help, -h Display usage, overriding script execution."