diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-14 11:49:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-14 11:49:46 +0200 |
commit | b97a0e941937ad38f5a20d0ab7cea4812fb2fcae (patch) | |
tree | 8afe993e085ce5de511ba7d35b79fa02f666b65c /configure.ac | |
parent | 38c3386549251a46e0659c179883ee4370dad63a (diff) |
really disable -Og on clang
Change-Id: If65cbe691d427a68985de0f8b4c0f9ada7ab281f
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index 29a30d02bc20..38a98dda14c3 100644 --- a/configure.ac +++ b/configure.ac @@ -3790,18 +3790,20 @@ if test "$GCC" = "yes"; then AC_MSG_RESULT([no]) fi - AC_MSG_CHECKING([whether $CC supports -Og]) - # Note that clang-3.1 reports a real error for this option - # so we do not need a special case for clang<=3.1 as above. - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Werror -Og" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_OG=TRUE ],[]) - CFLAGS=$save_CFLAGS # clang as of version 4.0.0 (trunk 289424) doesn't do this very well (missing locals, bad param info in stack frame) - if test "$HAVE_GCC_OG" = "TRUE" -a "$COM_IS_CLANG" != "TRUE"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) + if "$COM_IS_CLANG" != "TRUE"; then + AC_MSG_CHECKING([whether $CC supports -Og]) + # Note that clang-3.1 reports a real error for this option + # so we do not need a special case for clang<=3.1 as above. + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Werror -Og" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_OG=TRUE ],[]) + CFLAGS=$save_CFLAGS + if test "$HAVE_GCC_OG" = "TRUE"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi fi fi AC_SUBST(HAVE_GCC_GGDB2) |