Skip to content

Commit

Permalink
make sure to post-process all linux .so and symlinks for linux target
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Aug 28, 2023
1 parent f9b975a commit 5a11354
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions curl-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@
readonly _ref='CHANGES'

"${_STRIP}" --enable-deterministic-archives --strip-all "${_PP}/bin/curl${BIN_EXT}"
find "${_PP}/${DYN_DIR}" -type f -name "*${DYN_EXT}" -exec \
find "${_PP}/${DYN_DIR}" -type f -name "*${DYN_EXT}*" -a -not -name '*.dll.a' -exec \
"${_STRIP}" --enable-deterministic-archives --strip-all '{}' \;
"${_STRIP}" --enable-deterministic-archives --strip-debug "${_PP}"/lib/libcurl.a
# LLVM strip does not support implibs, but they are deterministic by default:
# error: unsupported object file format
[ "${_LD}" = 'ld' ] && [ "${_OS}" = 'win' ] && "${_STRIP}" --enable-deterministic-archives --strip-debug "${_PP}"/lib/libcurl.dll.a

../_clean-bin.sh "${_ref}" "${_PP}/bin/curl${BIN_EXT}"
find "${_PP}/${DYN_DIR}" -type f -name "*${DYN_EXT}" -exec \
find "${_PP}/${DYN_DIR}" -type f -name "*${DYN_EXT}*" -a -not -name '*.dll.a' -exec \
../_clean-bin.sh "${_ref}" '{}' \;

../_sign-code.sh "${_ref}" "${_PP}/bin/curl${BIN_EXT}"
find "${_PP}/${DYN_DIR}" -type f -name "*${DYN_EXT}" -exec \
find "${_PP}/${DYN_DIR}" -type f -name "*${DYN_EXT}*" -a -not -name '*.dll.a' -exec \
../_sign-code.sh "${_ref}" '{}' \;

touch -c -r "${_ref}" "${_PP}/bin/curl${BIN_EXT}"
touch -h -r "${_ref}" "${_PP}/${DYN_DIR}"/*"${DYN_EXT}"
touch -h -r "${_ref}" "${_PP}/${DYN_DIR}"/*"${DYN_EXT}"*
touch -c -r "${_ref}" "${_PP}"/lib/*.a

if [ "${CW_MAP}" = '1' ]; then
Expand All @@ -45,9 +45,9 @@

for f in \
"${_PP}/bin/curl${BIN_EXT}" \
"${_PP}/${DYN_DIR}"/*"${DYN_EXT}"; do
"${_PP}/${DYN_DIR}"/*"${DYN_EXT}"*; do

if [ ! -L "${f}" ]; then
if [ ! -L "${f}" ] && ! echo "${f}" | grep -a -q '\.dll\.a$'; then
if [ "${_OS}" = 'win' ]; then
TZ=UTC "${_OBJDUMP}" --all-headers "${f}" | grep -a -E -i "(file format|DLL Name|Time/Date)" | sort -r -f
# Dump 'DllCharacteristics' flags, e.g. HIGH_ENTROPY_VA, DYNAMIC_BASE, NX_COMPAT, GUARD_CF, TERMINAL_SERVICE_AWARE
Expand Down

0 comments on commit 5a11354

Please sign in to comment.