From 1b8d71b31a5ddcb72b6b281cd3dd5ace3bf9572d Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 5 Mar 2026 16:12:32 +0100 Subject: [PATCH] libpkg: link with "libtool --mode=link $(CC)" on macOS This avoids the following error on macOS, with libtool from pkgsrc: libtool: Missing --mode=XXX Tested on Darwin/amd64. With help from michael-o; thanks! --- libpkg/Makefile.autosetup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpkg/Makefile.autosetup b/libpkg/Makefile.autosetup index ee902702e..a4c267dc8 100644 --- a/libpkg/Makefile.autosetup +++ b/libpkg/Makefile.autosetup @@ -183,7 +183,7 @@ lib$(LIB)$(LIBSOEXT): $(STATIC_LIBS) @if pkgos_darwin lib$(LIB)_flat.a: $(STATIC_LIBS) - libtool -static -o lib$(LIB)_flat.a $(STATIC_LIBS) + libtool --mode=link --tag=CC $(CC) -static -o lib$(LIB)_flat.a $(STATIC_LIBS) @else lib$(LIB)_flat.a: ${STATIC_LIBS} mergelib_script $(AR) -M < mergelib_script