public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] BaseTools: Use BUILD_CC when checking gcc version in DevicePath
@ 2022-12-20 13:14 Jake Garver
  2022-12-29 10:46 ` Bob Feng
  0 siblings, 1 reply; 2+ messages in thread
From: Jake Garver @ 2022-12-20 13:14 UTC (permalink / raw)
  To: devel; +Cc: jbrasen, ashishsingha, bob.c.feng, gaoliming, yuwei.chen,
	Jake Garver

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>
---
 BaseTools/Source/C/DevicePath/GNUmakefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile
index 17f213879e..13b54ead65 100644
--- a/BaseTools/Source/C/DevicePath/GNUmakefile
+++ b/BaseTools/Source/C/DevicePath/GNUmakefile
@@ -13,7 +13,7 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o  DevicePathUtili
 
 include $(MAKEROOT)/Makefiles/app.makefile
 
-GCCVERSION = $(shell gcc -dumpversion | awk -F'.' '{print $$1}')
+GCCVERSION = $(shell $(BUILD_CC) -dumpversion | awk -F'.' '{print $$1}')
 ifneq ("$(GCCVERSION)", "5")
 ifneq ($(CXX), llvm)
 ifneq ($(DARWIN),Darwin)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] BaseTools: Use BUILD_CC when checking gcc version in DevicePath
  2022-12-20 13:14 [PATCH] BaseTools: Use BUILD_CC when checking gcc version in DevicePath Jake Garver
@ 2022-12-29 10:46 ` Bob Feng
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Feng @ 2022-12-29 10:46 UTC (permalink / raw)
  To: Jake Garver, devel@edk2.groups.io
  Cc: jbrasen@nvidia.com, ashishsingha@nvidia.com, Gao, Liming,
	Chen, Christine

Thank you for fixing this issue.

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Jake Garver <jake@nvidia.com> 
Sent: Tuesday, December 20, 2022 9:14 PM
To: devel@edk2.groups.io
Cc: jbrasen@nvidia.com; ashishsingha@nvidia.com; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Jake Garver <jake@nvidia.com>
Subject: [PATCH] BaseTools: Use BUILD_CC when checking gcc version in DevicePath

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>
---
 BaseTools/Source/C/DevicePath/GNUmakefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile
index 17f213879e..13b54ead65 100644
--- a/BaseTools/Source/C/DevicePath/GNUmakefile
+++ b/BaseTools/Source/C/DevicePath/GNUmakefile
@@ -13,7 +13,7 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o  DevicePathUtili
 
 include $(MAKEROOT)/Makefiles/app.makefile
 
-GCCVERSION = $(shell gcc -dumpversion | awk -F'.' '{print $$1}')
+GCCVERSION = $(shell $(BUILD_CC) -dumpversion | awk -F'.' '{print 
+$$1}')
 ifneq ("$(GCCVERSION)", "5")
 ifneq ($(CXX), llvm)
 ifneq ($(DARWIN),Darwin)
--
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-29 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-20 13:14 [PATCH] BaseTools: Use BUILD_CC when checking gcc version in DevicePath Jake Garver
2022-12-29 10:46 ` Bob Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox