Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions builds/cmake/install-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
# --build-use-local-src Use existing sources in relevant paths.
# --prefix=<path> 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.
Expand Down Expand Up @@ -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";;
Expand All @@ -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/}")
Expand Down Expand Up @@ -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..."
Expand All @@ -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
Expand Down Expand Up @@ -1119,6 +1127,7 @@ help()
msg "--build-use-local-src Use existing sources in relevant paths."
msg "--prefix=<path> 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."
Expand Down
17 changes: 13 additions & 4 deletions builds/cmake/install-presets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
# --build-parallel=<int> 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.
Expand Down Expand Up @@ -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";;
Expand All @@ -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/}")
Expand Down Expand Up @@ -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..."
Expand All @@ -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
Expand Down Expand Up @@ -1187,6 +1195,7 @@ help()
msg "--build-parallel=<int> 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."
Expand Down
17 changes: 13 additions & 4 deletions builds/gnu/install-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
# --build-use-local-src Use existing sources in relevant paths.
# --prefix=<path> 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.
Expand Down Expand Up @@ -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";;
Expand All @@ -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/}")
Expand Down Expand Up @@ -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..."
Expand All @@ -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
Expand Down Expand Up @@ -1179,6 +1187,7 @@ help()
msg "--build-use-local-src Use existing sources in relevant paths."
msg "--prefix=<path> 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."
Expand Down
Loading