From b97a0e941937ad38f5a20d0ab7cea4812fb2fcae Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 14 Dec 2016 11:49:46 +0200 Subject: really disable -Og on clang Change-Id: If65cbe691d427a68985de0f8b4c0f9ada7ab281f --- configure.ac | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'configure.ac') 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) -- cgit