Skip to content

Commit

Permalink
Revert "_build.sh: apply mman.h hack to alpine+gcc"
Browse files Browse the repository at this point in the history
This reverts commit d2d78d5.
  • Loading branch information
vszakats committed Oct 10, 2023
1 parent f7c1ca1 commit 38381ec
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 38381ec

Please sign in to comment.