Skip to content

Commit

Permalink
libressl-cmake.sh: simplify CPU config in next release [ci skip]
Browse files Browse the repository at this point in the history
Made possible by this upstream patch:
libressl/portable#938
libressl/portable@88510a3
  • Loading branch information
vszakats committed Nov 8, 2023
1 parent a34ccba commit 7fef8e2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions libressl-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down

0 comments on commit 7fef8e2

Please sign in to comment.