summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-08-29 17:42:49 +0900
committerusa <usa@garbagecollect.jp>2022-09-16 15:12:47 +0900
commit7900a9bd388cff65ba98e4fa09b296eb1f4f815e (patch)
tree70f8d9cd959e9eb771904bdf3c253b55ead2e32c /configure.ac
parent9733f4d0f00a38b5f77ee2e2fffdff866828cd66 (diff)
Backport https://github.com/ruby/ruby/pull/6193
Co-authored-by: Yuta Saito <kateinoigakukun@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 49e0c79a4c..eb07c11c57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2840,6 +2840,14 @@ AS_IF([test "$with_dln_a_out" != yes], [
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_FALLBACK_LIBRARY_PATH}
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
+ AS_IF([test x"$enable_shared" = xyes], [
+ # Resolve symbols from libruby.dylib when --enable-shared
+ EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
+ ], [test "x$EXTSTATIC" = x], [
+ # When building exts as bundles, a mach-o bundle needs to know its loader
+ # program to bind symbols from the ruby executable
+ EXTDLDFLAGS="-bundle_loader '\$(BUILTRUBY)'"
+ ])
rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
AS_IF([test "$GCC" = yes], [