summaryrefslogtreecommitdiff
path: root/lib/erl_interface
diff options
context:
space:
mode:
authorLukas Larsson <lukas@erlang.org>2022-01-25 14:07:37 +0100
committerLukas Larsson <lukas@erlang.org>2022-01-25 14:07:37 +0100
commitfc0a8f8204255d5b443abf9da7dec1539180fb9c (patch)
treeefb3348e86ab20728c46826f064615dcdda09bb9 /lib/erl_interface
parentc5fc2b3621b0603452c8451464be27515ca2a7e5 (diff)
downloaderlang-fc0a8f8204255d5b443abf9da7dec1539180fb9c.tar.gz
Update configure scripts
Diffstat (limited to 'lib/erl_interface')
-rwxr-xr-xlib/erl_interface/configure16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/erl_interface/configure b/lib/erl_interface/configure
index fa5feb72f3..50c4b6396e 100755
--- a/lib/erl_interface/configure
+++ b/lib/erl_interface/configure
@@ -7995,6 +7995,7 @@ else
fi
fi
+ERL_DED_FLAT_BUNDLE=true
USER_LD=$LD
@@ -8261,9 +8262,18 @@ case $host_os in
DED_LDFLAGS="-Bshareable"
;;
darwin*)
- # Mach-O linker: a shared lib and a loadable
- # object file is not the same thing.
- DED_LDFLAGS="-bundle -bundle_loader ${ERL_TOP}/bin/$host/beam.smp"
+ # Mach-O linker: a shared lib and a loadable object file is not the same thing.
+
+ if test "X${ERL_DED_FLAT_BUNDLE}" = "Xtrue"; then
+ # EI sets this variable when building its .so file as beam.smp
+ # has not been built yet and any ei lib will not
+ # link to beam.smp anyways
+ DED_LDFLAGS="-bundle -flat_namespace -undefined suppress"
+ else
+ # Cannot use flat namespaces for drivers/nifs as that may cause
+ # symbols to collide during loading
+ DED_LDFLAGS="-bundle -bundle_loader ${ERL_TOP}/bin/$host/beam.smp"
+ fi
# DED_LDFLAGS_CONFTEST is for use in configure tests only. We
# cannot use DED_LDFLAGS in configure tests since beam.smp has not
# been built yet...