Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions HOWTO/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@ Some of the available `configure` options are:
and scalability compared to the default clock sources chosen.
* `--disable-saved-compile-time` - Disable saving of compile date and time
in the emulator binary.
* `--enable-ei-dynamic-lib` - Make erl\_interface build a shared library in addition
to the archive normally built.

If you or your system has special requirements please read the `Makefile` for
additional configuration information.
Expand Down
44 changes: 30 additions & 14 deletions erts/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ AC_ARG_VAR(CPPFLAGS, [C/C++ preprocessor flags])
AC_ARG_VAR(CXX, [C++ compiler])
AC_ARG_VAR(CXXFLAGS, [C++ compiler flags])
AC_ARG_VAR(LD, [linker (is often overridden by configure)])
AC_ARG_VAR(LDFLAGS, [linker flags (can be risky to set since LD may be overriden by configure)])
AC_ARG_VAR(LDFLAGS, [linker flags (can be risky to set since LD may be overridden by configure)])
AC_ARG_VAR(LIBS, [libraries])
AC_ARG_VAR(DED_LD, [linker for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
AC_ARG_VAR(DED_LDFLAGS, [linker flags for Dynamic Erlang Drivers (set all DED_LD* variables or none)])
Expand Down Expand Up @@ -2957,11 +2957,26 @@ dnl
AC_DEFUN(ERL_DED,
[

LM_CHECK_THR_LIB

if test "$THR_DEFS" = ""; then
DED_THR_DEFS="-D_THREAD_SAFE -D_REENTRANT"
else
DED_THR_DEFS="$THR_DEFS"
fi

AC_SUBST(DED_THR_DEFS)

ERL_DED_FLAGS

])

AC_DEFUN(ERL_DED_FLAGS,
[

USER_LD=$LD
USER_LDFLAGS="$LDFLAGS"

LM_CHECK_THR_LIB

DED_CC=$CC
DED_GCC=$GCC

Expand All @@ -2977,7 +2992,6 @@ case $host_os in
;;
esac


DED_WARN_FLAGS="-Wall -Wstrict-prototypes"
case "$host_cpu" in
tile*)
Expand All @@ -2997,12 +3011,6 @@ LM_TRY_ENABLE_CFLAG([-Werror=undef], [DED_WERRORFLAGS])
DED_SYS_INCLUDE="-I${ERL_TOP}/erts/emulator/beam -I${ERL_TOP}/erts/include -I${ERL_TOP}/erts/include/$host -I${ERL_TOP}/erts/include/internal -I${ERL_TOP}/erts/include/internal/$host -I${ERL_TOP}/erts/emulator/sys/$DED_OSTYPE -I${ERL_TOP}/erts/emulator/sys/common"
DED_INCLUDE=$DED_SYS_INCLUDE

if test "$THR_DEFS" = ""; then
DED_THR_DEFS="-D_THREAD_SAFE -D_REENTRANT"
else
DED_THR_DEFS="$THR_DEFS"
fi
# DED_EMU_THR_DEFS=$EMU_THR_DEFS
DED_CFLAGS="$CFLAGS $CPPFLAGS $DED_CFLAGS"
if test "x$GCC" = xyes; then
# Use -fno-common for gcc, that is link error if multiple definitions of
Expand Down Expand Up @@ -3075,9 +3083,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...
Expand Down Expand Up @@ -3187,7 +3204,6 @@ AC_SUBST(DED_LD)
AC_SUBST(DED_LDFLAGS)
AC_SUBST(DED_LD_FLAG_RUNTIME_LIBRARY_PATH)
AC_SUBST(DED_LIBS)
AC_SUBST(DED_THR_DEFS)
AC_SUBST(DED_OSTYPE)

])
2 changes: 1 addition & 1 deletion erts/configure
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ Some influential environment variables:
CXX C++ compiler
CXXFLAGS C++ compiler flags
LD linker (is often overridden by configure)
LDFLAGS linker flags (can be risky to set since LD may be overriden by
LDFLAGS linker flags (can be risky to set since LD may be overridden by
configure)
LIBS libraries
DED_LD linker for Dynamic Erlang Drivers (set all DED_LD* variables or
Expand Down
26 changes: 15 additions & 11 deletions lib/crypto/configure
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,6 @@ SSL_LIBDIR
SSL_INCDIR
SSL_INCLUDE
DED_OSTYPE
DED_THR_DEFS
DED_LIBS
DED_WERRORFLAGS
DED_WARN_FLAGS
Expand All @@ -645,6 +644,7 @@ DED_SYS_INCLUDE
DED_EXT
DED_GCC
DED_CC
DED_THR_DEFS
EGREP
GREP
MIXED_MINGW
Expand Down Expand Up @@ -3974,9 +3974,6 @@ done



USER_LD=$LD
USER_LDFLAGS="$LDFLAGS"



NEED_NPTL_PTHREAD_H=no
Expand Down Expand Up @@ -4427,6 +4424,19 @@ fi



if test "$THR_DEFS" = ""; then
DED_THR_DEFS="-D_THREAD_SAFE -D_REENTRANT"
else
DED_THR_DEFS="$THR_DEFS"
fi





USER_LD=$LD
USER_LDFLAGS="$LDFLAGS"

DED_CC=$CC
DED_GCC=$GCC

Expand All @@ -4442,7 +4452,6 @@ case $host_os in
;;
esac


DED_WARN_FLAGS="-Wall -Wstrict-prototypes"
case "$host_cpu" in
tile*)
Expand Down Expand Up @@ -4586,12 +4595,6 @@ $as_echo "no" >&6; }
DED_SYS_INCLUDE="-I${ERL_TOP}/erts/emulator/beam -I${ERL_TOP}/erts/include -I${ERL_TOP}/erts/include/$host -I${ERL_TOP}/erts/include/internal -I${ERL_TOP}/erts/include/internal/$host -I${ERL_TOP}/erts/emulator/sys/$DED_OSTYPE -I${ERL_TOP}/erts/emulator/sys/common"
DED_INCLUDE=$DED_SYS_INCLUDE

if test "$THR_DEFS" = ""; then
DED_THR_DEFS="-D_THREAD_SAFE -D_REENTRANT"
else
DED_THR_DEFS="$THR_DEFS"
fi
# DED_EMU_THR_DEFS=$EMU_THR_DEFS
DED_CFLAGS="$CFLAGS $CPPFLAGS $DED_CFLAGS"
if test "x$GCC" = xyes; then
# Use -fno-common for gcc, that is link error if multiple definitions of
Expand Down Expand Up @@ -4947,6 +4950,7 @@ fi





{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multiarch directory" >&5
$as_echo_n "checking for multiarch directory... " >&6; }
Expand Down
Loading