From 7fef8e274dce4edbfe305cc307cfb5e3b750a64f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 8 Nov 2023 01:45:58 +0000 Subject: [PATCH] libressl-cmake.sh: simplify CPU config in next release [ci skip] Made possible by this upstream patch: https://github.com/libressl/portable/pull/938 https://github.com/libressl/portable/commit/88510a3f8f7a81c1ecd3cd981f0481776b7c2907 --- libressl-cmake.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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} \