public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Jiyang Yang" <jiyangx.yang@intel.com>
To: devel@edk2.groups.io
Cc: "Jiyang Yang" <jiyangx.yang@intel.com>,
	"Ard Biesheuvel" <ardb+tianocore@kernel.org>,
	"Sami Mujawar" <sami.mujawar@arm.com>,
	"Jiewen Yao" <jiewen.yao@intel.com>,
	"Supreeth Venkatesh" <supreeth.venkatesh@arm.com>,
	"Vitaly Cheptsov" <vit9696@protonmail.com>,
	"Marvin Häuser" <mhaeuser@posteo.de>,
	"Steven Shi" <steven.shi@intel.com>
Subject: [PATCH v1 1/1] StandaloneMmPkg: To support CLANGPDB build
Date: Thu, 14 Oct 2021 11:12:35 +0800	[thread overview]
Message-ID: <20211014031235.1839-2-jiyangx.yang@intel.com> (raw)
In-Reply-To: <20211014031235.1839-1-jiyangx.yang@intel.com>

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 <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Cc: Vitaly Cheptsov <vit9696@protonmail.com>
Cc: Marvin Häuser <mhaeuser@posteo.de>
Cc: Steven Shi <steven.shi@intel.com>
Signed-off-by: Jiyang Yang <jiyangx.yang@intel.com>
---
 StandaloneMmPkg/Core/StandaloneMmCore.inf                                         | 2 ++
 StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf | 1 +
 2 files changed, 3 insertions(+)

diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf b/StandaloneMmPkg/Core/StandaloneMmCore.inf
index 56042b7b39f4..3213142523f4 100644
--- a/StandaloneMmPkg/Core/StandaloneMmCore.inf
+++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf
@@ -79,3 +79,5 @@
 [BuildOptions]
   GCC:*_*_*_CC_FLAGS = -fpie
   GCC:*_*_*_DLINK_FLAGS = -Wl,-z,text,-Bsymbolic,-pie
+  CLANGPDB:*_*_*_CC_FLAGS = -fno-pie
+  CLANGPDB:*_*_*_DLINK_FLAGS =
diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
index 1762586cfa02..ef69e07d2c07 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
@@ -56,3 +56,4 @@
 
 [BuildOptions]
   GCC:*_*_*_CC_FLAGS = -fpie
+  CLANGPDB:*_*_*_CC_FLAGS = -fno-pie
-- 
2.26.2.windows.1


  reply	other threads:[~2021-10-14  3:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14  3:12 [PATCH v1 0/1] StandaloneMmPkg: To support CLANGPDB build jiyangx.yang
2021-10-14  3:12 ` Jiyang Yang [this message]
2021-10-14  8:05   ` [PATCH v1 1/1] " Marvin Häuser
2021-10-14  9:02     ` [edk2-devel] " Steven Shi
2021-10-14  9:08       ` Marvin Häuser
2021-10-14  9:09         ` Ard Biesheuvel
2021-10-14  9:13           ` Marvin Häuser
2021-10-14 13:14         ` Steven Shi

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=20211014031235.1839-2-jiyangx.yang@intel.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