From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web08.31034.1649043997149860174 for ; Sun, 03 Apr 2022 20:46:37 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=N+Gwi+qB; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: bob.c.feng@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649043997; x=1680579997; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Mf9Ibk3GsBq59B4SSe/8O78nRDHyp2YV4b9/5eADzvo=; b=N+Gwi+qBBc1S7vr5LilKqdganoaJN6JIW+sbxB4TM0w+L4IC4A3OvetO RI5OWC71L5O/ULxdQ9nI/2c4jHVVP6pu8idreL1TiPEbvR3VuP4p4HJFw aUcaMgeOr92kLxbGNtYm46+8lGkOYYe4/72gYrh2KAmXnMD4Cu79ht1t3 lFa41IsQuMBA3P416O2ZSpdKB7vo57kwJY2RvP5+frwGiLlHrVLpjO1JQ 4YxB8a/jTXKP2fPaPiZs9w2sm/cqNUCPKFcdVTOWhRJfwOpN9fiwRet2q 0lFylDEmAw/C9Gj3TOJxVEnW5d0SQraX9GxQ6P16MCCzj8X0K9IgI91Ao g==; X-IronPort-AV: E=McAfee;i="6200,9189,10306"; a="258013765" X-IronPort-AV: E=Sophos;i="5.90,233,1643702400"; d="scan'208";a="258013765" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2022 20:46:36 -0700 X-IronPort-AV: E=Sophos;i="5.90,233,1643702400"; d="scan'208";a="569217008" Received: from bfeng1-mobl1.ccr.corp.intel.com ([10.249.169.141]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2022 20:46:34 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: "Feng, Bob C" , Rebecca Cran , Yuwei Chen , Gerd Hoffmann , Liming Gao Subject: [Patch V2] BaseTools: Fix DevicePath tool build failure issue Date: Mon, 4 Apr 2022 11:46:21 +0800 Message-Id: <20220404034621.167-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.29.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: "Feng, Bob C" Fix the DevicePath tool build failure that was introduced by the fixes: 22130dcd98b4 ("Basetools: turn off gcc12 warning"). Failure cases are: 1. clang 13.1.6 on macOS 2. gcc5.4 Reported-by: Rebecca Cran Reported-by: Yuwei Chen Signed-off-by: Gerd Hoffmann Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Cc: Rebecca Cran ---=0D V2 update the method to get gcc version BaseTools/Source/C/DevicePath/GNUmakefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C= /DevicePath/GNUmakefile index b05d2bddfa..c217674345 100644 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -11,12 +11,17 @@ APPNAME =3D DevicePath =0D OBJECTS =3D DevicePath.o UefiDevicePathLib.o DevicePathFromText.o DeviceP= athUtilities.o=0D =0D include $(MAKEROOT)/Makefiles/app.makefile=0D =0D +GCCVERSION =3D $(shell gcc -dumpversion | awk -F'.' '{print $$1}')=0D +ifneq ("$(GCCVERSION)", "5")=0D +ifneq ($(CXX), llvm)=0D # gcc 12 trips over device path handling=0D BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow=0D +endif=0D +endif=0D =0D LIBS =3D -lCommon=0D ifeq ($(CYGWIN), CYGWIN)=0D LIBS +=3D -L/lib/e2fsprogs -luuid=0D endif=0D --=20 2.29.1.windows.1