public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths
@ 2023-05-09 23:53 Rebecca Cran
  2023-05-09 23:53 ` [edk2-stable202305 PATCH 1/4] BaseTools: Remove BUILDRULEFAMILY from CLANGDWARF in tools_def.template Rebecca Cran
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Rebecca Cran @ 2023-05-09 23:53 UTC (permalink / raw)
  To: devel, Liming Gao, Bob Feng, Yuwei Chen; +Cc: Rebecca Cran

Fix a few issues with the CLANGDWARF toolchain that was causing OVMF to
assert on boot due to the HII resources not being embedded into
HttpDynamicCommand, TftpDynamicCommand and
LinuxInitrdDynamicShellCommand.

Rebecca Cran (4):
  BaseTools: Remove BUILDRULEFAMILY from CLANGDWARF in
    tools_def.template
  BaseTools: Set the CLANGDWARF OBJCOPY path in tools_def.template
  BaseTools: Set CLANGDWARF RC path to llvm-objcopy in
    tools_def.template
  BaseTools: Remove the CLANGCC build rule for
    Hii-Binary-Package.UEFI_HII

 BaseTools/Conf/build_rule.template |  2 +-
 BaseTools/Conf/tools_def.template  | 14 +++++++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [edk2-stable202305 PATCH 1/4] BaseTools: Remove BUILDRULEFAMILY from CLANGDWARF in tools_def.template
  2023-05-09 23:53 [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths Rebecca Cran
@ 2023-05-09 23:53 ` Rebecca Cran
  2023-05-09 23:53 ` [edk2-stable202305 PATCH 2/4] BaseTools: Set the CLANGDWARF OBJCOPY path " Rebecca Cran
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Rebecca Cran @ 2023-05-09 23:53 UTC (permalink / raw)
  To: devel, Liming Gao, Bob Feng, Yuwei Chen; +Cc: Rebecca Cran

There's only a single rule in build_rule.template for CLANGGCC, and it's
incorrect. We should instead just use the rules for GCC, so remove the
BUILDRULEFAMILY line for the CLANGDWARF toolchain definition.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 BaseTools/Conf/tools_def.template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index e096aadb495d..8ed9cd3da4fa 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1834,7 +1834,7 @@ NOOPT_CLANGPDB_X64_GENFW_FLAGS      = --keepexceptiontable
 #
 ####################################################################################
 *_CLANGDWARF_*_*_FAMILY             = GCC
-*_CLANGDWARF_*_*_BUILDRULEFAMILY    = CLANGGCC
+
 *_CLANGDWARF_*_MAKE_PATH            = ENV(CLANG_HOST_BIN)make
 *_CLANGDWARF_*_*_DLL                = ENV(CLANGDWARF_DLL)
 *_CLANGDWARF_*_ASL_PATH             = DEF(UNIX_IASL_BIN)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [edk2-stable202305 PATCH 2/4] BaseTools: Set the CLANGDWARF OBJCOPY path in tools_def.template
  2023-05-09 23:53 [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths Rebecca Cran
  2023-05-09 23:53 ` [edk2-stable202305 PATCH 1/4] BaseTools: Remove BUILDRULEFAMILY from CLANGDWARF in tools_def.template Rebecca Cran
