diff options
author | Lukas Larsson <lukas@erlang.org> | 2022-01-25 14:07:37 +0100 |
---|---|---|
committer | Lukas Larsson <lukas@erlang.org> | 2022-01-25 14:07:37 +0100 |
commit | fc0a8f8204255d5b443abf9da7dec1539180fb9c (patch) | |
tree | efb3348e86ab20728c46826f064615dcdda09bb9 /lib/erl_interface | |
parent | c5fc2b3621b0603452c8451464be27515ca2a7e5 (diff) | |
download | erlang-fc0a8f8204255d5b443abf9da7dec1539180fb9c.tar.gz |
Update configure scripts
Diffstat (limited to 'lib/erl_interface')
-rwxr-xr-x | lib/erl_interface/configure | 16 |
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... |