[nasm:nasm-2.15.xx] autoconf: use -std=c17 or -std=c11 if available

nasm-bot for H. Peter Anvin (Intel) hpa at zytor.com
Thu Jul 9 19:30:06 PDT 2020


Commit-ID:  5c90a7c237b63393314f2e5e5b7975925bee7943
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=5c90a7c237b63393314f2e5e5b7975925bee7943
Author:     H. Peter Anvin (Intel) <hpa at zytor.com>
AuthorDate: Thu, 9 Jul 2020 19:26:27 -0700
Committer:  H. Peter Anvin (Intel) <hpa at zytor.com>
CommitDate: Thu, 9 Jul 2020 19:26:27 -0700

autoconf: use -std=c17 or -std=c11 if available

If the compiler supports it, use -std=c17 or -std=c11. Hopefully, this
will give us more predictable behavior in some cases.

Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>


---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 7f054898..784191ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,8 @@ AC_USE_SYSTEM_EXTENSIONS
 AC_SYS_LARGEFILE
 AC_PROG_CC
 AC_PROG_CC_STDC
-PA_ADD_CFLAGS([-std=c11])
+PA_ADD_CFLAGS([-std=c17], [], [],
+[PA_ADD_CFLAGS([-std=c11])])
 
 dnl If the user did not specify a CFLAGS default, change default
 dnl to -O0 for debugging


More information about the Nasm-commits mailing list