Skip to content

Commit

Permalink
libressl: try hiding asm symbols from libcurl dll
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Dec 10, 2023
1 parent 955f4fb commit 818d9ea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libressl-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@ _VER="$1"
rm -r -f "${_PKGDIR:?}" "${_BLDDIR:?}"

CFLAGS="-ffile-prefix-map=$(pwd)="
CPPFLAGS=''

if [ "${_CC}" = 'llvm' ]; then
CFLAGS+=' -Wa,--noexecstack'
else
CFLAGS+=' -Wno-attributes'
fi

if [ "${_OS}" = 'linux' ]; then
CPPFLAGS+=' -Dglobl=hidden'
elif [ "${_OS}" = 'mac' ]; then
CPPFLAGS+=' -Dglobl=private_extern'
fi

options=''
if [ "${CW_DEV_CMAKE_PREFILL:-}" = '1' ] && [ "${_OS}" = 'win' ]; then
# fast-track configuration
Expand Down Expand Up @@ -54,7 +61,7 @@ _VER="$1"
'-DBUILD_SHARED_LIBS=OFF' \
'-DLIBRESSL_APPS=OFF' \
'-DLIBRESSL_TESTS=OFF' \
"-DCMAKE_C_FLAGS=${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${CFLAGS} ${_LDFLAGS_GLOBAL}"
"-DCMAKE_C_FLAGS=${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${CFLAGS} ${CPPFLAGS} ${_LDFLAGS_GLOBAL}"

make --directory="${_BLDDIR}" --jobs="${_JOBS}" install "DESTDIR=$(pwd)/${_PKGDIR}"

Expand Down

0 comments on commit 818d9ea

Please sign in to comment.