[PATCH] build: Check for broken GCC -Wlogical-op was too optimistic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The check for a broken GCC -Wlogical-op implemententation
was written under the wrong assumption that unknown warning
options would be gracefully ignored.
Thanks to Eric Blake and Daniel Berrange for pointing that
out.

Signed-off-by: Viktor Mihajlovski <mihajlov@xxxxxxxxxxxxxxxxxx>
---
 configure.ac |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 20caa92..828ae01 100644
--- a/configure.ac
+++ b/configure.ac
@@ -260,7 +260,13 @@ dnl which is the case with a certain range of GCC versions
 AC_MSG_CHECKING([whether GCC -Wlogical-op is broken])
 
 save_CFLAGS="$CFLAGS"
-CFLAGS="-O2 -Wlogical-op -Werror"
+for w_opt in $WARN_CFLAGS; do
+   case $w_opt in
+      "-Wlogical-op" | "-Werror" )
+         CFLAGS="$CFLAGS $w_opt"
+      ;;
+   esac
+done
 
 AC_TRY_COMPILE([#include <string.h>],
                 [const char *haystack;
-- 
1.7.9.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]