]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Use BUILD_CC when checking gcc version in DevicePath
authorJake Garver <jake@nvidia.com>
Tue, 20 Dec 2022 13:14:12 +0000 (21:14 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 30 Dec 2022 04:30:30 +0000 (04:30 +0000)
When checking the version in DevicePath's Makefile, use BUILD_CC instead
of assuming "gcc".  BUILD_CC is set in header.makefile and is the
compiler that will actually be used to build DevicePath.  It defaults to
"gcc", but may be overridden.

Signed-off-by: Jake Garver <jake@nvidia.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/C/DevicePath/GNUmakefile

index 17f213879e820a4d347b52b0df98b642031ed350..13b54ead65ac2d8a3ea8a28caed2109fe048ae21 100644 (file)
@@ -13,7 +13,7 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o  DevicePathUtili
 \r
 include $(MAKEROOT)/Makefiles/app.makefile\r
 \r
-GCCVERSION = $(shell gcc -dumpversion | awk -F'.' '{print $$1}')\r
+GCCVERSION = $(shell $(BUILD_CC) -dumpversion | awk -F'.' '{print $$1}')\r
 ifneq ("$(GCCVERSION)", "5")\r
 ifneq ($(CXX), llvm)\r
 ifneq ($(DARWIN),Darwin)\r