From: "Andrew Fish" <afish@apple.com>
To: devel@edk2.groups.io
Cc: Andrew Fish <afish@apple.com>, Bob Feng <bob.c.feng@intel.com>,
Liming Gao <liming.gao@intel.com>
Subject: [PATCH 2/3] BaseTools: Add PE/COFF resource sections support for XCODE
Date: Sun, 24 May 2020 14:20:10 -0700 [thread overview]
Message-ID: <c047eb13da78ee73a7402aa08b532b420ed442f6.1590354726.git.afish@apple.com> (raw)
In-Reply-To: <cover.1590354726.git.afish@apple.com>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=557
Build a nul lib in [Hii-Binary-Package.UEFI_HII] so the makefile
dependencies are satisfied.
Add --rc to Genfw in [Dynamic-Library-File] to inject the *hii.rc
data if it exists.
Signed-off-by: Andrew Fish <afish@apple.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Andrew Fish <afish@apple.com>
---
BaseTools/Conf/build_rule.template | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index 0822b681fcd9..00f729a40003 100755
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -393,7 +393,7 @@
"$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff
# create symbol file for GDB debug
-$(DSYMUTIL) ${src}
- "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
+ "$(GENFW)" -e $(MODULE_TYPE) --rc $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
$(CP) ${dst} $(DEBUG_DIR)
$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
@@ -645,10 +645,10 @@
<InputFile>
*.hpk
- <OutputFile.MSFT, OutputFile.INTEL, OutputFile.GCC, OutputFile.CLANGPDB>
+ <OutputFile.MSFT, OutputFile.INTEL, OutputFile.GCC, OutputFile.CLANGPDB, OutputFile.XCODE>
$(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib
- <OutputFile.XCODE, OutputFile.RVCT>
+ <OutputFile.RVCT>
$(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc
<Command.MSFT, Command.INTEL, Command.CLANGPDB>
@@ -659,5 +659,12 @@
"$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
"$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
- <Command.XCODE, Command.RVCT>
+ <Command.RVCT>
GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES)
+
+ <Command.XCODE>
+ GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
+ # Fake a lib that is empty for a make dependency like toolchains with a real RC tool.
+ echo "int aksdlfjlksdfjlksslkdfj;" > $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.hhi.c;
+ "$(CC)" $(DEPS_FLAGS) $(CC_FLAGS) -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.hii.o $(INC) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.hhi.c
+ "$(SLINK)" $(SLINK_FLAGS) ${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.hii.o
--
2.24.1 (Apple Git-126)
next prev parent reply other threads:[~2020-05-24 21:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-24 21:20 [PATCH 0/3] Add PE/COFF resource sections support for XCODE Andrew Fish
2020-05-24 21:20 ` [PATCH 1/3] BaseTools/GenFv: Add PE/COFF resource sections injection to GenFw Andrew Fish
2020-05-27 3:15 ` Bob Feng
2020-05-24 21:20 ` Andrew Fish [this message]
2020-05-24 21:20 ` [PATCH 3/3] OvmfwPkg: Don't exclude XCODE Modules Andrew Fish
2020-05-25 19:31 ` [edk2-devel] " Laszlo Ersek
2020-05-26 4:10 ` Andrew Fish
2020-05-26 11:45 ` Laszlo Ersek
2020-05-27 6:05 ` Andrew Fish
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=c047eb13da78ee73a7402aa08b532b420ed442f6.1590354726.git.afish@apple.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