@ 2023-05-09 23:53 ` Rebecca Cran
  2023-05-10 11:03   ` [edk2-devel] " Ard Biesheuvel
  2023-05-09 23:53 ` [edk2-stable202305 PATCH 3/4] BaseTools: Set CLANGDWARF RC path to llvm-objcopy " Rebecca Cran
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Rebecca Cran @ 2023-05-09 23:53 UTC (permalink / raw)
  To: devel, Liming Gao, Bob Feng, Yuwei Chen; +Cc: Rebecca Cran

Set the OBJCOPY path for the CLANGDWARF toolchain to 'llvm-objcopy' to
override the default of 'echo'.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 BaseTools/Conf/tools_def.template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 8ed9cd3da4fa..96a413c4ca79 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1864,6 +1864,7 @@ DEFINE CLANGDWARF_ALL_CC_FLAGS         = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGDWARF_
 ###########################
 # CLANGDWARF IA32 definitions
 ###########################
+*_CLANGDWARF_IA32_OBJCOPY_PATH         = DEF(CLANGDWARF_IA32_PREFIX)llvm-objcopy
 *_CLANGDWARF_IA32_CC_PATH              = DEF(CLANGDWARF_IA32_PREFIX)clang
 *_CLANGDWARF_IA32_SLINK_PATH           = DEF(CLANGDWARF_IA32_PREFIX)llvm-ar
 *_CLANGDWARF_IA32_DLINK_PATH           = DEF(CLANGDWARF_IA32_PREFIX)clang
@@ -1900,6 +1901,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS     = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
 ##########################
 # CLANGDWARF X64 definitions
 ##########################
+*_CLANGDWARF_X64_OBJCOPY_PATH         = DEF(CLANGDWARF_X64_PREFIX)llvm-objcopy
 *_CLANGDWARF_X64_CC_PATH              = DEF(CLANGDWARF_X64_PREFIX)clang
 *_CLANGDWARF_X64_SLINK_PATH           = DEF(CLANGDWARF_X64_PREFIX)llvm-ar
 *_CLANGDWARF_X64_DLINK_PATH           = DEF(CLANGDWARF_X64_PREFIX)clang
@@ -1947,6 +1949,7 @@ DEFINE CLANGDWARF_ARM_DLINK_FLAGS   = DEF(CLANGDWARF_ARM_TARGET) DEF(GCC_ARM_DLI
 *_CLANGDWARF_ARM_ASL_OUTFLAGS       = DEF(IASL_OUTFLAGS)
 *_CLANGDWARF_ARM_DTCPP_FLAGS        = DEF(GCC_DTCPP_FLAGS)
 
+*_CLANGDWARF_ARM_OBJCOPY_PATH       = ENV(CLANGDWARF_BIN)llvm-objcopy
 *_CLANGDWARF_ARM_CC_PATH            = ENV(CLANGDWARF_BIN)clang
 *_CLANGDWARF_ARM_ASM_PATH           = ENV(CLANGDWARF_BIN)clang
 *_CLANGDWARF_ARM_PP_PATH            = ENV(CLANGDWARF_BIN)clang
@@ -1991,6 +1994,7 @@ DEFINE CLANGDWARF_AARCH64_DLINK_FLAGS  = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_
 *_CLANGDWARF_AARCH64_ASL_OUTFLAGS   = DEF(IASL_OUTFLAGS)
 *_CLANGDWARF_AARCH64_DTCPP_FLAGS    = DEF(GCC_DTCPP_FLAGS)
 
+*_CLANGDWARF_AARCH64_OBJCOPY_PATH   = ENV(CLANGDWARF_BIN)llvm-objcopy
 *_CLANGDWARF_AARCH64_CC_PATH        = ENV(CLANGDWARF_BIN)clang
 *_CLANGDWARF_AARCH64_ASM_PATH       = ENV(CLANGDWARF_BIN)clang
 *_CLANGDWARF_AARCH64_PP_PATH        = ENV(CLANGDWARF_BIN)clang
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [edk2-stable202305 PATCH 3/4] BaseTools: Set CLANGDWARF RC path to llvm-objcopy in tools_def.template
  2023-05-09 23:53 [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths Rebecca Cran
  2023-05-09 23:53 ` [edk2-stable202305 PATCH 1/4] BaseTools: Remove BUILDRULEFAMILY from CLANGDWARF in tools_def.template Rebecca Cran
  2023-05-09 23:53 ` [edk2-stable202305 PATCH 2/4] BaseTools: Set the CLANGDWARF OBJCOPY path " Rebecca Cran
@ 2023-05-09 23:53 ` Rebecca Cran
  2023-05-09 23:53 ` [edk2-stable202305 PATCH 4/4] BaseTools: Remove the CLANGCC build rule for Hii-Binary-Package.UEFI_HII Rebecca Cran
  2023-05-10  2:36 ` [edk2-devel] [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths Michael D Kinney
  4 siblings, 0 replies; 11+ messages in thread
From: Rebecca Cran @ 2023-05-09 23:53 UTC (permalink / raw)
  To: devel, Liming Gao, Bob Feng, Yuwei Chen; +Cc: Rebecca Cran

The llvm-rc tool is for Windows PE resources. Since the CLANGDWARF
toolchain creates ELF binaries, update the RC path to be llvm-objcopy.
This follows the GCC toolchain which uses objcopy for the RC path.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 BaseTools/Conf/tools_def.template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 96a413c4ca79..b3c822f0bc20 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1874,7 +1874,7 @@ DEFINE CLANGDWARF_ALL_CC_FLAGS         = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGDWARF_
 *_CLANGDWARF_IA32_VFRPP_PATH           = DEF(CLANGDWARF_IA32_PREFIX)clang
 *_CLANGDWARF_IA32_ASLCC_PATH           = DEF(CLANGDWARF_IA32_PREFIX)clang
 *_CLANGDWARF_IA32_ASLPP_PATH           = DEF(CLANGDWARF_IA32_PREFIX)clang
-*_CLANGDWARF_IA32_RC_PATH              = DEF(CLANGDWARF_IA32_PREFIX)llvm-rc
+*_CLANGDWARF_IA32_RC_PATH              = DEF(CLANGDWARF_IA32_PREFIX)llvm-objcopy
 
 *_CLANGDWARF_IA32_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGDWARF_IA32_TARGET)
 *_CLANGDWARF_IA32_ASLDLINK_FLAGS       = DEF(CLANGDWARF_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -fuse-ld=lld -no-pie
@@ -1911,7 +1911,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS     = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
 *_CLANGDWARF_X64_VFRPP_PATH           = DEF(CLANGDWARF_X64_PREFIX)clang
 *_CLANGDWARF_X64_ASLCC_PATH           = DEF(CLANGDWARF_X64_PREFIX)clang
 *_CLANGDWARF_X64_ASLPP_PATH           = DEF(CLANGDWARF_X64_PREFIX)clang
-*_CLANGDWARF_X64_RC_PATH              = DEF(CLANGDWARF_X64_PREFIX)llvm-rc
+*_CLANGDWARF_X64_RC_PATH              = DEF(CLANGDWARF_X64_PREFIX)llvm-objcopy
 
 *_CLANGDWARF_X64_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGDWARF_X64_TARGET)
 *_CLANGDWARF_X64_ASLDLINK_FLAGS       = DEF(CLANGDWARF_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64 -fuse-ld=lld
@@ -1960,7 +1960,7 @@ DEFINE CLANGDWARF_ARM_DLINK_FLAGS   = DEF(CLANGDWARF_ARM_TARGET) DEF(GCC_ARM_DLI
 *_CLANGDWARF_ARM_ASLDLINK_PATH      = ENV(CLANGDWARF_BIN)clang
 
 *_CLANGDWARF_ARM_SLINK_PATH         = ENV(CLANGDWARF_BIN)llvm-ar
-*_CLANGDWARF_ARM_RC_PATH            = ENV(CLANGDWARF_ARM_PREFIX)objcopy
+*_CLANGDWARF_ARM_RC_PATH            = ENV(CLANGDWARF_ARM_PREFIX)llvm-objcopy
 
 *_CLANGDWARF_ARM_ASLCC_FLAGS        = DEF(GCC_ASLCC_FLAGS) -fno-lto
 *_CLANGDWARF_ARM_ASLDLINK_FLAGS     = DEF(CLANGDWARF_ARM_TARGET) DEF(GCC_ARM_ASLDLINK_FLAGS)
@@ -2005,7 +2005,7 @@ DEFINE CLANGDWARF_AARCH64_DLINK_FLAGS  = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_
 *_CLANGDWARF_AARCH64_ASLDLINK_PATH  = ENV(CLANGDWARF_BIN)clang
 
 *_CLANGDWARF_AARCH64_SLINK_PATH     = ENV(CLANGDWARF_BIN)llvm-ar
-*_CLANGDWARF_AARCH64_RC_PATH        = ENV(CLANGDWARF_AARCH64_PREFIX)objcopy
+*_CLANGDWARF_AARCH64_RC_PATH        = ENV(CLANGDWARF_BIN)llvm-objcopy
 
 *_CLANGDWARF_AARCH64_ASLCC_FLAGS    = DEF(GCC_ASLCC_FLAGS) -fno-lto
 *_CLANGDWARF_AARCH64_ASLDLINK_FLAGS = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_AARCH64_ASLDLINK_FLAGS)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [edk2-stable202305 PATCH 4/4] BaseTools: Remove the CLANGCC build rule for Hii-Binary-Package.UEFI_HII
  2023-05-09 23:53 [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths Rebecca Cran
                   ` (2 preceding siblings ...)
  2023-05-09 23:53 ` [edk2-stable202305 PATCH 3/4] BaseTools: Set CLANGDWARF RC path to llvm-objcopy " Rebecca Cran
@ 2023-05-09 23:53 ` Rebecca Cran
  2023-05-10  2:36 ` [edk2-devel] [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths Michael D Kinney
  4 siblings, 0 replies; 11+ messages in thread
From: Rebecca Cran @ 2023-05-09 23:53 UTC (permalink / raw)
  To: devel, Liming Gao, Bob Feng, Yuwei Chen; +Cc: Rebecca Cran

The build rule for Hii-Binary-Package.UEFI_HII should be the same as for
GCC, using $(RC) to embed the HII resource into the binary. Since the
build rule defaults to GCC, just remove CLANGGCC from the section.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 BaseTools/Conf/build_rule.template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index eb64c62060e1..041146124e87 100755
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -646,5 +646,5 @@
     <Command.GCC>
         "$(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.CLANGGCC>
+    <Command.XCODE>
         "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [edk2-devel] [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths
  2023-05-09 23:53 [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths Rebecca Cran
                   ` (3 preceding siblings ...)
  2023-05-09 23:53 ` [edk2-stable202305 PATCH 4/4] BaseTools: Remove the CLANGCC build rule for Hii-Binary-Package.UEFI_HII Rebecca Cran
@ 2023-05-10  2:36 ` Michael D Kinney
  2023-05-10  2:40   ` Rebecca Cran
  4 siblings, 1 reply; 11+ messages in thread
From: Michael D Kinney @ 2023-05-10  2:36 UTC (permalink / raw)
  To: devel@edk2.groups.io, rebecca@bsdio.com, Gao, Liming, Feng, Bob C,
	Chen, Christine
  Cc: Kinney, Michael D

Series Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Series Tested-by: Michael D Kinney <michael.d.kinney@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Rebecca
> Cran
> Sent: Tuesday, May 9, 2023 4:54 PM
> To: devel@edk2.groups.io; Gao, Liming <gaoliming@byosoft.com.cn>; Feng,
> Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Subject: [edk2-devel] [edk2-stable202305 PATCH 0/4] BaseTools: Fix
> CLANGDWARF HII resource rules and paths
> 
> Fix a few issues with the CLANGDWARF toolchain that was causing OVMF to
> assert on boot due to the HII resources not being embedded into
> HttpDynamicCommand, TftpDynamicCommand and
> LinuxInitrdDynamicShellCommand.
> 
> Rebecca Cran (4):
>   BaseTools: Remove BUILDRULEFAMILY from CLANGDWARF in
>     tools_def.template
>   BaseTools: Set the CLANGDWARF OBJCOPY path in tools_def.template
>   BaseTools: Set CLANGDWARF RC path to llvm-objcopy in
>     tools_def.template
>   BaseTools: Remove the CLANGCC build rule for
>     Hii-Binary-Package.UEFI_HII
> 
>  BaseTools/Conf/build_rule.template |  2 +-
>  BaseTools/Conf/tools_def.template  | 14 +++++++++-----
>  2 files changed, 10 insertions(+), 6 deletions(-)
> 
> --
> 2.39.2
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [edk2-devel] [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths
  2023-05-10  2:36 ` [edk2-devel] [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths Michael D Kinney
@ 2023-05-10  2:40   ` Rebecca Cran
  0 siblings, 0 replies; 11+ messages in thread
From: Rebecca Cran @ 2023-05-10  2:40 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io, Gao, Liming, Feng, Bob C,
	Chen, Christine

Thanks. PR with R-B and T-B added: 
https://github.com/tianocore/edk2/pull/4372

On 5/9/23 20:36, Kinney, Michael D wrote:
> Series Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
> Series Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
>
>> -----Original Message-----
>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Rebecca
>> Cran
>> Sent: Tuesday, May 9, 2023 4:54 PM
>> To: devel@edk2.groups.io; Gao, Liming <gaoliming@byosoft.com.cn>; Feng,
>> Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>
>> Cc: Rebecca Cran <rebecca@bsdio.com>
>> Subject: [edk2-devel] [edk2-stable202305 PATCH 0/4] BaseTools: Fix
>> CLANGDWARF HII resource rules and paths
>>
>> Fix a few issues with the CLANGDWARF toolchain that was causing OVMF to
>> assert on boot due to the HII resources not being embedded into
>> HttpDynamicCommand, TftpDynamicCommand and
>> LinuxInitrdDynamicShellCommand.
>>
>> Rebecca Cran (4):
>>    BaseTools: Remove BUILDRULEFAMILY from CLANGDWARF in
>>      tools_def.template
>>    BaseTools: Set the CLANGDWARF OBJCOPY path in tools_def.template
>>    BaseTools: Set CLANGDWARF RC path to llvm-objcopy in
>>      tools_def.template
>>    BaseTools: Remove the CLANGCC build rule for
>>      Hii-Binary-Package.UEFI_HII
>>
>>   BaseTools/Conf/build_rule.template |  2 +-
>>   BaseTools/Conf/tools_def.template  | 14 +++++++++-----
>>   2 files changed, 10 insertions(+), 6 deletions(-)
>>
>> --
>> 2.39.2
>>
>>
>>
>> 
>>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [edk2-devel] [edk2-stable202305 PATCH 2/4] BaseTools: Set the CLANGDWARF OBJCOPY path in tools_def.template
  2023-05-09 23:53 ` [edk2-stable202305 PATCH 2/4] BaseTools: Set the CLANGDWARF OBJCOPY path " Rebecca Cran
@ 2023-05-10 11:03   ` Ard Biesheuvel
  2023-05-10 12:09     ` Rebecca Cran
  0 siblings, 1 reply; 11+ messages in thread
From: Ard Biesheuvel @ 2023-05-10 11:03 UTC (permalink / raw)
  To: devel, rebecca; +Cc: Liming Gao, Bob Feng, Yuwei Chen

On Wed, 10 May 2023 at 01:53, Rebecca Cran <rebecca@bsdio.com> wrote:
>
> Set the OBJCOPY path for the CLANGDWARF toolchain to 'llvm-objcopy' to
> override the default of 'echo'.
>
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>

This appears to break the AArch64 CLANGDWARF build.

https://ci.linaro.org/job/leg-virt-tianocore-edk2-upstream/4880/console


> ---
>  BaseTools/Conf/tools_def.template | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> index 8ed9cd3da4fa..96a413c4ca79 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -1864,6 +1864,7 @@ DEFINE CLANGDWARF_ALL_CC_FLAGS         = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGDWARF_
>  ###########################
>  # CLANGDWARF IA32 definitions
>  ###########################
> +*_CLANGDWARF_IA32_OBJCOPY_PATH         = DEF(CLANGDWARF_IA32_PREFIX)llvm-objcopy
>  *_CLANGDWARF_IA32_CC_PATH              = DEF(CLANGDWARF_IA32_PREFIX)clang
>  *_CLANGDWARF_IA32_SLINK_PATH           = DEF(CLANGDWARF_IA32_PREFIX)llvm-ar
>  *_CLANGDWARF_IA32_DLINK_PATH           = DEF(CLANGDWARF_IA32_PREFIX)clang
> @@ -1900,6 +1901,7 @@ NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS     = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -
>  ##########################
>  # CLANGDWARF X64 definitions
>  ##########################
> +*_CLANGDWARF_X64_OBJCOPY_PATH         = DEF(CLANGDWARF_X64_PREFIX)llvm-objcopy
>  *_CLANGDWARF_X64_CC_PATH              = DEF(CLANGDWARF_X64_PREFIX)clang
>  *_CLANGDWARF_X64_SLINK_PATH           = DEF(CLANGDWARF_X64_PREFIX)llvm-ar
>  *_CLANGDWARF_X64_DLINK_PATH           = DEF(CLANGDWARF_X64_PREFIX)clang
> @@ -1947,6 +1949,7 @@ DEFINE CLANGDWARF_ARM_DLINK_FLAGS   = DEF(CLANGDWARF_ARM_TARGET) DEF(GCC_ARM_DLI
>  *_CLANGDWARF_ARM_ASL_OUTFLAGS       = DEF(IASL_OUTFLAGS)
>  *_CLANGDWARF_ARM_DTCPP_FLAGS        = DEF(GCC_DTCPP_FLAGS)
>
> +*_CLANGDWARF_ARM_OBJCOPY_PATH       = ENV(CLANGDWARF_BIN)llvm-objcopy
>  *_CLANGDWARF_ARM_CC_PATH            = ENV(CLANGDWARF_BIN)clang
>  *_CLANGDWARF_ARM_ASM_PATH           = ENV(CLANGDWARF_BIN)clang
>  *_CLANGDWARF_ARM_PP_PATH            = ENV(CLANGDWARF_BIN)clang
> @@ -1991,6 +1994,7 @@ DEFINE CLANGDWARF_AARCH64_DLINK_FLAGS  = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_
>  *_CLANGDWARF_AARCH64_ASL_OUTFLAGS   = DEF(IASL_OUTFLAGS)
>  *_CLANGDWARF_AARCH64_DTCPP_FLAGS    = DEF(GCC_DTCPP_FLAGS)
>
> +*_CLANGDWARF_AARCH64_OBJCOPY_PATH   = ENV(CLANGDWARF_BIN)llvm-objcopy
>  *_CLANGDWARF_AARCH64_CC_PATH        = ENV(CLANGDWARF_BIN)clang
>  *_CLANGDWARF_AARCH64_ASM_PATH       = ENV(CLANGDWARF_BIN)clang
>  *_CLANGDWARF_AARCH64_PP_PATH        = ENV(CLANGDWARF_BIN)clang
> --
> 2.39.2
>
>
>
> 
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [edk2-devel] [edk2-stable202305 PATCH 2/4] BaseTools: Set the CLANGDWARF OBJCOPY path in tools_def.template
  2023-05-10 11:03   ` [edk2-devel] " Ard Biesheuvel
@ 2023-05-10 12:09     ` Rebecca Cran
  2023-05-10 12:10       ` Ard Biesheuvel
  0 siblings, 1 reply; 11+ messages in thread
From: Rebecca Cran @ 2023-05-10 12:09 UTC (permalink / raw)
  To: Ard Biesheuvel, devel; +Cc: Liming Gao, Bob Feng, Yuwei Chen

On 5/10/23 05:03, Ard Biesheuvel wrote:
> On Wed, 10 May 2023 at 01:53, Rebecca Cran <rebecca@bsdio.com> wrote:
>> Set the OBJCOPY path for the CLANGDWARF toolchain to 'llvm-objcopy' to
>> override the default of 'echo'.
>>
>> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> This appears to break the AArch64 CLANGDWARF build.
>
> https://ci.linaro.org/job/leg-virt-tianocore-edk2-upstream/4880/console

Ugh, I'm sorry. We're not overriding the OBJCOPY_FLAGS for ARM and 
AARCH64, so it uses the default of "not needed for" which previously got 
echoed.

I'll work on a better local testing process to avoid such an obvious 
breakage in future.


Would you like this commit reverted, or should I submit a patch to fix it?


-- 
Rebecca Cran


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [edk2-devel] [edk2-stable202305 PATCH 2/4] BaseTools: Set the CLANGDWARF OBJCOPY path in tools_def.template
  2023-05-10 12:09     ` Rebecca Cran
@ 2023-05-10 12:10       ` Ard Biesheuvel
  2023-05-10 12:33         ` Rebecca Cran
  0 siblings, 1 reply; 11+ messages in thread
From: Ard Biesheuvel @ 2023-05-10 12:10 UTC (permalink / raw)
  To: Rebecca Cran; +Cc: devel, Liming Gao, Bob Feng, Yuwei Chen

On Wed, 10 May 2023 at 14:09, Rebecca Cran <rebecca@bsdio.com> wrote:
>
> On 5/10/23 05:03, Ard Biesheuvel wrote:
> > On Wed, 10 May 2023 at 01:53, Rebecca Cran <rebecca@bsdio.com> wrote:
> >> Set the OBJCOPY path for the CLANGDWARF toolchain to 'llvm-objcopy' to
> >> override the default of 'echo'.
> >>
> >> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> > This appears to break the AArch64 CLANGDWARF build.
> >
> > https://ci.linaro.org/job/leg-virt-tianocore-edk2-upstream/4880/console
>
> Ugh, I'm sorry. We're not overriding the OBJCOPY_FLAGS for ARM and
> AARCH64, so it uses the default of "not needed for" which previously got
> echoed.
>
> I'll work on a better local testing process to avoid such an obvious
> breakage in future.
>
>
> Would you like this commit reverted, or should I submit a patch to fix it?
>

No revert necessary - it should be a minimal fix, and we can just
apply it on top.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [edk2-devel] [edk2-stable202305 PATCH 2/4] BaseTools: Set the CLANGDWARF OBJCOPY path in tools_def.template
  2023-05-10 12:10       ` Ard Biesheuvel
@ 2023-05-10 12:33         ` Rebecca Cran
  0 siblings, 0 replies; 11+ messages in thread
From: Rebecca Cran @ 2023-05-10 12:33 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: devel, Liming Gao, Bob Feng, Yuwei Chen

On 5/10/23 06:10, Ard Biesheuvel wrote:
> On Wed, 10 May 2023 at 14:09, Rebecca Cran <rebecca@bsdio.com> wrote:
>> On 5/10/23 05:03, Ard Biesheuvel wrote:
>>> On Wed, 10 May 2023 at 01:53, Rebecca Cran <rebecca@bsdio.com> wrote:
>>>> Set the OBJCOPY path for the CLANGDWARF toolchain to 'llvm-objcopy' to
>>>> override the default of 'echo'.
>>>>
>>>> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
>>> This appears to break the AArch64 CLANGDWARF build.
>>>
>>> https://ci.linaro.org/job/leg-virt-tianocore-edk2-upstream/4880/console
>> Ugh, I'm sorry. We're not overriding the OBJCOPY_FLAGS for ARM and
>> AARCH64, so it uses the default of "not needed for" which previously got
>> echoed.
>>
>> I'll work on a better local testing process to avoid such an obvious
>> breakage in future.
>>
>>
>> Would you like this commit reverted, or should I submit a patch to fix it?
>>
> No revert necessary - it should be a minimal fix, and we can just
> apply it on top.

Thanks. I've just sent out a fix: "BaseTools: Revert Set the CLANGDWARF 
OBJCOPY path in tools_def.template"

I was attempting to match what gcc does in terms of objcopy, but we can 
leave OBJCOPY as echo and just have RC set to llvm-objcopy.


-- 
Rebecca Cran


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-05-10 12:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 23:53 [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths Rebecca Cran
2023-05-09 23:53 ` [edk2-stable202305 PATCH 1/4] BaseTools: Remove BUILDRULEFAMILY from CLANGDWARF in tools_def.template Rebecca Cran
2023-05-09 23:53 ` [edk2-stable202305 PATCH 2/4] BaseTools: Set the CLANGDWARF OBJCOPY path " Rebecca Cran
2023-05-10 11:03   ` [edk2-devel] " Ard Biesheuvel
2023-05-10 12:09     ` Rebecca Cran
2023-05-10 12:10       ` Ard Biesheuvel
2023-05-10 12:33         ` Rebecca Cran
2023-05-09 23:53 ` [edk2-stable202305 PATCH 3/4] BaseTools: Set CLANGDWARF RC path to llvm-objcopy " Rebecca Cran
2023-05-09 23:53 ` [edk2-stable202305 PATCH 4/4] BaseTools: Remove the CLANGCC build rule for Hii-Binary-Package.UEFI_HII Rebecca Cran
2023-05-10  2:36 ` [edk2-devel] [edk2-stable202305 PATCH 0/4] BaseTools: Fix CLANGDWARF HII resource rules and paths Michael D Kinney
2023-05-10  2:40   ` Rebecca Cran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox