Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] use -undefined dynamic_lookup on recent macOS



On Darwin-22 (macOS-13 Ventura) I get the following

warning: -undefined suppress is deprecated

when building module DLLs. It seems we should use
"-undefined dynamic_lookup".
This option works on Darwin-22, 23 (Sonoma), 24 (Sequoia).
But on Darwin-21 (Monterey) it gives

warning: -undefined dynamic_lookup may not work with chained fixups


diff --git a/configure.ac b/configure.ac
index 7073f4e2c..bca99b7f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2637,7 +2637,9 @@ int main(int argc, char *argv[])
     sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G $ldflags}" ;;
     aix*)         DLLDFLAGS="${DLLDFLAGS=-G -bexpall -lc}" ;;
     solaris*|sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G}" ;;
-    darwin*)      DLLDFLAGS="${DLLDFLAGS=-bundle -flat_namespace -undefined suppress}" ;;
+    darwin[[0-9]].*|darwin1?.*|darwin2[01].*)
+                  DLLDFLAGS="${DLLDFLAGS=-bundle -flat_namespace -undefined suppress}" ;;
+    darwin*)      DLLDFLAGS="${DLLDFLAGS=-bundle -flat_namespace -undefined dynamic_lookup}" ;;
     beos*) DLLDFLAGS="${DLLDFLAGS=-nostart}" ;;
     openbsd*)
       if test x$zsh_cv_sys_elf = xyes; then






Messages sorted by: Reverse Date, Date, Thread, Author