public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Jake Garver" <jake@nvidia.com>
To: <devel@edk2.groups.io>
Cc: <jbrasen@nvidia.com>, <ashishsingha@nvidia.com>,
	<bob.c.feng@intel.com>, <gaoliming@byosoft.com.cn>,
	<yuwei.chen@intel.com>, Jake Garver <jake@nvidia.com>
Subject: [PATCH] BaseTools: Use BUILD_CC when checking gcc version in DevicePath
Date: Tue, 20 Dec 2022 08:14:12 -0500	[thread overview]
Message-ID: <268c8606bfb6b210c932c7c8978469efaab1c2ac.1671541950.git.jake@nvidia.com> (raw)

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


             reply	other threads:[~2022-12-20 13:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 13:14 Jake Garver [this message]
2022-12-29 10:46 ` [PATCH] BaseTools: Use BUILD_CC when checking gcc version in DevicePath Bob Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=268c8606bfb6b210c932c7c8978469efaab1c2ac.1671541950.git.jake@nvidia.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox