From f2ba02eee98d04b3e473393d2647201ed2549b30 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 7 Jan 2024 20:19:27 +0000 Subject: mold: fatal: cannot open loader_path/../Debug/firebird MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit follow the pattern seen in builds/posix/Makefile.in and only set the offending LINK_DARWIN_RPATH var if PLATFORM is DARWIN Change-Id: I98861d2c07ab60ba92d092143b5b24de29d6c1da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161775 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- external/firebird/UnpackedTarball_firebird.mk | 1 + external/firebird/mold.patch | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 external/firebird/mold.patch diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk index c7d9a881550c..b5e7c64f12f8 100644 --- a/external/firebird/UnpackedTarball_firebird.mk +++ b/external/firebird/UnpackedTarball_firebird.mk @@ -46,6 +46,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ external/firebird/configure-c99.patch \ external/firebird/Wincompatible-function-pointer-types.patch \ external/firebird/0001-Revert-Backported-fix-for-7122-Invalid-state-of-mapp.patch.1 \ + external/firebird/mold.patch \ )) ifeq ($(OS),WNT) diff --git a/external/firebird/mold.patch b/external/firebird/mold.patch new file mode 100644 index 000000000000..4e39f3f913ec --- /dev/null +++ b/external/firebird/mold.patch @@ -0,0 +1,17 @@ +--- builds/posix/Makefile.in.examples.before 2024-01-07 20:16:41.073172761 +0000 ++++ builds/posix/Makefile.in.examples 2024-01-07 20:17:23.768143528 +0000 +@@ -59,8 +59,13 @@ + #endif + GPRE_FLAGS= -m -z -n + +-LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(if $(subst intl,,$(1)),$(LIB),$(LIB)/../intl)) ++ifeq ($(PLATFORM),DARWIN) ++LIB_LINK_RPATH = + LINK_DARWIN_RPATH = -Wl,-rpath,@loader_path/../$(TARGET)/firebird ++else ++LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(if $(subst intl,,$(1)),$(LIB),$(LIB)/../intl)) ++LINK_DARWIN_RPATH = ++endif + LIB_LINK_MAPFILE = + + EXAMPLES_DEST= $(GEN_ROOT)/examples -- cgit