From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web09.4441.1634181171085037265 for ; Wed, 13 Oct 2021 20:12:52 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: jiyangx.yang@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="227547031" X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="227547031" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 20:12:52 -0700 X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="524889862" Received: from jiyangyx-mobl.ccr.corp.intel.com ([10.249.173.13]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 20:12:49 -0700 From: "Jiyang Yang" To: devel@edk2.groups.io Cc: Jiyang Yang , Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Supreeth Venkatesh , Vitaly Cheptsov , =?UTF-8?q?Marvin=20H=C3=A4user?= , Steven Shi Subject: [PATCH v1 1/1] StandaloneMmPkg: To support CLANGPDB build Date: Thu, 14 Oct 2021 11:12:35 +0800 Message-Id: <20211014031235.1839-2-jiyangx.yang@intel.com> X-Mailer: git-send-email 2.33.0.windows.2 In-Reply-To: <20211014031235.1839-1-jiyangx.yang@intel.com> References: <20211014031235.1839-1-jiyangx.yang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable the flag "-fpie" is passed for all builds with a GCC family toolchain, including CLANGPDB, but CLANGPDB does not support this flag, it will report "clang: error: unsupported option '-fpie' for target 'x86_64-unknown-windows-gnu'". So we add the CLANGPDB option "-fno-pie" later to overwrite it. Cc: Ard Biesheuvel Cc: Sami Mujawar Cc: Jiewen Yao Cc: Supreeth Venkatesh Cc: Vitaly Cheptsov Cc: Marvin H=C3=A4user Cc: Steven Shi Signed-off-by: Jiyang Yang --- StandaloneMmPkg/Core/StandaloneMmCore.inf = | 2 ++ StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPo= int.inf | 1 + 2 files changed, 3 insertions(+) diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf b/StandaloneMmPkg/Co= re/StandaloneMmCore.inf index 56042b7b39f4..3213142523f4 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf @@ -79,3 +79,5 @@ [BuildOptions]=0D GCC:*_*_*_CC_FLAGS =3D -fpie=0D GCC:*_*_*_DLINK_FLAGS =3D -Wl,-z,text,-Bsymbolic,-pie=0D + CLANGPDB:*_*_*_CC_FLAGS =3D -fno-pie=0D + CLANGPDB:*_*_*_DLINK_FLAGS =3D=0D diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneM= mCoreEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/St= andaloneMmCoreEntryPoint.inf index 1762586cfa02..ef69e07d2c07 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEn= tryPoint.inf +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEn= tryPoint.inf @@ -56,3 +56,4 @@ =0D [BuildOptions]=0D GCC:*_*_*_CC_FLAGS =3D -fpie=0D + CLANGPDB:*_*_*_CC_FLAGS =3D -fno-pie=0D --=20 2.26.2.windows.1