From 848502a1674ad912cb31dae0bcc5431c7d30ec7f Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Tue, 20 Feb 2024 22:29:59 +0100 Subject: [PATCH] Makefile/macos: rename internal dylib name on EFI Use install_name_tool to rename the internal name (id) of the dylib to ensure it's located properly when linking to it. Signed-off-by: Sergio Lopez --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index ed00070d..2bb9a95c 100644 --- a/Makefile +++ b/Makefile @@ -86,6 +86,9 @@ ifeq ($(OS),Linux) patchelf --set-soname $(KRUN_SONAME_$(OS)) --output $(LIBRARY_RELEASE_$(OS)) target/release/$(KRUN_BASE_$(OS)) else ifeq ($(EFI),1) +ifeq ($(OS),Darwin) + install_name_tool -id libkrun-efi.dylib target/release/libkrun.dylib +endif mv target/release/libkrun.dylib target/release/$(KRUN_BASE_$(OS)) endif cp target/release/$(KRUN_BASE_$(OS)) $(LIBRARY_RELEASE_$(OS))