common.mk: update from platform2

  - e6588e5542d0813544a5910f935e231e2cf1cdd3 common-mk: check support for -Wxor-used-as-pow by Daniel Verkamp <dverkamp@chromium.org>

GitOrigin-RevId: e6588e5542d0813544a5910f935e231e2cf1cdd3
Change-Id: I16653ac4eb3eddc577f3563c5ecd86e4b304c580
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/libevdev/+/6447034
Reviewed-by: Sean O'Brien <seobrien@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Sean O'Brien <seobrien@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/common.mk b/common.mk
index c695994..03e886c 100644
--- a/common.mk
+++ b/common.mk
@@ -311,17 +311,15 @@
 #  CXXFLAGS := -mahflag $(CXXFLAGS) # Prepend to the list
 #  CXXFLAGS := $(filter-out badflag,$(CXXFLAGS)) # Filter out a value
 # The same goes for CFLAGS.
-# libevdev: Move -Wxor-used-as-pow from COMMON_FLAGS as it is unsupported by
-#           the GCC version in chroot used to run touchpad tests.
 COMMON_CFLAGS-gcc := -fvisibility=internal -ggdb3 -Wa,--noexecstack
 COMMON_CFLAGS-clang := -fvisibility=hidden -ggdb -Wimplicit-fallthrough \
-  -Wstring-plus-int -Wxor-used-as-pow
+  -Wstring-plus-int
 # When a class is exported through __attribute__((visibility("default"))), we
 # still want to eliminate symbols from inline class member functions to reduce
 # symbol resolution overhead. Therefore, pass -fvisibility-inlines-hidden in
 # addition to -fvisibility=hidden. (go/cros-symbol-slimming)
 COMMON_CFLAGS := -Wall -Wunused -Wno-unused-parameter -Wunreachable-code \
-  -Wbool-operation -Wstring-compare \
+  -Wbool-operation -Wstring-compare $(call check_cc,-Wxor-used-as-pow) \
   -Wint-in-bool-context -Wfree-nonheap-object \
   -Werror -Wformat=2 -fno-strict-aliasing  \
   $(SSP_CFLAGS) -O1