diff --git a/libressl-cmake.sh b/libressl-cmake.sh index 0d0bb5304..c86e660bc 100755 --- a/libressl-cmake.sh +++ b/libressl-cmake.sh @@ -37,12 +37,16 @@ _VER="$1" options+=' -DHAVE_SYS_TYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDDEF_H=1' fi - # We might prefer passing the triplet as-is, but as of LibreSSL v3.8.2, - # a triplet does not work in all cases due to the use of `STREQUAL`. - [ "${_CPU}" = 'x86' ] && cpu='x86' - [ "${_CPU}" = 'x64' ] && cpu='x86_64' - [ "${_CPU}" = 'a64' ] && cpu='aarch64' - [ "${_CPU}" = 'r64' ] && cpu='riscv64' + if [ "${LIBRESSL_VER_}" = '3.8.2' ]; then + # We might prefer passing the triplet as-is, but as of LibreSSL v3.8.2, + # a triplet does not work in all cases due to the use of `STREQUAL`. + [ "${_CPU}" = 'x86' ] && cpu='x86' + [ "${_CPU}" = 'x64' ] && cpu='x86_64' + [ "${_CPU}" = 'a64' ] && cpu='aarch64' + [ "${_CPU}" = 'r64' ] && cpu='riscv64' + else + cpu="${_TRIPLET}" + fi # shellcheck disable=SC2086 cmake -B "${_BLDDIR}" ${_CMAKE_GLOBAL} ${options} \