aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-02-14 17:41:50 +0100
committerSverker Eriksson <[email protected]>2018-02-14 17:41:50 +0100
commit62176184ba0a68d4c2ef17283a9915fddf87ddff (patch)
tree9f9bf7df6e47d9636e4946d34e3c6c6aa9cb6dc7 /erts/configure.in
parentbf0d03bd6f393b6a4f7836c5203e9a83caf457e8 (diff)
parent6a09d85b1762b87d0dc6cf503fcb20080237339b (diff)
downloadotp-62176184ba0a68d4c2ef17283a9915fddf87ddff.tar.gz
otp-62176184ba0a68d4c2ef17283a9915fddf87ddff.tar.bz2
otp-62176184ba0a68d4c2ef17283a9915fddf87ddff.zip
Merge branch 'sverker/gc-move-opt'
Diffstat (limited to 'erts/configure.in')
-rw-r--r--erts/configure.in21
1 files changed, 19 insertions, 2 deletions
diff --git a/erts/configure.in b/erts/configure.in
index dd6c52b079..b2435f1ac9 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -1760,6 +1760,25 @@ if test $ac_cv_sizeof_void_p = 8; then
fi
AC_SUBST(BITS64)
+AC_MSG_CHECKING([for C compiler 'restrict' support])
+restrict_keyword=""
+for x in restrict __restrict; do
+ AC_TRY_COMPILE([int * $x foo(int * $x arg);
+ int * $x foo(int * $x arg)
+ { int * $x var=arg; return var;}
+ ],[],
+ [restrict_keyword=$x],[])
+ if test "x$restrict_keyword" != "x"; then
+ break
+ fi
+done
+AC_DEFINE_UNQUOTED(ERTS_RESTRICT,[$restrict_keyword],[Type qualifier restrict])
+if test "x$restrict_keyword" != "x"; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
if test "x$ac_compiler_gnu" = "xyes"; then
AC_MSG_CHECKING([if we should add -fno-tree-copyrename to CFLAGS for computed gotos to work properly])
AC_TRY_COMPILE([],[
@@ -1779,8 +1798,6 @@ else
AC_MSG_RESULT(no)
fi
-
-
AC_MSG_CHECKING([for broken gcc-4.3.0 compiler])
AC_TRY_RUN([
/* pr36339.c */