aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2009-12-11 16:55:07 +0000
committerErlang/OTP <[email protected]>2009-12-11 16:55:07 +0000
commit4c67dcccfc6f03f7e19f934751f8274ed3b9cccc (patch)
treeea42190c4c6c2aa07abbeafa5208512ebb76eb65
parent9c35f074a9a8c2b713b53fb13cedc0746b1da150 (diff)
downloadotp-4c67dcccfc6f03f7e19f934751f8274ed3b9cccc.tar.gz
otp-4c67dcccfc6f03f7e19f934751f8274ed3b9cccc.tar.bz2
otp-4c67dcccfc6f03f7e19f934751f8274ed3b9cccc.zip
OTP-8323 Miscellaneous cross compilation improvements. For example, one
new mandatory configuration variable that replaces all other previously mandatory configuration variables, and better documentation. Note that old cross compilation configurations cannot be used without modifications. For more information see the $ERL_TOP/xcomp/README file.
-rw-r--r--README5
-rw-r--r--erts/aclocal.m4132
-rw-r--r--erts/configure.in200
-rw-r--r--erts/emulator/beam/sys.h5
-rw-r--r--lib/erl_interface/configure.in10
-rwxr-xr-xlib/wx/configure.in20
-rwxr-xr-xotp_build165
-rw-r--r--xcomp/README218
-rw-r--r--xcomp/README.xcomp25
-rw-r--r--xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf166
-rw-r--r--xcomp/erl-xcomp-vxworks_ppc32.conf172
-rw-r--r--xcomp/erl-xcomp.conf.template174
12 files changed, 812 insertions, 480 deletions
diff --git a/README b/README
index 51a9ddb756..260e9fd36b 100644
--- a/README
+++ b/README
@@ -243,6 +243,11 @@ if './otp_build remove_prebuilt_files' is invoked.
If you or your system has special requirements please read the
Makefile for additional configuration information.
+Cross compiling Erlang/OTP
+--------------------------
+The support for cross compiling Erlang/OTP is in its early stage of
+development, and should be considered as experimental. For more
+information see: $ERL_TOP/xcomp/README
How to build a debug enabled Erlang runtime system
--------------------------------------------------
diff --git a/erts/aclocal.m4 b/erts/aclocal.m4
index 0ad963db12..e9a0cc228f 100644
--- a/erts/aclocal.m4
+++ b/erts/aclocal.m4
@@ -1,4 +1,4 @@
-
+dnl
dnl %CopyrightBegin%
dnl
dnl Copyright Ericsson AB 1998-2009. All Rights Reserved.
@@ -15,6 +15,7 @@ dnl the License for the specific language governing rights and limitations
dnl under the License.
dnl
dnl %CopyrightEnd%
+dnl
dnl
dnl aclocal.m4
@@ -519,46 +520,79 @@ dnl On ofs1 the '-pthread' switch should be used
ETHR_DEFS="$ETHR_DEFS -D_POSIX_PTHREAD_SEMANTICS" ;;
linux*)
ETHR_DEFS="$ETHR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_GNU_SOURCE"
- if test "x$erl_xcomp_linux_kernel" != "x"; then
- linux_kernel_vsn_=$erl_xcomp_linux_kernel
- else
- linux_kernel_vsn_=`uname -r`
- fi
- usable_sigusrx=no
- usable_sigaltstack=no
- # FIXME: Test for actual problems instead of kernel versions.
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-1]]|2.[[0-1]].*)
- ;;
- 2.[[2-3]]|2.[[2-3]].*)
- usable_sigusrx=yes
- ;;
- *)
+ if test X$cross_compiling = Xyes; then
+ if test "X$erl_xcomp_linux_usable_sigusrx" = "X"; then
usable_sigusrx=yes
+ usable_sigusrx_guessed=yes
+ else
+ usable_sigusrx=$erl_xcomp_linux_usable_sigusrx
+ usable_sigusrx_guessed=no
+ fi
+ if test "X$erl_xcomp_linux_usable_sigaltstack" = "X"; then
usable_sigaltstack=yes
- ;;
- esac
+ usable_sigaltstack_guessed=yes
+ else
+ usable_sigaltstack=$erl_xcomp_linux_usable_sigaltstack
+ usable_sigaltstack_guessed=no
+ fi
+ else
+ # FIXME: Test for actual problems instead of kernel versions
+ linux_kernel_vsn_=`uname -r`
+ case $linux_kernel_vsn_ in
+ [[0-1]].*|2.[[0-1]]|2.[[0-1]].*)
+ usable_sigusrx=no
+ usable_sigaltstack=no;;
+ 2.[[2-3]]|2.[[2-3]].*)
+ usable_sigusrx=yes
+ usable_sigaltstack=no;;
+ *)
+ usable_sigusrx=yes
+ usable_sigaltstack=yes;;
+ esac
+ usable_sigusrx_guessed=no
+ usable_sigaltstack_guessed=no
+ fi
AC_MSG_CHECKING(if SIGUSR1 and SIGUSR2 can be used)
AC_MSG_RESULT($usable_sigusrx)
+ if test $usable_sigusrx_guessed = yes; then
+ AC_MSG_WARN([result $usable_sigusrx guessed because of cross compilation])
+ fi
if test $usable_sigusrx = no; then
ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGUSRX"
fi
AC_MSG_CHECKING(if sigaltstack can be used)
AC_MSG_RESULT($usable_sigaltstack)
+ if test $usable_sigaltstack_guessed = yes; then
+ AC_MSG_WARN([result $usable_sigaltstack guessed because of cross compilation])
+ fi
if test $usable_sigaltstack = no; then
ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGALTSTACK"
fi
AC_MSG_CHECKING(for Native POSIX Thread Library)
- case `getconf GNU_LIBPTHREAD_VERSION 2>/dev/null` in
- nptl*) nptl=yes;;
- NPTL*) nptl=yes;;
- *) nptl=no;;
- esac
+ if test X$cross_compiling = Xyes; then
+ if test "X$erl_xcomp_linux_nptl" = "X"; then
+ nptl=yes
+ nptl_guessed=yes
+ else
+ nptl=$erl_xcomp_linux_nptl
+ nptl_guessed=no
+ fi
+ else
+ case `getconf GNU_LIBPTHREAD_VERSION 2>/dev/null` in
+ nptl*) nptl=yes;;
+ NPTL*) nptl=yes;;
+ *) nptl=no;;
+ esac
+ nptl_guessed=no
+ fi
AC_MSG_RESULT($nptl)
+ if test $nptl_guessed = yes; then
+ AC_MSG_WARN([result $nptl guessed because of cross compilation])
+ fi
if test $nptl = yes; then
ETHR_THR_LIB_BASE_NAME=nptl
fi
@@ -567,7 +601,10 @@ dnl On ofs1 the '-pthread' switch should be used
AC_CHECK_HEADER(nptl/pthread.h, need_nptl_incldir=yes)
if test $need_nptl_incldir = yes; then
# Ahh...
- nptl_path="$C_INCLUDE_PATH:$CPATH:/usr/local/include:/usr/include"
+ nptl_path="$C_INCLUDE_PATH:$CPATH"
+ if test X$cross_compiling != Xyes; then
+ nptl_path="$nptl_path:/usr/local/include:/usr/include"
+ fi
nptl_ws_path=
save_ifs="$IFS"; IFS=":"
for dir in $nptl_path; do
@@ -683,7 +720,7 @@ if test "x$ETHR_THR_LIB_BASE" != "x"; then
ETHR_LIB_NAME=$ethr_lib_name
fi
-AC_CHECK_SIZEOF(void *, 4)
+AC_CHECK_SIZEOF(void *)
AC_DEFINE_UNQUOTED(ETHR_SIZEOF_PTR, $ac_cv_sizeof_void_p, [Define to the size of pointers])
if test "X$disable_native_ethr_impls" = "Xyes"; then
@@ -751,13 +788,21 @@ case $clock_gettime_correction in
case $clock_gettime_correction in
unknown)
if test x$clock_gettime_compiles = xyes; then
- linux_kernel_vsn_=`uname -r`
- case $linux_kernel_vsn_ in
- [[0-1]].*|2.[[0-5]]|2.[[0-5]].*)
- erl_cv_time_correction=times ;;
- *)
- erl_cv_time_correction=clock_gettime;;
- esac
+ if test X$cross_compiling != Xyes; then
+ if test "X$erl_xcomp_linux_clock_gettime_correction" = "Xno"; then
+ erl_cv_time_correction=times
+ else
+ erl_cv_time_correction=clock_gettime
+ fi
+ else
+ linux_kernel_vsn_=`uname -r`
+ case $linux_kernel_vsn_ in
+ [[0-1]].*|2.[[0-5]]|2.[[0-5]].*)
+ erl_cv_time_correction=times ;;
+ *)
+ erl_cv_time_correction=clock_gettime;;
+ esac
+ fi
else
erl_cv_time_correction=times
fi
@@ -774,6 +819,7 @@ case $clock_gettime_correction in
;;
esac
])
+
xrtlib=""
case $erl_cv_time_correction in
times)
@@ -781,6 +827,9 @@ case $erl_cv_time_correction in
[Define if you do not have a high-res. timer & want to use times() instead])
;;
clock_gettime)
+ if test X$cross_compiling = Xyes -a X$erl_xcomp_linux_clock_gettime_correction = X; then
+ AC_MSG_WARN([result clock_gettime guessed because of cross compilation])
+ fi
xrtlib="-lrt"
AC_DEFINE(GETHRTIME_WITH_CLOCK_GETTIME,[1],
[Define if you want to use clock_gettime to simulate gethrtime])
@@ -840,7 +889,15 @@ int main() {
exit(5);
exit(0); return 0;
}
-], erl_gethrvtime=procfs_ioctl, erl_gethrvtime=false, erl_gethrvtime=false)
+],
+erl_gethrvtime=procfs_ioctl,
+erl_gethrvtime=false,
+if test "x$erl_xcomp_gethrvtime_procfs_ioctl" = "xyes"; then
+ erl_gethrvtime=procfs_ioctl
+else
+ erl_gethrvtime=false
+fi)
+
case $erl_gethrvtime in
procfs_ioctl)
AC_DEFINE(HAVE_GETHRVTIME_PROCFS_IOCTL,[1],
@@ -880,7 +937,14 @@ case $erl_gethrvtime in
exit(5);
exit(0); return 0;
}
- ], erl_clock_gettime=true, erl_clock_gettime=false, erl_clock_gettime=false)
+ ],
+ erl_clock_gettime=true,
+ erl_clock_gettime=false,
+ if test "x$erl_xcomp_clock_gettime" = "xyes"; then
+ erl_clock_gettime=true
+ else
+ erl_clock_gettime=false
+ fi)
LIBS=$save_libs
case $host_os in
linux*)
diff --git a/erts/configure.in b/erts/configure.in
index 895a357023..faccf5f102 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -94,13 +94,6 @@ enable_child_waiter_thread=no
ENABLE_ALLOC_TYPE_VARS=
AC_SUBST(ENABLE_ALLOC_TYPE_VARS)
-AC_ARG_WITH(xcomp-conf,
-[ --with-xcompconf=PATH path to cross compilation configuration])
-if test "x$with_xcompconf" != "xno" -a "x$with_xcompconf" != "x" ; then
- . $with_xcompconf
-fi
-
-
AC_ARG_ENABLE(threads,
[ --enable-threads enable async thread support
--disable-threads disable async thread support],
@@ -464,22 +457,18 @@ AC_SUBST(DEBUG_CFLAGS)
AC_SUBST(WFLAGS)
AC_SUBST(CFLAG_RUNTIME_LIBRARY_PATH)
-AC_CHECK_SIZEOF(void *, $erl_xcomp_void_p) # Needed for ARCH and smp checks below
+AC_CHECK_SIZEOF(void *) # Needed for ARCH and smp checks below
dnl
dnl Figure out operating system and cpu architecture
dnl
-if test "x$erl_xcomp_os" != "x"; then
- chk_opsys_=$erl_xcomp_os
+if test "x$host_alias" != "x"; then
+ chk_opsys_=$host_os
else
- if test "x$host_os" = "xwin32"; then
- chk_opsys_=win32
- else
- chk_opsys_=`uname -s`
- if test "x$chk_opsys_" = "xSunOS"; then
- chk_opsys_=$chk_opsys_`uname -r`
- fi
+ chk_opsys_=`uname -s`
+ if test "x$chk_opsys_" = "xSunOS"; then
+ chk_opsys_=$chk_opsys_`uname -r`
fi
fi
case $chk_opsys_ in
@@ -491,11 +480,12 @@ case $chk_opsys_ in
*) OPSYS=noopsys
esac
-if test "x$erl_xcomp_hw" != "x"; then
- chk_arch_=$erl_xcomp_hw
+if test "x$host_alias" != "x" -a "x$host_cpu" != "x"; then
+ chk_arch_=$host_cpu
else
chk_arch_=`uname -m`
fi
+
case $chk_arch_ in
sun4u) ARCH=ultrasparc;;
sparc64) ARCH=sparc64;;
@@ -1296,11 +1286,11 @@ dnl Interactive UX needs <net/errno.h> for socket related error codes.
dnl Some Linuxes needs <sys/socketio.h> instead of <sys/sockio.h>
dnl
AC_CHECK_HEADERS(fcntl.h limits.h unistd.h syslog.h dlfcn.h ieeefp.h \
- sys/stropts.h sys/sysctl.h \
+ sys/types.h sys/stropts.h sys/sysctl.h \
sys/ioctl.h sys/time.h sys/uio.h \
sys/socket.h sys/sockio.h sys/socketio.h \
net/errno.h malloc.h mach-o/dyld.h arpa/nameser.h \
- pty.h util.h utmp.h langinfo.h)
+ pty.h util.h utmp.h langinfo.h poll.h)
AC_CHECK_HEADER(sys/resource.h,
[AC_DEFINE(HAVE_SYS_RESOURCE_H, 1,
@@ -1389,11 +1379,13 @@ LM_STRUCT_SOCKADDR_SA_LEN
LM_STRUCT_EXCEPTION
AC_CHECK_SIZEOF(char, 1)
-AC_CHECK_SIZEOF(short, $erl_xcomp_short)
-AC_CHECK_SIZEOF(int, $erl_xcomp_int)
-AC_CHECK_SIZEOF(long, $erl_xcomp_long)
-AC_CHECK_SIZEOF(void *, $erl_xcomp_void_p)
-AC_CHECK_SIZEOF(long long, $erl_xcomp_long_long)
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(void *)
+AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(size_t)
+AC_CHECK_SIZEOF(off_t)
BITS64=
@@ -1457,71 +1449,26 @@ int main(void)
abort ();
return 0;
}
-],AC_MSG_RESULT(no)
-,AC_MSG_RESULT(yes)
-AC_MSG_ERROR([This gcc miscompiles the Erlang runtime system; please use a different version])
-,AC_MSG_RESULT(no))
-fi
-
-dnl AC_CHECK_SIZEOF(size_t, 4)dnl Assumes all cross compiling is to 32bit uP
-dnl
-dnl The disabled one above does not include stddef.h, alas!
-dnl
-AC_CACHE_CHECK([size of size_t], ac_cv_sizeof_size_t,
-AC_TRY_RUN([
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-int main(int argc, char **argv) {
- FILE *f = fopen("conftestval", "w");
- if (! f)
- exit(1); /* Failed */
- fprintf(f, "%d\n", (int) sizeof(size_t));
- exit(0); /* OK */
-}
-], ac_cv_sizeof_size_t=`cat conftestval`
-, ac_cv_sizeof_size_t=0
-, ac_cv_sizeof_size_t=$erl_xcomp_sizeof_size_t))
-AC_DEFINE_UNQUOTED(SIZEOF_SIZE_T, $ac_cv_sizeof_size_t, [The number of bytes in a size_t])
+], gcc_4_3_0_bug=no, gcc_4_3_0_bug=yes, gcc_4_3_0_bug=cross)
+
+case $gcc_4_3_0_bug in
+ yes|no)
+ gcc_4_3_0_bug_result=$gcc_4_3_0_bug;;
+ cross)
+ gcc_dumped_vsn=`$CC -dumpversion 2>/dev/null`
+ case gcc-$gcc_dumped_vsn in
+ gcc-4.3.0) gcc_4_3_0_bug=yes;;
+ *) gcc_4_3_0_bug=no;;
+ esac
+ gcc_4_3_0_bug_result="$gcc_4_3_0_bug; could not run test since cross compiling, checked version number ($gcc_dumped_vsn) instead";;
+esac
-dnl A standard size check does not include sys/types.h
-dnl
-AC_CACHE_CHECK([size of off_t], ac_cv_sizeof_off_t,
-AC_TRY_RUN([
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-int main(int argc, char **argv) {
- FILE *f = fopen("conftestval", "w");
- if (! f)
- exit(1); /* Failed */
- fprintf(f, "%d\n", (int) sizeof(off_t));
- exit(0); /* OK */
-}
-], ac_cv_sizeof_off_t=`cat conftestval`
-, ac_cv_sizeof_off_t=0
-, ac_cv_sizeof_off_t=$erl_xcomp_sizeof_off_t))
-AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t,
- [The number of bytes in an off_t])
+AC_MSG_RESULT([$gcc_4_3_0_bug_result])
+if test $gcc_4_3_0_bug = yes; then
+ AC_MSG_ERROR([This gcc miscompiles the Erlang runtime system; please use a different version])
+fi
-AC_MSG_CHECKING([int/long/void*/size_t sizes])
-AC_TRY_RUN([
-#include <stdlib.h>
-#include <stddef.h>
-int main(int argc, char **argv) {
- if (sizeof(void *) >= 4 &&
- sizeof(void *) == sizeof(size_t) &&
- (sizeof(void *) == sizeof(int) || sizeof(void *) == sizeof(long))) {
- exit(0); /* OK */
- }
- exit(1); /* Failed */
-}
-],AC_MSG_RESULT(ok)
-,AC_MSG_RESULT(failed)
-AC_MSG_ERROR([Cannot handle this combination of int/long/void*/size_t sizes])
-,AC_MSG_RESULT(ok))
+fi
if test "x$erl_xcomp_bigendian" != "x"; then
ac_cv_c_bigendian=$erl_xcomp_bigendian
@@ -1582,7 +1529,7 @@ AC_CHECK_FUNCS([ieee_handler fpsetmask finite isnan isinf res_gethostbyname dlop
pread pwrite writev memmove strerror strerror_r strncasecmp \
gethrtime localtime_r gmtime_r mremap memcpy mallopt \
sbrk _sbrk __sbrk brk _brk __brk \
- flockfile fstat strlcpy strlcat setsid posix2time setlocale nl_langinfo])
+ flockfile fstat strlcpy strlcat setsid posix2time setlocale nl_langinfo poll])
if test "X$host" = "Xwin32"; then
ac_cv_func_setvbuf_reversed=yes
fi
@@ -1858,9 +1805,11 @@ int main(void)
erts_cv___after_morecore_hook_can_track_malloc=no,
if test "x$erl_xcomp_after_morecore_hook" != "x"; then
erts_cv___after_morecore_hook_can_track_malloc=$erl_xcomp_after_morecore_hook
+ else
+ erts_cv___after_morecore_hook_can_track_malloc=no
fi)])
-if test "x$erts_cv___after_morecore_hook_can_track_malloc" = "xyes"; then
+if test $erts_cv___after_morecore_hook_can_track_malloc = yes; then
AC_DEFINE(ERTS___AFTER_MORECORE_HOOK_CAN_TRACK_MALLOC, 1, \
[Define if __after_morecore_hook can track malloc()s core memory use.])
fi
@@ -2116,7 +2065,11 @@ int main(void)
],
erts_cv_brk_wrappers_can_track_malloc=yes,
erts_cv_brk_wrappers_can_track_malloc=no,
- erts_cv_brk_wrappers_can_track_malloc=no)])
+ if test "x$erl_xcomp_dlsym_brk_wrappers" != "x"; then
+ erts_cv_brk_wrappers_can_track_malloc=$erl_xcomp_dlsym_brk_wrappers
+ else
+ erts_cv_brk_wrappers_can_track_malloc=no
+ fi)])
if test $erts_cv_brk_wrappers_can_track_malloc = yes; then
AC_DEFINE(ERTS_BRK_WRAPPERS_CAN_TRACK_MALLOC, 1, \
[Define if sbrk()/brk() wrappers can track malloc()s core memory use])
@@ -2643,7 +2596,14 @@ int main(int argc, const char **argv)
do_fmul();
return do_check();
}
-], erl_ok=reliable, erl_ok=unreliable, erl_ok=unreliable)
+],
+erl_ok=reliable,
+erl_ok=unreliable,
+if test "x$erl_xcomp_reliable_fpe" = "xyes"; then
+ erl_ok=reliable
+else
+ erl_ok=unreliable
+fi)
if test $erl_ok = unreliable; then
AC_DEFINE(NO_FPE_SIGNALS,[],
[Define if floating points exceptions are non-existing/not reliable])
@@ -2826,9 +2786,12 @@ fi
# Check for working poll().
#
AC_MSG_CHECKING([for working poll()])
-if test "x$erl_xcomp_poll" != "x"; then
- poll_works=$erl_xcomp_poll
+if test "x$ac_cv_header_poll_h" != "xyes" -o "x$ac_cv_func_poll" != "xyes"; then
+
+poll_works=no
+
else
+
AC_TRY_RUN([
#include <poll.h>
main()
@@ -2848,23 +2811,43 @@ main()
exit(0);
#endif
}
-], poll_works=true, poll_works=false, poll_works=false)
+],
+poll_works=yes,
+poll_works=no,
+poll_works=$erl_xcomp_poll)
+
+if test "X$poll_works" != "X"; then
+ guessed_poll_works=no
+else
+ guessed_poll_works=yes
+ case $host_os in
+ darwin*) poll_works=no;;
+ *) poll_works=yes;;
+ esac
+fi
+
fi
+
case $poll_works in
-true)
+yes)
AC_DEFINE(ERTS_USE_POLL, 1, [Define if poll() should be used instead of select()])
- AC_MSG_RESULT(ok)
+ AC_MSG_RESULT(yes)
;;
*)
#
# The USE_SELECT define is used by the ssl application (should not
# be used by erts).
#
+ poll_works=no
AC_DEFINE(USE_SELECT, 1, [Define if select() should be used instead of poll()])
- AC_MSG_RESULT(broken or based on select())
+ AC_MSG_RESULT([no; non-existing, broken, or based on select()])
;;
esac
+if test $guessed_poll_works = yes; then
+ AC_MSG_WARN([result $poll_works guessed based on OS ($host_os) because of cross compilation])
+fi
+
#
# If kqueue() found, check that it can be selected or polled on...
#
@@ -2900,7 +2883,14 @@ int main(void) {
}
return 0;
}
- ], ok_kqueue=true, ok_kqueue=false, ok_kqueue=false)
+ ],
+ ok_kqueue=true,
+ ok_kqueue=false,
+ if test "x$erl_xcomp_kqueue" = "xyes"; then
+ ok_kqueue=true
+ else
+ ok_kqueue=false
+ fi)
if test $ok_kqueue = true; then
AC_MSG_RESULT(yes);
else
@@ -2990,7 +2980,15 @@ int main(void) {
return 5;
return 0;
}
-], copying_putenv=yes, copying_putenv=no, copying_putenv=no)
+],
+copying_putenv=yes,
+copying_putenv=no,
+if test "x$erl_xcomp_putenv_copy" != "x"; then
+ copying_putenv=$erl_xcomp_putenv_copy
+else
+ copying_putenv=no
+fi)
+
if test $copying_putenv = yes; then
AC_DEFINE(HAVE_COPYING_PUTENV,[1],[Define if you have a putenv() that stores a copy of the key-value pair])
fi
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index 71cb6a36cc..4b949523fa 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -239,6 +239,11 @@ EXTERN_FUNCTION(int, real_printf, (const char *fmt, ...));
** Sint16: A signed integer of 16 bits exactly.
*/
+#if !((SIZEOF_VOID_P >= 4) && (SIZEOF_VOID_P == SIZEOF_SIZE_T) \
+ && ((SIZEOF_VOID_P == SIZEOF_INT) || (SIZEOF_VOID_P == SIZEOF_LONG)))
+#error Cannot handle this combination of int/long/void*/size_t sizes
+#endif
+
#if SIZEOF_VOID_P == 8
#undef ARCH_32
#define ARCH_64
diff --git a/lib/erl_interface/configure.in b/lib/erl_interface/configure.in
index 80b229c1c3..2f5b5673bb 100644
--- a/lib/erl_interface/configure.in
+++ b/lib/erl_interface/configure.in
@@ -100,11 +100,11 @@ if test "x$LD" = "x"; then
fi
AC_SUBST(LD)
-AC_CHECK_SIZEOF(short, $erl_xcomp_short)
-AC_CHECK_SIZEOF(int, $erl_xcomp_int)
-AC_CHECK_SIZEOF(long, $erl_xcomp_long)
-AC_CHECK_SIZEOF(void *, $erl_xcomp_void_p)
-AC_CHECK_SIZEOF(long long, $erl_xcomp_long_long)
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(void *)
+AC_CHECK_SIZEOF(long long)
if test $ac_cv_sizeof_void_p = 8; then
CFLAGS="$CFLAGS -DEI_64BIT"
diff --git a/lib/wx/configure.in b/lib/wx/configure.in
index 7dc8d6e831..2b47f86baa 100755
--- a/lib/wx/configure.in
+++ b/lib/wx/configure.in
@@ -1,3 +1,21 @@
+dnl Process this file with autoconf to produce a configure script. -*-m4-*-
+
+dnl %CopyrightBegin%
+dnl
+dnl Copyright Ericsson AB 2008-2009. All Rights Reserved.
+dnl
+dnl The contents of this file are subject to the Erlang Public License,
+dnl Version 1.1, (the "License"); you may not use this file except in
+dnl compliance with the License. You should have received a copy of the
+dnl Erlang Public License along with this software. If not, it can be
+dnl retrieved online at http://www.erlang.org/.
+dnl
+dnl Software distributed under the License is distributed on an "AS IS"
+dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+dnl the License for the specific language governing rights and limitations
+dnl under the License.
+dnl
+dnl %CopyrightEnd%
AC_INIT()
@@ -101,7 +119,7 @@ AC_SUBST(MIXED_CYGWIN)
## Check that we are in 32 bits mode on darwin
## (wxWidgets require that it currently uses 32-bits Carbon)
## Otherwise skip building wxErlang
-AC_CHECK_SIZEOF(void *, 4)
+AC_CHECK_SIZEOF(void *)
case $ac_cv_sizeof_void_p-$host_os in
8-darwin*)
diff --git a/otp_build b/otp_build
index e478256314..cddb477db5 100755
--- a/otp_build
+++ b/otp_build
@@ -1,4 +1,22 @@
#! /bin/sh
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2002-2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
# Expected autoconf version
EXPECTED_AUTOCONF_VERSION=2.59
@@ -69,52 +87,83 @@ usage ()
echo " cancel_preloaded - uncheckout preloaded code (only in Clearcase)"
}
+export_cross_env ()
+{
+ if [ "x$ERL_XCOMP_CONF" != "x" ]; then
+ export erl_xcomp_host
+ export erl_xcomp_configure_flags
+ export erl_xcomp_cc
+ export erl_xcomp_ld
+ export erl_xcomp_cflags
+ export erl_xcomp_cpp
+ export erl_xcomp_ldflags
+ export erl_xcomp_ranlib
+ export erl_xcomp_ar
+ export erl_xcomp_ded_ld
+ export erl_xcomp_ded_ldflags
+ export erl_xcomp_ded_ld_runtime_library_path
+ export erl_xcomp_bigendian
+ export erl_xcomp_linux_clock_gettime_correction
+ export erl_xcomp_linux_nptl
+ export erl_xcomp_linux_usable_sigusrx
+ export erl_xcomp_linux_usable_sigaltstack
+ export erl_xcomp_poll
+ export erl_xcomp_kqueue
+ export erl_xcomp_putenv_copy
+ export erl_xcomp_reliable_fpe
+ export erl_xcomp_getaddrinfo
+ export erl_xcomp_gethrvtime_procfs_ioctl
+ export erl_xcomp_clock_gettime
+ export erl_xcomp_after_morecore_hook
+ export erl_xcomp_dlsym_brk_wrappers
+ fi
+}
+
xcomp_fail ()
{
- echo "The mandatory cross compilation variable" $1 "is not set in" $2 ",aborting" >&2
+ echo "The mandatory cross compilation variable '"$1"' is not set, aborting..." >&2
exit 1
}
-check_xcomp_file ()
+source_xcomp_file ()
{
- if test "x$erl_xcomp_os" = "x"; then
- xcomp_fail erl_xcomp_os $1
- fi
- if test "x$erl_xcomp_hw" = "x"; then
- xcomp_fail erl_xcomp_hw $1
- fi
- if test "x$erl_xcomp_man" = "x"; then
- xcomp_fail erl_xcomp_man $1
- fi
- if test "x$erl_xcomp_target_xtra" = "x"; then
- xcomp_fail erl_xcomp_target_extra $1
- fi
- if test "x$erl_xcomp_void_p" = "x"; then
- xcomp_fail erl_xcomp_void_p $1
- fi
- if test "x$erl_xcomp_short" = "x"; then
- xcomp_fail erl_xcomp_short $1
- fi
- if test "x$erl_xcomp_int" = "x"; then
- xcomp_fail erl_xcomp_int $1
- fi
- if test "x$erl_xcomp_long" = "x"; then
- xcomp_fail erl_xcomp_long $1
- fi
- if test "x$erl_xcomp_long_long" = "x"; then
- xcomp_fail erl_xcomp_long_long $1
+ case x$1 in
+ x/*)
+ ;;
+ x)
+ echo "env_cross requires path to cross compilation configuration" >&2
+ exit 1;;
+ x*)
+ echo "An absoulute path to the cross compilation file is required: $1" >&2
+ exit 1;;
+ esac
+
+ if [ ! -f $1 ]; then
+ echo "No such file: $1" >&2
+ exit 1
fi
- if test "x$erl_xcomp_sizeof_size_t" = "x"; then
- xcomp_fail erl_xcomp_sizeof_size_t $1
+
+ . $1
+}
+
+finalize_xcomp_conf ()
+{
+ if test "x$erl_xcomp_host" = "x"; then
+ xcomp_fail erl_xcomp_host
fi
- if test "x$erl_xcomp_sizeof_off_t" = "x"; then
- xcomp_fail erl_xcomp_sizeof_off_t $1
+
+ if test "x$erl_xcomp_target" != "x"; then
+ echo "The 'erl_xcomp_target' configuration variable should no longer be used." >&2
+ echo "For more information see the xcomp/README file." >&2
+ exit 1;
fi
- if test "x$erl_xcomp_os" = "xlinux"; then
- if test "x$erl_xcomp_linux_kernel" = "x"; then
- xcomp_fail erl_xcomp_linux_kernel $1
- fi
+
+ OVERRIDE_TARGET=`$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host`
+ if test $? -ne 0; then
+ exit $?
fi
+ TARGET=$OVERRIDE_TARGET
+
return 0
}
@@ -342,17 +391,21 @@ do_configure ()
# compilers. It's a kludge, but a working one...
#
- crossdirs="erts lib/common_test lib/erl_interface lib/gs lib/megaco lib/odbc lib/snmp lib/wx"
-
if [ -z "$ONLY_ERTS" ]; then
- for x in $crossdirs; do
- if [ -f "$x/configure" ]; then
- (cd $x;./configure --host=$erl_xcomp_hw --with-xcompconf=$ERL_XCOMP_CONF $CONFIG_FLAGS) || exit 1
- fi
- done
+ crossdirs="erts lib/common_test lib/erl_interface lib/gs lib/megaco lib/odbc lib/snmp lib/wx"
else
- (cd $ERL_TOP/erts;./configure --host=$erl_xcomp_hw --with-xcompconf=$ERL_XCOMP_CONF $CONFIG_FLAGS) || exit 1
+ crossdirs="erts"
fi
+
+ export_cross_env
+
+ for d in $crossdirs; do
+ echo "== Entering $d =="
+ echo "./configure --build=$BUILDSYS --host=$erl_xcomp_host $CONFIG_FLAGS"
+ (cd $ERL_TOP/$d; ./configure --build=$BUILDSYS --host=$erl_xcomp_host $CONFIG_FLAGS) || exit 1
+ echo "== Leaving $d =="
+ done
+
CC="$save_CC"
LD="$save_LD"
CFLAGS="$save_CFLAGS"
@@ -551,20 +604,11 @@ echo_env_vxworks ()
echo_env_cross ()
{
- if [ -z "$1" ]; then
- echo "env_cross requires path to cross compilation configuration" >&2
- exit 1
- fi
-
- if [ ! -f $1 ]; then
- echo "No such file: $1" >&2
- exit 1
- fi
- . $1
- check_xcomp_file $1
+ source_xcomp_file $1
+ finalize_xcomp_conf
echo_env_erltop
echo_setenv ERL_XCOMP_CONF $1 ';'
- echo_setenv OVERRIDE_TARGET $erl_xcomp_target
+ echo_setenv OVERRIDE_TARGET $OVERRIDE_TARGET
echo_envinfo
}
@@ -863,7 +907,7 @@ do_prepare_prel ()
(cd $ERL_TOP/erts/preloaded/src && $MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET prepare) || exit 1
echo '*****************************************************'
echo "Prepared for new preloaded code build - "
- echo "Directory ERL_TOP/erts/prelaoded/ebin completely"
+ echo "Directory ERL_TOP/erts/preloaded/ebin completely"
echo "checked out."
echo '*****************************************************'
}
@@ -941,9 +985,10 @@ do_boot_cross ()
TARGET=`$ERL_TOP/erts/autoconf/config.guess`
$MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET all_bootstraps || exit 1;
- $MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET local_setup || exit 1;
+
TARGET=$SAVE_TARGET
OVERRIDE_TARGET=$SAVE_OVERRIDE_TARGET
+
$MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET libs || exit 1;
$MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET depend || exit 1;
$MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET emulator || exit 1;
@@ -1131,6 +1176,10 @@ esac
if [ ! -z "$OVERRIDE_TARGET" ]; then
TARGET="$OVERRIDE_TARGET"
+else
+ if [ "x$erl_xcomp_host" != "x" ]; then
+ finalize_xcomp_conf
+ fi
fi
# Setting a bootstrap root is inherently very dangerous now that the bootstrap
diff --git a/xcomp/README b/xcomp/README
new file mode 100644
index 0000000000..dfda81fc8e
--- /dev/null
+++ b/xcomp/README
@@ -0,0 +1,218 @@
+================================================================================
+ Cross compiling Erlang/OTP
+================================================================================
+
+%CopyrightBegin%
+
+Copyright Ericsson AB 2009. All Rights Reserved.
+
+The contents of this file are subject to the Erlang Public License,
+Version 1.1, (the "License"); you may not use this file except in
+compliance with the License. You should have received a copy of the
+Erlang Public License along with this software. If not, it can be
+retrieved online at http://www.erlang.org/.
+
+Software distributed under the License is distributed on an "AS IS"
+basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+the License for the specific language governing rights and limitations
+under the License.
+
+%CopyrightEnd%
+
+================================================================================
+
+This directory contains a configuration file template and configuration examples
+for cross compiling Erlang/OTP. The configuration files contain configuration
+variables and should be supplied to the $ERL_TOP/otp_build when setting up an
+appropriate environment for cross compiling. The currently used configuration
+variables are described later in this document.
+
+The erl-xcomp.conf.template contains all available configuration variables
+and can be used as a template when creating a configuration. See the
+erl-xcomp-TileraMDE2.0-tilepro.conf for an example of a working configuration
+file.
+
+Instead of using the configuration files one can export the configuration
+variables as ordinary environment variables before calling otp_build. If
+default behavior of a variable is satisfactory, the variable need not to
+be set and exported.
+
+Note that the support for cross compiling is in its early stage of development,
+and should be considered as experimental. The build system including cross
+compilation configuration variables used may be subject to non backward
+compatible changes without prior notice. It works for cross compiling some
+Linux/GNU systems, but has only been partly tested for more esoteric platforms.
+The VxWorks example file is highly dependent on our environment and is here
+more or less only for internal use.
+
+Please submit any patches for cross compiling in a way consistent with this
+system. If a new configuration variable is needed for your system, add it to the
+template file, use it in otp_build, aclocal.m4 and/or configure.in. All input is
+welcome as we cannot possibly have all cross compiling environments out there to
+test with.
+
+General information on how to submit patches can be found at:
+ http://wiki.github.com/erlang/otp/submitting-patches
+
+== Build and Install ===========================================================
+
+ [1] $ cd $ERL_TOP
+
+Either set up your cross compilation variables in the environment manually,
+or set up the environment using a configuration file by executing:
+ [2] $ eval `./otp_build env_cross <ABSOLUTE_PATH_TO_XCONF_FILE>`
+
+Configure and build Erlang/OTP:
+ [3] $ ./otp_build configure
+ [4] $ ./otp_build boot -a
+ [5] $ ./otp_build release -a <ABSOLUTE_PATH_TO_RELEASE_ROOT>
+
+The Install script used when installing Erlang/OTP requires common Unix
+tools such as 'sed' to be present in your PATH. If your target system
+does not have such tools, you need to run the Install script on your
+build machine before packing Erlang/OTP. If so, run the Install script
+like follows; otherwise skip [6] and [7]:
+ [6] $ cd <ABSOLUTE_PATH_TO_RELEASE_ROOT>
+ [7] $ ./Install -cross <ABSOLUTE_INSTALL_ROOT_ON_TARGET> # answer questions
+
+Pack Erlang/OTP as follows (gnu tar is assumed):
+ [8] $ cd <ABSOLUTE_PATH_TO_RELEASE_ROOT>
+ [9] $ tar -zcf <WHERE_TO_SAVE_THE_RELEASE>/<RELEASE_NAME>.tar.gz *
+
+Install Erlang/OTP on the target system like follows. If you ran the Install
+script before packing ([6] and [7]) you should skip [12]:
+ [10] $ cd <ABSOLUTE_INSTALL_ROOT_ON_TARGET>
+ [11] $ tar -zxf <WHERE_THE_PACKED_RELEASE_EXIST>/<RELEASE_NAME>.tar.gz
+ [12] $ ./Install <ABSOLUTE_INSTALL_ROOT_ON_TARGET> # answer questions
+
+<ABSOLUTE_INSTALL_ROOT_ON_TARGET> usually equals current working directory
+when you run the Install script on the target system, but does not have to.
+It can follow another path through the file system to the same directory.
+<ABSOLUTE_INSTALL_ROOT_ON_TARGET> is the path that will be used when running
+Erlang/OTP and is the path that have to be available at run time.
+
+== Currently used configuration variables ======================================
+
+-- Mandatory -------------------------------------------------------------------
+
+* erl_xcomp_host
+ Target system. The value will be passed as '--host' argument to the configure
+ script. It does not have to be a full CPU-VENDOR-OS triplet, but can be. The
+ full CPU-VENDOR-OS triplet will be created by:
+ $ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host
+
+-- Optional --------------------------------------------------------------------
+
+* erl_xcomp_configure_flags
+ To override the configure flags for a special target system, you
+ can set this variable which overrides configure parameters on the
+ command line and instead uses the specified options. The variable
+ leaves the build-host system untouched.
+
+-- Optional build environment flags --
+
+If the cross compilation tools aren't prefixed by '$erl_xcomp_host-',
+you will have to use these configuration variables in order to use the
+right cross compilation tools.
+
+* erl_xcomp_cc
+ C compiler.
+
+* erl_xcomp_ld
+ Linker.
+
+* erl_xcomp_cflags
+ C compiler flags.
+
+* erl_xcomp_cpp
+ C pre processor.
+
+* erl_xcomp_ldflags
+ Linker flags.
+
+* erl_xcomp_ranlib
+ Ranlib program.
+
+* erl_xcomp_ar
+ Ar program.
+
+* erl_xcomp_ded_ld
+ Dynamic Erlang Driver linker.
+
+* erl_xcomp_ded_ldflags
+ Dynamic Erlang Driver linker flags.
+
+* erl_xcomp_ded_ld_runtime_library_path
+ Dynamic Erlang Driver runtime linker path.
+
+-- Optional feature, or bug tests --
+
+These tests cannot (always) be done automatically when cross compiling. You
+usually does not need to set these variables. Only set these if you really
+know what you are doing.
+
+* erl_xcomp_bigendian - yes|no
+ If yes, the target system must be big endian. If no, little endian. This can
+ often be automatically detected, but not always. If not automatically
+ detected, configure will fail unless this variable is set. No default value
+ is used, i.e., configure will try to figure this out automatically.
+
+* erl_xcomp_linux_clock_gettime_correction - yes|no (defaults to yes)
+ If yes, clock_gettime(CLOCK_MONOTONIC, _) on the target system must work.
+ This variable is recommended to be set to no on Linux systems with kernel
+ versions less than 2.6.
+
+* erl_xcomp_linux_nptl - yes|no (defaults to yes on Linux; otherwise, no)
+ If yes, the target system must have NPTL (Native POSIX Thread Library).
+ Older Linux systems have LinuxThreads instead of NPTL (Linux kernel
+ versions typically less than 2.6).
+
+* erl_xcomp_linux_usable_sigusrx - yes|no (defaults to yes)
+ If yes, the SIGUSR1 and SIGUSR2 must be usable by the ERTS. Old
+ LinuxThreads thread libraries (Linux kernel versions less than 2.2) used
+ these signals and made them unusable by the ERTS.
+
+* erl_xcomp_linux_usable_sigaltstack - yes|no (defaults to yes)
+ If yes, sigaltstack() must be usable on the target system. sigaltstack()
+ on Linux kernel versions less than 2.4 are broken.
+
+* erl_xcomp_poll - yes|no (defaults to no on Darwin/MacOSX; otherwise, yes)
+ If yes, the target system must have a working poll() implementation that also
+ can handle devices. If no, select() will be used instead of poll().
+
+* erl_xcomp_kqueue - yes|no (defaults to no)
+ If yes, the target system must have a working kqueue() implementation that
+ returns a file descriptor which can be used by poll() and/or select().
+ If no and the target system has not got epoll() or /dev/poll, the kernel-poll
+ feature will be disabled.
+
+* erl_xcomp_putenv_copy - yes|no (defaults to no)
+ If yes, the target system must have a putenv() implementation that stores a
+ copy of the key/value pair.
+
+* erl_xcomp_reliable_fpe - yes|no (defaults to no)
+ If yes, the target system must have reliable floating point exceptions.
+
+* erl_xcomp_getaddrinfo - yes|no (defaults to no)
+ If yes, the target system must have a working getaddrinfo() implementation
+ that can handle both IPv4 and IPv6.
+
+* erl_xcomp_gethrvtime_procfs_ioctl - yes|no (defaults to no)
+ If yes, the target system must have a working gethrvtime() implementation
+ and is used with procfs ioctl().
+
+* erl_xcomp_clock_gettime - yes|no (defaults to no)
+ If yes, the target system must have a working clock_gettime() implementation
+ that can be used for retrieving process CPU time.
+
+* erl_xcomp_after_morecore_hook - yes|no (defaults to no)
+ If yes, the target system must have a working __after_morecore_hook that can
+ be used for tracking used malloc() implementations core memory usage.
+
+* erl_xcomp_dlsym_brk_wrappers - yes|no (defaults to no)
+ If yes, the target system must have a working dlsym(RTLD_NEXT, <S>)
+ implementation that can be used on 'brk' and 'sbrk' symbols used by the
+ malloc() implementation in use, and by this track the malloc() implementations
+ core memory usage.
+
+================================================================================
diff --git a/xcomp/README.xcomp b/xcomp/README.xcomp
deleted file mode 100644
index 4df9226a96..0000000000
--- a/xcomp/README.xcomp
+++ /dev/null
@@ -1,25 +0,0 @@
-This directory contains configuration file templates and examples for
-cross compiling Erlang/OTP. The configuration files should be supplied to
-$ERl_TOP/otp_build in the ./otp_build env_cross command to set up an
-appropriate environment for cross compiling.
-
-Copy the template file erl-xcomp.conf.template to an appropriate name
-and fill in at least the mandatory parts before attempting cross
-compilation. See the template file for details on configuration
-parameters and see the example erl-xcomp-TileraMDE2.0-tilepro.conf for
-an example of a working configuration file.
-
-The support for cross compiling is in it's early stage of development,
-it works for cross compiling some gnu/linux systems, but has only been partly
-tested for more esotheric platforms. The vxworks example file is highly
-dependent on our environment and is here more or less for internal use.
-
-Please submit any patches for cross compiling in a way consistent with
-this system. Variables should be added to the configuration file,
-which is sourced both by $ERL_TOP/otp_build and each configure
-script. If a new configuration variable is needed for your system, add
-it to the template file, use it in otp_build and/or configure and
-submit the patch to erlang-patches for further integration into the
-main branch. All input is welcome as we cannot possibly have all cross
-compiling environments out there to test with.
-
diff --git a/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf b/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf
index e711f06a27..c8e7212e1f 100644
--- a/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf
+++ b/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf
@@ -16,73 +16,43 @@
###
### %CopyrightEnd%
###
-### File: erl-xcomp.conf
+### File: erl-xcomp-TileraMDE2.0-tilepro.conf
### Author: Rickard Green
###
### ----------------------------------------------------------------------------
### When cross compiling Erlang/OTP, copy this file and set the variables
### needed below. Then pass the path to the copy of this file as an argument
-### to "eval `otp_build env_cross <path to erl-xcomp.conf file>`".
+### to "eval `otp_build env_cross <absolute path to erl-xcomp.conf file>`".
### ----------------------------------------------------------------------------
### ----------------------------------------------------------------------------
### Variables in the following section *have* to be set.
###
-##
-## Operating system and hardware architecture.
-##
-# Operating system: linux|solaris<ver>|darwin|freebsd|win32|<...>
-erl_xcomp_os=linux
-# Hardware architecture: x86|x86_64|ultrasparc|sparc64|ppc|arm|tile|<...>
-erl_xcomp_hw=tile
-# Manufacturer: (unknown is ok)
-erl_xcomp_man=tilera
-# Extra target info (unknown is ok)
-erl_xcomp_target_xtra=gnu
-
-# Target (change if default isn't satisfactory)
-erl_xcomp_target=${erl_xcomp_hw}-${erl_xcomp_man}-${erl_xcomp_os}-${erl_xcomp_target_xtra}
##
-## Sizes (in bytes) of some important types.
+## Target system. The value will be passed as '--host' argument to the configure
+## script. It does not have to be a full CPU-VENDOR-OS tripplet, but can be. The
+## full CPU-VENDOR-OS tripplet will be created by:
+## $ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host
##
-# void *
-erl_xcomp_void_p=4
-# short
-erl_xcomp_short=2
-# int
-erl_xcomp_int=4
-# long
-erl_xcomp_long=4
-# long long (use 0 if no 'long long' type exist)
-erl_xcomp_long_long=8
-# size_t
-erl_xcomp_sizeof_size_t=4
-# off_t
-erl_xcomp_sizeof_off_t=4
+erl_xcomp_host=tile
### ----------------------------------------------------------------------------
-### The variables in the following section have to be set for linux systems
-###
-# linux kernel version (as reported by "uname -r")
-erl_xcomp_linux_kernel=2.6.26.7
-
### ----------------------------------------------------------------------------
-### ---------------------------------------------------------------------------
### To override the configure flags for a special target system, You
### can set this variable which overrides configure parameters on the
### command line and instead uses the specified options. The variable
### leaves the build-host system untouched.
-### ---------------------------------------------------------------------------
+### ----------------------------------------------------------------------------
erl_xcomp_configure_flags="--without-termcap"
-###----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
### You can specify a specific CC or LD for the build target (the cross
### compiler) here along with magic CFLAGS and/or LDFLAGS if needed
### ar and ranlib might also be specified if needed.
-###----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
erl_xcomp_cc=
@@ -98,7 +68,7 @@ erl_xcomp_ranlib=
erl_xcomp_ar=
-###----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
### The ded_ls and ded_ldflags variables control linking of dynamically loaded
### erlang drivers. On i.e. Linux these are set to
### $(CC) and "-shared" respectively, but other OS'es might need other
@@ -106,7 +76,7 @@ erl_xcomp_ar=
### erl_xcomp_ded_ld_runtime_library_path is the flag to set a
### specific runtime library path for the shared library at link time,
### usually this should be left empty.
-###----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
erl_xcomp_ded_ld=
@@ -114,83 +84,117 @@ erl_xcomp_ded_ldflags=
erl_xcomp_ded_ld_runtime_library_path=
-### The variables in the following section does not need to be set. Only
-### set these if you really know what you are doing.
+###
+### Optional feature, or bug tests
+###
+### These tests cannot (always) be done automatically when cross compiling.
+### You usually does not need to set these variables. Only set these if you
+### really know what you are doing.
###
##
-## Big endian/little endian can usually be determined by configure correctly,
-## but if not, set this variable
-##
+## erl_xcomp_bigendian - yes|no
+## If yes, the target system must be big endian. If no, little endian. This
+## can often be automatically detected, but not always. If not automatically
+## detected, configure will fail unless this variable is set. No default value
+## is used, i.e., configure will try to figure this out automatically.
erl_xcomp_bigendian=
##
-## If you have a working poll that can be used: yes|no
+## erl_xcomp_linux_clock_gettime_correction - yes|no (defaults to yes)
+## If yes, clock_gettime(CLOCK_MONOTONIC, _) on the target system must work.
+## This variable is recommended to be set to no on Linux systems with kernel
+## versions less than 2.6.
+##
+erl_xcomp_linux_clock_gettime_correction=yes
+
+##
+## erl_xcomp_linux_nptl - yes|no (defaults to yes on Linux; otherwise, no)
+## If yes, the target system must have NPTL (Native POSIX Thread Library).
+## Older Linux systems have LinuxThreads instead of NPTL (Linux kernel
+## versions typically less than 2.6).
+##
+erl_xcomp_linux_nptl=yes
+
+##
+## erl_xcomp_linux_usable_sigusrx - yes|no (defaults to yes)
+## If yes, the SIGUSR1 and SIGUSR2 must be usable by the ERTS. Old
+## LinuxThreads thread libraries (Linux kernel versions less than 2.2) used
+## these signals and made them unusable by the ERTS.
+##
+erl_xcomp_linux_usable_sigusrx=yes
+
+##
+## erl_xcomp_linux_usable_sigaltstack - yes|no (defaults to yes)
+## If yes, sigaltstack() must be usable on the target system. sigaltstack()
+## on Linux kernel versions less than 2.4 are broken.
+##
+erl_xcomp_linux_usable_sigaltstack=yes
+
+##
+## erl_xcomp_poll - yes|no (defaults to no on Darwin/MacOSX; otherwise, yes)
+## If yes, the target system must have a working poll() implementation that
+## also can handle devices. If no, select() will be used instead of poll().
##
erl_xcomp_poll=yes
##
-## If you have a working kqueue() that can be used: yes|no
+## erl_xcomp_kqueue - yes|no (defaults to no)
+## If yes, the target system must have a working kqueue() implementation that
+## returns a file descriptor which can be used by poll() and/or select().
+## If no and the target system has not got epoll() or /dev/poll, the
+## kernel-poll feature will be disabled.
##
erl_xcomp_kqueue=
##
-## If you have a putenv() that stores a copy of the key-value pair: yes|no
+## erl_xcomp_putenv_copy - yes|no (defaults to no)
+## If yes, the target system must have a putenv() implementation that stores a
+## copy of the key/value pair.
##
erl_xcomp_putenv_copy=
##
-## If you have reliable floating point exeptions that can be
-## used: yes|no
+## erl_xcomp_reliable_fpe - yes|no (defaults to no)
+## If yes, the target system must have reliable floating point exceptions.
##
erl_xcomp_reliable_fpe=
##
-## If you have getaddrinfo() usable for ipv6: yes|no
+## erl_xcomp_getaddrinfo - yes|no (defaults to no)
+## If yes, the target system must have a working getaddrinfo() implementation
+## that can handle both IPv4 and IPv6.
##
erl_xcomp_getaddrinfo=yes
##
-## If you have a gethrvtime() that works and uses ioctl()
-## to /proc/self: yes|no
+## erl_xcomp_gethrvtime_procfs_ioctl - yes|no (defaults to no)
+## If yes, the target system must have a working gethrvtime() implementation
+## and is used with procfs ioctl().
##
erl_xcomp_gethrvtime_procfs_ioctl=
##
-## If you have a working clock_gettime(): yes|no
+## erl_xcomp_clock_gettime - yes|no (defaults to no)
+## If yes, the target system must have a working clock_gettime()
+## implementation that can be used for retrieving process CPU time.
##
erl_xcomp_clock_gettime=
##
-## If you have a __after_morecore_hook that can track malloc()s
-## core memory use: yes|no
+## erl_xcomp_after_morecore_hook - yes|no (defaults to no)
+## If yes, the target system must have a working __after_morecore_hook that
+## can be used for tracking used malloc() implementations core memory usage.
##
erl_xcomp_after_morecore_hook=
##
-## If you have brk, sbrk and end symbols: yes|no
-##
-# brk
-erl_xcomp_have_brk=
-# _brk
-erl_xcomp_have__brk=
-# __brk
-erl_xcomp_have___brk=
-# sbrk
-erl_xcomp_have_sbrk=
-# _sbrk
-erl_xcomp_have__sbrk=
-# __sbrk
-erl_xcomp_have___sbrk=
-# end
-erl_xcomp_end=
-# _end
-erl_xcomp__end=
-
-##
-## If sbrk/brk wrappers using dlsym(RTLD_NEXT, _) can track malloc()s
-## core memory use: yes|no
+## erl_xcomp_dlsym_brk_wrappers - yes|no (defaults to no)
+## If yes, the target system must have a working dlsym(RTLD_NEXT, <S>)
+## implementation that can be used on 'brk' and 'sbrk' symbols used by the
+## malloc() implementation in use, and by this track the malloc()
+## implementations core memory usage.
##
-erl_xcomp_brk_wrappers=
+erl_xcomp_dlsym_brk_wrappers=
### ----------------------------------------------------------------------------
diff --git a/xcomp/erl-xcomp-vxworks_ppc32.conf b/xcomp/erl-xcomp-vxworks_ppc32.conf
index 544212233a..19a9327239 100644
--- a/xcomp/erl-xcomp-vxworks_ppc32.conf
+++ b/xcomp/erl-xcomp-vxworks_ppc32.conf
@@ -23,7 +23,7 @@
### ----------------------------------------------------------------------------
### When cross compiling Erlang/OTP, copy this file and set the variables
### needed below. Then pass the path to the copy of this file as an argument
-### to "eval `otp_build env_cross <path to erl-xcomp.conf file>`".
+### to "eval `otp_build env_cross <absolute path to erl-xcomp.conf file>`".
### ----------------------------------------------------------------------------
### ----------------------------------------------------------------------------
@@ -31,60 +31,27 @@
###
##
-## Operating system and hardware architecture.
-##
-# Operating system: linux|solaris<ver>|darwin|freebsd|win32|<...>
-erl_xcomp_os=vxworks
-# Hardware architecture: x86|x86_64|ultrasparc|sparc64|ppc|arm|tile|<...>
-# Note that this will be the host parameter to configure, so it
-# should be both recognizable by config.sub and a valid prefix for
-# i.e. gcc etc.
-erl_xcomp_hw=ppc-wrs
-# Manufacturer: (unknown is ok)
-erl_xcomp_man=wrs
-# Extra target info (unknown is ok)
-erl_xcomp_target_xtra=unknown
-
-# Target (change if default isn't satisfactory)
-erl_xcomp_target=powerpc-wrs-vxworks
-
-##
-## Sizes (in bytes) of some important types.
-##
-# void *
-erl_xcomp_void_p=4
-# short
-erl_xcomp_short=2
-# int
-erl_xcomp_int=4
-# long
-erl_xcomp_long=4
-# long long (use 0 if no 'long long' type exist)
-erl_xcomp_long_long=8
-# size_t
-erl_xcomp_sizeof_size_t=4
-# off_t
-erl_xcomp_sizeof_off_t=4
+## Target system. The value will be passed as '--host' argument to the configure
+## script. It does not have to be a full CPU-VENDOR-OS tripplet, but can be. The
+## full CPU-VENDOR-OS tripplet will be created by:
+## $ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host
+##
+erl_xcomp_host=powerpc-wrs-vxworks
### ----------------------------------------------------------------------------
-### The variables in the following section have to be set for linux systems
-###
-# linux kernel version (as reported by "uname -r")
-erl_xcomp_linux_kernel=
-
### ----------------------------------------------------------------------------
-### ---------------------------------------------------------------------------
### To override the configure flags for a special target system, You
### can set this variable which overrides configure parameters on the
### command line and instead uses the specified options. The variable
### leaves the build-host system untouched.
-### ---------------------------------------------------------------------------
+### ----------------------------------------------------------------------------
erl_xcomp_configure_flags="--without-termcap"
-###----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
### You can specify a specific CC or LD for the build target (the cross
### compiler) here along with magic CFLAGS and/or LDFLAGS if needed
-###----------------------------------------------------------------------------
+### ar and ranlib might also be specified if needed.
+###-----------------------------------------------------------------------------
erl_xcomp_cc="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/ccppc"
@@ -97,9 +64,10 @@ erl_xcomp_cpp="$erl_xcomp_cc $erl_xcomp_cflags -E"
erl_xcomp_ldflags="-mlongcall"
erl_xcomp_ranlib="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/ranlibppc"
+
erl_xcomp_ar="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/arppc"
-###----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
### The ded_ls and ded_ldflags variables control linking of dynamically loaded
### erlang drivers. On i.e. Linux these are set to
### $(CC) and "-shared" respectively, but other OS'es might need other
@@ -107,7 +75,7 @@ erl_xcomp_ar="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/arppc"
### erl_xcomp_ded_ld_runtime_library_path is the flag to set a
### specific runtime library path for the shared library at link time,
### usually this should be left empty.
-###----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
erl_xcomp_ded_ld=
@@ -115,83 +83,117 @@ erl_xcomp_ded_ldflags=
erl_xcomp_ded_ld_runtime_library_path=
-### The variables in the following section does not need to be set. Only
-### set these if you really know what you are doing.
+###
+### Optional feature, or bug tests
+###
+### These tests cannot (always) be done automatically when cross compiling.
+### You usually does not need to set these variables. Only set these if you
+### really know what you are doing.
###
##
-## Big endian/little endian can usually be determined by configure correctly,
-## but if not, set this variable
-##
+## erl_xcomp_bigendian - yes|no
+## If yes, the target system must be big endian. If no, little endian. This
+## can often be automatically detected, but not always. If not automatically
+## detected, configure will fail unless this variable is set. No default value
+## is used, i.e., configure will try to figure this out automatically.
erl_xcomp_bigendian=yes
##
-## If you have a working poll that can be used: yes|no
+## erl_xcomp_linux_clock_gettime_correction - yes|no (defaults to yes)
+## If yes, clock_gettime(CLOCK_MONOTONIC, _) on the target system must work.
+## This variable is recommended to be set to no on Linux systems with kernel
+## versions less than 2.6.
+##
+erl_xcomp_linux_clock_gettime_correction=
+
+##
+## erl_xcomp_linux_nptl - yes|no (defaults to yes on Linux; otherwise, no)
+## If yes, the target system must have NPTL (Native POSIX Thread Library).
+## Older Linux systems have LinuxThreads instead of NPTL (Linux kernel
+## versions typically less than 2.6).
+##
+erl_xcomp_linux_nptl=
+
+##
+## erl_xcomp_linux_usable_sigusrx - yes|no (defaults to yes)
+## If yes, the SIGUSR1 and SIGUSR2 must be usable by the ERTS. Old
+## LinuxThreads thread libraries (Linux kernel versions less than 2.2) used
+## these signals and made them unusable by the ERTS.
+##
+erl_xcomp_linux_usable_sigusrx=
+
+##
+## erl_xcomp_linux_usable_sigaltstack - yes|no (defaults to yes)
+## If yes, sigaltstack() must be usable on the target system. sigaltstack()
+## on Linux kernel versions less than 2.4 are broken.
+##
+erl_xcomp_linux_usable_sigaltstack=
+
+##
+## erl_xcomp_poll - yes|no (defaults to no on Darwin/MacOSX; otherwise, yes)
+## If yes, the target system must have a working poll() implementation that
+## also can handle devices. If no, select() will be used instead of poll().
##
erl_xcomp_poll=
##
-## If you have a working kqueue() that can be used: yes|no
+## erl_xcomp_kqueue - yes|no (defaults to no)
+## If yes, the target system must have a working kqueue() implementation that
+## returns a file descriptor which can be used by poll() and/or select().
+## If no and the target system has not got epoll() or /dev/poll, the
+## kernel-poll feature will be disabled.
##
erl_xcomp_kqueue=
##
-## If you have a putenv() that stores a copy of the key-value pair: yes|no
+## erl_xcomp_putenv_copy - yes|no (defaults to no)
+## If yes, the target system must have a putenv() implementation that stores a
+## copy of the key/value pair.
##
erl_xcomp_putenv_copy=
##
-## If you have reliable floating point exeptions that can be
-## used: yes|no
+## erl_xcomp_reliable_fpe - yes|no (defaults to no)
+## If yes, the target system must have reliable floating point exceptions.
##
erl_xcomp_reliable_fpe=
##
-## If you have getaddrinfo() usable for ipv6: yes|no
+## erl_xcomp_getaddrinfo - yes|no (defaults to no)
+## If yes, the target system must have a working getaddrinfo() implementation
+## that can handle both IPv4 and IPv6.
##
erl_xcomp_getaddrinfo=
##
-## If you have a gethrvtime() that works and uses ioctl()
-## to /proc/self: yes|no
+## erl_xcomp_gethrvtime_procfs_ioctl - yes|no (defaults to no)
+## If yes, the target system must have a working gethrvtime() implementation
+## and is used with procfs ioctl().
##
erl_xcomp_gethrvtime_procfs_ioctl=
##
-## If you have a working clock_gettime(): yes|no
+## erl_xcomp_clock_gettime - yes|no (defaults to no)
+## If yes, the target system must have a working clock_gettime()
+## implementation that can be used for retrieving process CPU time.
##
erl_xcomp_clock_gettime=
##
-## If you have a __after_morecore_hook that can track malloc()s
-## core memory use: yes|no
+## erl_xcomp_after_morecore_hook - yes|no (defaults to no)
+## If yes, the target system must have a working __after_morecore_hook that
+## can be used for tracking used malloc() implementations core memory usage.
##
erl_xcomp_after_morecore_hook=
##
-## If you have brk, sbrk and end symbols: yes|no
-##
-# brk
-erl_xcomp_have_brk=
-# _brk
-erl_xcomp_have__brk=
-# __brk
-erl_xcomp_have___brk=
-# sbrk
-erl_xcomp_have_sbrk=
-# _sbrk
-erl_xcomp_have__sbrk=
-# __sbrk
-erl_xcomp_have___sbrk=
-# end
-erl_xcomp_end=
-# _end
-erl_xcomp__end=
-
-##
-## If sbrk/brk wrappers using dlsym(RTLD_NEXT, _) can track malloc()s
-## core memory use: yes|no
+## erl_xcomp_dlsym_brk_wrappers - yes|no (defaults to no)
+## If yes, the target system must have a working dlsym(RTLD_NEXT, <S>)
+## implementation that can be used on 'brk' and 'sbrk' symbols used by the
+## malloc() implementation in use, and by this track the malloc()
+## implementations core memory usage.
##
-erl_xcomp_brk_wrappers=
+erl_xcomp_dlsym_brk_wrappers=
### ----------------------------------------------------------------------------
diff --git a/xcomp/erl-xcomp.conf.template b/xcomp/erl-xcomp.conf.template
index cc604a80e5..bed365e754 100644
--- a/xcomp/erl-xcomp.conf.template
+++ b/xcomp/erl-xcomp.conf.template
@@ -31,66 +31,26 @@
###
##
-## Operating system and hardware architecture.
-##
-# Operating system: linux|solaris<ver>|darwin|freebsd|win32|<...>
-erl_xcomp_os=
-# Hardware architecture: x86|x86_64|ultrasparc|sparc64|ppc|arm|tile|<...>
-# Note that this will be the host parameter to configure, so it
-# should be both recognizable by config.sub and a valid prefix for
-# i.e. gcc etc if compiler is not specified further down.
-erl_xcomp_hw=
-# Manufacturer: (unknown is ok)
-erl_xcomp_man=
-# Extra target info (unknown is ok)
-erl_xcomp_target_xtra=
-
-# Target (change if default isn't satisfactory)
-# Note that this has to correspond to what config.sub thinks the machine is.
-# Edit config.sub if not satisfactory, or set this explicitly
-# to what output you will get from running
-# $ERL_TOP/erts/autoconf/config.sub $erl_xcomp_hw
-
-erl_xcomp_target=${erl_xcomp_hw}-${erl_xcomp_man}-${erl_xcomp_os}-${erl_xcomp_target_xtra}
-
-##
-## Sizes (in bytes) of some important types.
-##
-# void *
-erl_xcomp_void_p=
-# short
-erl_xcomp_short=
-# int
-erl_xcomp_int=
-# long
-erl_xcomp_long=
-# long long (use 0 if no 'long long' type exist)
-erl_xcomp_long_long=
-# size_t
-erl_xcomp_sizeof_size_t=
-# off_t
-erl_xcomp_sizeof_off_t=
-
-### ----------------------------------------------------------------------------
-### The variables in the following section have to be set for linux systems
-###
-# linux kernel version (as reported by "uname -r")
-erl_xcomp_linux_kernel=
+## Target system. The value will be passed as '--host' argument to the configure
+## script. It does not have to be a full CPU-VENDOR-OS tripplet, but can be. The
+## full CPU-VENDOR-OS tripplet will be created by:
+## $ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host
+##
+erl_xcomp_host=
### ----------------------------------------------------------------------------
-### ---------------------------------------------------------------------------
### To override the configure flags for a special target system, You
### can set this variable which overrides configure parameters on the
### command line and instead uses the specified options. The variable
### leaves the build-host system untouched.
-### ---------------------------------------------------------------------------
+### ----------------------------------------------------------------------------
erl_xcomp_configure_flags=
-###----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
### You can specify a specific CC or LD for the build target (the cross
### compiler) here along with magic CFLAGS and/or LDFLAGS if needed
### ar and ranlib might also be specified if needed.
-###----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
erl_xcomp_cc=
@@ -106,7 +66,7 @@ erl_xcomp_ranlib=
erl_xcomp_ar=
-###----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
### The ded_ls and ded_ldflags variables control linking of dynamically loaded
### erlang drivers. On i.e. Linux these are set to
### $(CC) and "-shared" respectively, but other OS'es might need other
@@ -114,7 +74,7 @@ erl_xcomp_ar=
### erl_xcomp_ded_ld_runtime_library_path is the flag to set a
### specific runtime library path for the shared library at link time,
### usually this should be left empty.
-###----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
erl_xcomp_ded_ld=
@@ -122,83 +82,117 @@ erl_xcomp_ded_ldflags=
erl_xcomp_ded_ld_runtime_library_path=
-### The variables in the following section does not need to be set. Only
-### set these if you really know what you are doing.
+###
+### Optional feature, or bug tests
+###
+### These tests cannot (always) be done automatically when cross compiling.
+### You usually does not need to set these variables. Only set these if you
+### really know what you are doing.
###
##
-## Big endian/little endian can usually be determined by configure correctly,
-## but if not, set this variable
-##
+## erl_xcomp_bigendian - yes|no
+## If yes, the target system must be big endian. If no, little endian. This
+## can often be automatically detected, but not always. If not automatically
+## detected, configure will fail unless this variable is set. No default value
+## is used, i.e., configure will try to figure this out automatically.
erl_xcomp_bigendian=
##
-## If you have a working poll that can be used: yes|no
+## erl_xcomp_linux_clock_gettime_correction - yes|no (defaults to yes)
+## If yes, clock_gettime(CLOCK_MONOTONIC, _) on the target system must work.
+## This variable is recommended to be set to no on Linux systems with kernel
+## versions less than 2.6.
+##
+erl_xcomp_linux_clock_gettime_correction=
+
+##
+## erl_xcomp_linux_nptl - yes|no (defaults to yes on Linux; otherwise, no)
+## If yes, the target system must have NPTL (Native POSIX Thread Library).
+## Older Linux systems have LinuxThreads instead of NPTL (Linux kernel
+## versions typically less than 2.6).
+##
+erl_xcomp_linux_nptl=
+
+##
+## erl_xcomp_linux_usable_sigusrx - yes|no (defaults to yes)
+## If yes, the SIGUSR1 and SIGUSR2 must be usable by the ERTS. Old
+## LinuxThreads thread libraries (Linux kernel versions less than 2.2) used
+## these signals and made them unusable by the ERTS.
+##
+erl_xcomp_linux_usable_sigusrx=
+
+##
+## erl_xcomp_linux_usable_sigaltstack - yes|no (defaults to yes)
+## If yes, sigaltstack() must be usable on the target system. sigaltstack()
+## on Linux kernel versions less than 2.4 are broken.
+##
+erl_xcomp_linux_usable_sigaltstack=
+
+##
+## erl_xcomp_poll - yes|no (defaults to no on Darwin/MacOSX; otherwise, yes)
+## If yes, the target system must have a working poll() implementation that
+## also can handle devices. If no, select() will be used instead of poll().
##
erl_xcomp_poll=
##
-## If you have a working kqueue() that can be used: yes|no
+## erl_xcomp_kqueue - yes|no (defaults to no)
+## If yes, the target system must have a working kqueue() implementation that
+## returns a file descriptor which can be used by poll() and/or select().
+## If no and the target system has not got epoll() or /dev/poll, the
+## kernel-poll feature will be disabled.
##
erl_xcomp_kqueue=
##
-## If you have a putenv() that stores a copy of the key-value pair: yes|no
+## erl_xcomp_putenv_copy - yes|no (defaults to no)
+## If yes, the target system must have a putenv() implementation that stores a
+## copy of the key/value pair.
##
erl_xcomp_putenv_copy=
##
-## If you have reliable floating point exeptions that can be
-## used: yes|no
+## erl_xcomp_reliable_fpe - yes|no (defaults to no)
+## If yes, the target system must have reliable floating point exceptions.
##
erl_xcomp_reliable_fpe=
##
-## If you have getaddrinfo() usable for ipv6: yes|no
+## erl_xcomp_getaddrinfo - yes|no (defaults to no)
+## If yes, the target system must have a working getaddrinfo() implementation
+## that can handle both IPv4 and IPv6.
##
erl_xcomp_getaddrinfo=
##
-## If you have a gethrvtime() that works and uses ioctl()
-## to /proc/self: yes|no
+## erl_xcomp_gethrvtime_procfs_ioctl - yes|no (defaults to no)
+## If yes, the target system must have a working gethrvtime() implementation
+## and is used with procfs ioctl().
##
erl_xcomp_gethrvtime_procfs_ioctl=
##
-## If you have a working clock_gettime(): yes|no
+## erl_xcomp_clock_gettime - yes|no (defaults to no)
+## If yes, the target system must have a working clock_gettime()
+## implementation that can be used for retrieving process CPU time.
##
erl_xcomp_clock_gettime=
##
-## If you have a __after_morecore_hook that can track malloc()s
-## core memory use: yes|no
+## erl_xcomp_after_morecore_hook - yes|no (defaults to no)
+## If yes, the target system must have a working __after_morecore_hook that
+## can be used for tracking used malloc() implementations core memory usage.
##
erl_xcomp_after_morecore_hook=
##
-## If you have brk, sbrk and end symbols: yes|no
-##
-# brk
-erl_xcomp_have_brk=
-# _brk
-erl_xcomp_have__brk=
-# __brk
-erl_xcomp_have___brk=
-# sbrk
-erl_xcomp_have_sbrk=
-# _sbrk
-erl_xcomp_have__sbrk=
-# __sbrk
-erl_xcomp_have___sbrk=
-# end
-erl_xcomp_end=
-# _end
-erl_xcomp__end=
-
-##
-## If sbrk/brk wrappers using dlsym(RTLD_NEXT, _) can track malloc()s
-## core memory use: yes|no
+## erl_xcomp_dlsym_brk_wrappers - yes|no (defaults to no)
+## If yes, the target system must have a working dlsym(RTLD_NEXT, <S>)
+## implementation that can be used on 'brk' and 'sbrk' symbols used by the
+## malloc() implementation in use, and by this track the malloc()
+## implementations core memory usage.
##
-erl_xcomp_brk_wrappers=
+erl_xcomp_dlsym_brk_wrappers=
### ----------------------------------------------------------------------------