diff --git a/libressl-cmake.sh b/libressl-cmake.sh index a1538ce0f..7374182a6 100755 --- a/libressl-cmake.sh +++ b/libressl-cmake.sh @@ -16,7 +16,11 @@ _VER="$1" rm -r -f "${_PKGDIR:?}" "${_BLDDIR:?}" - CFLAGS="-ffile-prefix-map=$(pwd)= -Wa,--noexecstack" + CFLAGS="-ffile-prefix-map=$(pwd)=" + + if [ "${_CC}" = 'llvm' ]; then + CFLAGS="${CFLAGS} -Wa,--noexecstack" + fi [ "${_CPU}" = 'x86' ] && cpu='x86' [ "${_CPU}" = 'x64' ] && cpu='x86_64' diff --git a/libressl.sh b/libressl.sh index 9316568e0..8f45e744c 100755 --- a/libressl.sh +++ b/libressl.sh @@ -18,14 +18,16 @@ _VER="$1" options="${_CONFIGURE_GLOBAL}" export CC="${_CC_GLOBAL}" - export CFLAGS="${_CFLAGS_GLOBAL} -O3 -Wa,--noexecstack" + export CFLAGS="${_CFLAGS_GLOBAL} -O3" export CPPFLAGS="${_CPPFLAGS_GLOBAL}" export LDFLAGS="${_LDFLAGS_GLOBAL} ${_LDFLAGS_GLOBAL_AUTOTOOLS}" export LIBS="${_LIBS_GLOBAL}" [ "${LIBRESSL_VER_}" = '3.8.1' ] && options="${options} --disable-asm" - if [ "${_CC}" = 'gcc' ]; then + if [ "${_CC}" = 'llvm' ]; then + CFLAGS="${CFLAGS} -Wa,--noexecstack" + else CFLAGS="${CFLAGS} -Wno-attributes" fi