BaseTools: Fix DevicePath GNUmakefile for macOS

On macOS, /usr/bin/gcc is clang, and so doesn't have
the -Wno-error=stringop-overflow flag that was added
for gcc 12.
Update the GNUmakefile for DevicePath to skip setting
that on macOS.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile
index c217674..17f2138 100644
--- a/BaseTools/Source/C/DevicePath/GNUmakefile
+++ b/BaseTools/Source/C/DevicePath/GNUmakefile
@@ -16,10 +16,12 @@
 GCCVERSION = $(shell gcc -dumpversion | awk -F'.' '{print $$1}')

 ifneq ("$(GCCVERSION)", "5")

 ifneq ($(CXX), llvm)

+ifneq ($(DARWIN),Darwin)

 # gcc 12 trips over device path handling

 BUILD_CFLAGS += -Wno-error=stringop-overflow

 endif

 endif

+endif

 

 LIBS = -lCommon

 ifeq ($(CYGWIN), CYGWIN)