From 38381ec44f1399d37fe39d510674cac414111cbf Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 10 Oct 2023 23:49:56 +0000 Subject: [PATCH] Revert "_build.sh: apply mman.h hack to alpine+gcc" This reverts commit d2d78d58512ada7ca63e18867722fce922c76d12. --- _build.sh | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/_build.sh b/_build.sh index b4cc7726f..7208b708b 100755 --- a/_build.sh +++ b/_build.sh @@ -999,22 +999,17 @@ build_single_target() { _BINUTILS_SUFFIX="${_CCSUFFIX}" fi - if [ "${_CRT}" = 'musl' ]; then + if [ "${_CRT}" = 'musl' ] && [ "${_DISTRO}" = 'debian' ]; then if [ "${_OPENSSL}" = 'quictls' ] || \ [ "${_OPENSSL}" = 'openssl' ]; then - mman_hack=0 - [ "${_DISTRO}" = 'debian' ] && mman_hack=1 - [ "${_DISTRO}" = 'alpine' ] && [ "${_CC}" = 'gcc' ] && mman_hack=1 - if [ "${mman_hack}" = '1' ]; then - # Workaround for: - # ../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory - # Based on: https://github.com/openssl/openssl/issues/7207#issuecomment-880121450 - _my_incdir='_sys_include'; rm -r -f "${_my_incdir}"; mkdir "${_my_incdir}"; _my_incdir="$(pwd)/${_my_incdir}" - ln -s "/usr/include/${_TRIPLETSH}/asm" "${_my_incdir}/asm" - ln -s "/usr/include/asm-generic" "${_my_incdir}/asm-generic" - ln -s "/usr/include/linux" "${_my_incdir}/linux" - _CPPFLAGS_GLOBAL="${_CPPFLAGS_GLOBAL} -isystem ${_my_incdir}" - fi + # Workaround for: + # ../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory + # Based on: https://github.com/openssl/openssl/issues/7207#issuecomment-880121450 + _my_incdir='_sys_include'; rm -r -f "${_my_incdir}"; mkdir "${_my_incdir}"; _my_incdir="$(pwd)/${_my_incdir}" + ln -s "/usr/include/${_TRIPLETSH}/asm" "${_my_incdir}/asm" + ln -s "/usr/include/asm-generic" "${_my_incdir}/asm-generic" + ln -s "/usr/include/linux" "${_my_incdir}/linux" + _CPPFLAGS_GLOBAL="${_CPPFLAGS_GLOBAL} -isystem ${_my_incdir}" fi fi