Fix the DevicePath tool build failure that was introduced by
the fixes:
22130dcd98b4 ("Basetools: turn off gcc12 warning").
Failure cases are:
1. clang 13.1.6 on macOS
2. gcc5.4
Reported-by: Rebecca Cran <rebecca@bsdio.com>
Reported-by: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
\r
include $(MAKEROOT)/Makefiles/app.makefile\r
\r
+GCCVERSION = $(shell gcc -dumpversion | awk -F'.' '{print $$1}')\r
+ifneq ("$(GCCVERSION)", "5")\r
+ifneq ($(CXX), llvm)\r
# gcc 12 trips over device path handling\r
BUILD_CFLAGS += -Wno-error=stringop-overflow\r
+endif\r
+endif\r
\r
LIBS = -lCommon\r
ifeq ($(CYGWIN), CYGWIN)\r