From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.19713.1648959650999152155 for ; Sat, 02 Apr 2022 21:20:51 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=IyQCiB+I; spf=pass (domain: intel.com, ip: 134.134.136.24, 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=1648959651; x=1680495651; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OFe+nf/gUV+Hf72G3/Z3/vRE/TjvWUZGeRAr0BMMelM=; b=IyQCiB+I7S1jZ9CKahELzV4dmvVOl74uDbsOILWWbtMUxix+ep5O6mON C9+XKvVkAXSPQB5k+D4Z8/7EH0Kv9/TOPDe11nIM3+aBm9SJkb0cjQFPJ 9g0f+ysvRpwnLGgb5VhO6WNwJ5uk506f1fJsYIirefYlrw5pQqh7Ea+wY zMb5U0CCQlvnlk01bGe2BUdEinRwBNudPvJktcz27mfIpUO4YFaV9JO5V xl6QBDKRFySdKgf8PgQc/4qt34xSKcgkpurPnr1iREgi8r6vIT2slpcfN z0gPeHjRXqqgbf7dppmlZyqQk2yCY+I6MDla5fzfSqDRdd0SttHmfcAFQ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10305"; a="260052945" X-IronPort-AV: E=Sophos;i="5.90,231,1643702400"; d="scan'208";a="260052945" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2022 21:20:50 -0700 X-IronPort-AV: E=Sophos;i="5.90,231,1643702400"; d="scan'208";a="568683312" Received: from bfeng1-mobl1.ccr.corp.intel.com ([10.249.172.162]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2022 21:20:48 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: "Feng, Bob C" , Rebecca Cran , Yuwei Chen , Gerd Hoffmann , Liming Gao Subject: [Patch] BaseTools: Fix DevicePath tool build failure issue Date: Sun, 3 Apr 2022 12:20:17 +0800 Message-Id: <20220403042017.2177-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 --- 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..7ef4c620e3 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 --version | grep ^gcc | sed 's/^.* //g' | 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