Nico Huber has uploaded this change for review.

View Change

Move -Wlogical-op into xcompile

Clang doesn't know `-Wlogical-op`, so let's move it into xcompile where
we can easily check if it's supported.

Change-Id: I6a50de0bc5372f61337f237383d32645ba86b0fd
Signed-off-by: Nico Huber <nico.huber@secunet.com>
---
M Makefile.inc
M util/xcompile/xcompile
2 files changed, 4 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/33579/1
diff --git a/Makefile.inc b/Makefile.inc
index 48879bc..7ac0a82 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -401,7 +401,7 @@

CFLAGS_common += -pipe -g -nostdinc -std=gnu11
CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wlogical-op
+CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
CFLAGS_common += -Wstrict-aliasing -Wshadow -Wdate-time -Wtype-limits
CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
CFLAGS_common += -ffunction-sections -fdata-sections -fno-pie
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 7ab1cb7..052b88f 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -203,6 +203,9 @@
CFLAGS_GCC+=" -EL"
;;
esac
+
+ # Generally available in GCC but not in Clang:
+ CFLAGS_GCC="$CFLAGS_GCC -Wlogical-op"
}

detect_compiler_runtime() {

To view, visit change 33579. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6a50de0bc5372f61337f237383d32645ba86b0fd
Gerrit-Change-Number: 33579
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-MessageType: newchange