diff options
author | Rickard Green <[email protected]> | 2015-03-20 22:05:10 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2015-03-20 22:05:10 +0100 |
commit | b99ce1c3a64f24e68b8a937338546fdf60501c65 (patch) | |
tree | f05aca3b1f87413ea9f04cd9b3569597da0f996f /erts/configure.in | |
parent | 6642d62c071f94d3e76254453099e2df01f7ad0e (diff) | |
parent | 24fa075b5c0d54f2035a2ff510a82aa19187eda4 (diff) | |
download | otp-b99ce1c3a64f24e68b8a937338546fdf60501c65.tar.gz otp-b99ce1c3a64f24e68b8a937338546fdf60501c65.tar.bz2 otp-b99ce1c3a64f24e68b8a937338546fdf60501c65.zip |
Merge branch 'rickard/gcc-atomics/OTP-12383'
* rickard/gcc-atomics/OTP-12383:
Improve ethread atomics based on GCC builtins
Conflicts:
erts/aclocal.m4
Diffstat (limited to 'erts/configure.in')
-rw-r--r-- | erts/configure.in | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/erts/configure.in b/erts/configure.in index f248cbe34d..481dfe405e 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. -*-m4-*- dnl %CopyrightBegin% dnl -dnl Copyright Ericsson AB 1997-2014. All Rights Reserved. +dnl Copyright Ericsson AB 1997-2015. 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 @@ -1105,10 +1105,31 @@ if test $ERTS_BUILD_SMP_EMU = yes; then case "$ethr_have_native_atomics-$smp_require_native_atomics-$ethr_have_native_spinlock" in yes-*) + if test "$ethr_native_atomic_implementation" = "gcc_sync"; then + test -f "$ERL_TOP/erts/CONF_INFO" || + echo "" > "$ERL_TOP/erts/CONF_INFO" + cat >> $ERL_TOP/erts/CONF_INFO <<EOF + + WARNING: + Only gcc's __sync_* builtins available for + atomic memory access. This will cause lots + of expensive and unnecessary memory barrier + instructions to be issued which will make + the performance of the runtime system + suffer. You are *strongly* advised to + upgrade to a gcc version that supports the + __atomic_* builtins (at least gcc version + 4.7) or build with libatomic_ops. See the + "Atomic Memory Operations and the VM" + chapter of \$ERL_TOP/HOWTO/INSTALL.md for + more information. + +EOF + fi ;; no-yes-*) - AC_MSG_ERROR([No native atomic implementation found. See Configuring section in INSTALL.md for more information.]) + AC_MSG_ERROR([No native atomic implementation found. See the \"Atomic Memory Operations and the VM\" chapter of \$ERL_TOP/HOWTO/INSTALL.md for more information.]) ;; no-no-yes) |