From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web08.48017.1658276533982402460 for ; Tue, 19 Jul 2022 17:22:14 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=BaZpPchT; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: yuwei.chen@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658276534; x=1689812534; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=YjLlVLNq6ZRXt7d7mQTlOJ3uzyvF4hh9K3W393/NiWw=; b=BaZpPchTSS36PIWClrgazzb+r1wu5cYAqF+sRQe/p2Uy1WtR/Ct+lscA qIiXD28wPzon7YwqzDKvLVXB+ledEWgrPg4iEpF+MQ880dYb+dT3rr/DM uBIKDhzM2fbUyET3q9AftQyHTzuhvxX/X5J3PrcVx4vGww1gR44TiaZYO Okqo5fHBltoxVGX5bJEDm/WGOKRVbzscz0QNNr/+lGSCZb6PBOqxgU25j KO6lhHos/H0+m/Aa3SdG/jWTvBbs4p2VVKCzAwdphqMAc/YgSY6Fzdmu9 YsP3x/t8Bxq1Ub504kJxbwTSrcELWHuYqaVT1oPhx7GSk60oKLjIEkKxU w==; X-IronPort-AV: E=McAfee;i="6400,9594,10413"; a="348334044" X-IronPort-AV: E=Sophos;i="5.92,285,1650956400"; d="scan'208";a="348334044" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2022 17:22:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,285,1650956400"; d="scan'208";a="700662315" Received: from yuweipc.ccr.corp.intel.com ([10.239.158.38]) by fmsmga002.fm.intel.com with ESMTP; 19 Jul 2022 17:22:12 -0700 From: "Yuwei Chen" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao Subject: [Patch V2 1/1] BaseTools: remove directly calling for gcc command Date: Wed, 20 Jul 2022 08:21:45 +0800 Message-Id: <20220720002145.972-1-yuwei.chen@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In some environment, the directly calling for gcc is not supported. This patch fixes the issue. Cc: Bob Feng Cc: Liming Gao Signed-off-by: Yuwei Chen --- BaseTools/Source/C/DevicePath/GNUmakefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile old mode 100644 new mode 100755 index c217674345b1..5944e80bd2b4 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -13,12 +13,15 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o DevicePathUtili include $(MAKEROOT)/Makefiles/app.makefile -GCCVERSION = $(shell gcc -dumpversion | awk -F'.' '{print $$1}') +GCCVERSION=0 +ifneq ($(CXX), gcc) + GCCVERSION = $(shell $(CXX) -dumpversion | awk -F'.' '{print $$1}') +endif ifneq ("$(GCCVERSION)", "5") -ifneq ($(CXX), llvm) -# gcc 12 trips over device path handling -BUILD_CFLAGS += -Wno-error=stringop-overflow -endif + ifneq ($(CXX), llvm) + # gcc 12 trips over device path handling + BUILD_CFLAGS += -Wno-error=stringop-overflow + endif endif LIBS = -lCommon -- 2.27.0.windows.1