From c119fadda319110f8a5901790b6d4cf8163dea67 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 8 Jan 2024 21:43:13 +0100 Subject: [PATCH] Use -Wl,-ld_classic linker flag on new macOS systems Signed-off-by: falkTX --- setup/env.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup/env.sh b/setup/env.sh index 7df7b97..1a2c485 100644 --- a/setup/env.sh +++ b/setup/env.sh @@ -185,6 +185,9 @@ if [ -z "${PAWPAW_SKIP_LTO}" ] || [ "${PAWPAW_SKIP_LTO}" -eq 0 ]; then fi if [ "${MACOS}" -eq 1 ]; then + if ld -v 2>&1 | grep -q ld-classic; then + LINK_FLAGS+=" -Wl,-ld_classic" + fi if [ -z "${PAWPAW_SKIP_STRIPPING}" ] || [ "${PAWPAW_SKIP_STRIPPING}" -eq 0 ]; then LINK_FLAGS+=" -Wl,-dead_strip,-dead_strip_dylibs,-x" fi