mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-24 16:13:38 +03:00
Use -std=gnu11 if available.
This supersedes -std=gnu99, and enables C11 atomics.
This commit is contained in:
parent
213667fe26
commit
cb3ad659f0
1 changed files with 8 additions and 2 deletions
10
configure.ac
10
configure.ac
|
|
@ -171,9 +171,15 @@ fi
|
||||||
if test "x$CFLAGS" = "x" ; then
|
if test "x$CFLAGS" = "x" ; then
|
||||||
no_CFLAGS="yes"
|
no_CFLAGS="yes"
|
||||||
if test "x$GCC" = "xyes" ; then
|
if test "x$GCC" = "xyes" ; then
|
||||||
JE_CFLAGS_APPEND([-std=gnu99])
|
dnl JE_CFLAGS_APPEND([-std=gnu99])
|
||||||
if test "x$je_cv_cflags_appended" = "x-std=gnu99" ; then
|
JE_CFLAGS_APPEND([-std=gnu11])
|
||||||
|
if test "x$je_cv_cflags_appended" = "x-std=gnu11" ; then
|
||||||
AC_DEFINE_UNQUOTED([JEMALLOC_HAS_RESTRICT])
|
AC_DEFINE_UNQUOTED([JEMALLOC_HAS_RESTRICT])
|
||||||
|
else
|
||||||
|
JE_CFLAGS_APPEND([-std=gnu99])
|
||||||
|
if test "x$je_cv_cflags_appended" = "x-std=gnu99" ; then
|
||||||
|
AC_DEFINE_UNQUOTED([JEMALLOC_HAS_RESTRICT])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
JE_CFLAGS_APPEND([-Wall])
|
JE_CFLAGS_APPEND([-Wall])
|
||||||
JE_CFLAGS_APPEND([-Werror=declaration-after-statement])
|
JE_CFLAGS_APPEND([-Werror=declaration-after-statement])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue