* [edk2-devel] [PATCH 1/1] BaseTools/tools_def: drop -mgeneral-regs-only for AArch64 CLANGDWARF
@ 2023-11-03 16:37 Yeping Song
2023-11-06 1:03 ` [edk2-devel] 回复: " gaoliming via groups.io
0 siblings, 1 reply; 2+ messages in thread
From: Yeping Song @ 2023-11-03 16:37 UTC (permalink / raw)
To: devel
Cc: Yeping Song, Rebecca Cran, Liming Gao, Bob Feng, Yuwei Chen,
Ard Biesheuvel, Leif Lindholm, Sami Mujawar
Commit 0df6c8c157af9 ("BaseTools/tools_def AARCH64:
avoid SIMD registers in XIP code")
adds -mgeneral-regs-only to GCC_AARCH64_CC_XIPFLAGS,
in order to avoid a bug present in certain versions of GCC.
This was never a problem for clang.
That's given the history of what the problem is.
Then we can describe how we fix it:
Change *_CLANGDWARF_AARCH64_CC_XIPFLAGS to set the required -mstrict-align
option instead of importing the whole GCC variable.
Signed-off-by: Yeping Song <quic_yepings@quicinc.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Sami Mujawar <sami.mujawar@arm.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 5bd5283655ea..c34ecfd557c5 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -2015,7 +2015,7 @@ DEFINE CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_
*_CLANGDWARF_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS) DEF(GCC_AARCH64_RC_BTI_FLAGS)
*_CLANGDWARF_AARCH64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGDWARF_AARCH64_TARGET) $(PLATFORM_FLAGS)
*_CLANGDWARF_AARCH64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGDWARF_AARCH64_TARGET)
-*_CLANGDWARF_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS)
+*_CLANGDWARF_AARCH64_CC_XIPFLAGS = -mstrict-align
DEBUG_CLANGDWARF_AARCH64_CC_FLAGS = DEF(CLANGDWARF_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O1
DEBUG_CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_DLINK_FLAGS) -flto -Wl,-O1 -fuse-ld=lld -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wl,--no-pie,--no-relax
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110647): https://edk2.groups.io/g/devel/message/110647
Mute This Topic: https://groups.io/mt/102368361/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [edk2-devel] 回复: [PATCH 1/1] BaseTools/tools_def: drop -mgeneral-regs-only for AArch64 CLANGDWARF
2023-11-03 16:37 [edk2-devel] [PATCH 1/1] BaseTools/tools_def: drop -mgeneral-regs-only for AArch64 CLANGDWARF Yeping Song
@ 2023-11-06 1:03 ` gaoliming via groups.io
0 siblings, 0 replies; 2+ messages in thread
From: gaoliming via groups.io @ 2023-11-06 1:03 UTC (permalink / raw)
To: 'Yeping Song', devel
Cc: 'Rebecca Cran', 'Bob Feng', 'Yuwei Chen',
'Ard Biesheuvel', 'Leif Lindholm',
'Sami Mujawar'
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> -----邮件原件-----
> 发件人: Yeping Song <quic_yepings@quicinc.com>
> 发送时间: 2023年11月4日 0:38
> 收件人: devel@edk2.groups.io
> 抄送: Yeping Song <quic_yepings@quicinc.com>; Rebecca Cran
> <rebecca@bsdio.com>; Liming Gao <gaoliming@byosoft.com.cn>; Bob Feng
> <bob.c.feng@intel.com>; Yuwei Chen <yuwei.chen@intel.com>; Ard
> Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm
> <quic_llindhol@quicinc.com>; Sami Mujawar <sami.mujawar@arm.com>
> 主题: [PATCH 1/1] BaseTools/tools_def: drop -mgeneral-regs-only for
> AArch64 CLANGDWARF
>
> Commit 0df6c8c157af9 ("BaseTools/tools_def AARCH64:
> avoid SIMD registers in XIP code")
> adds -mgeneral-regs-only to GCC_AARCH64_CC_XIPFLAGS,
> in order to avoid a bug present in certain versions of GCC.
> This was never a problem for clang.
> That's given the history of what the problem is.
> Then we can describe how we fix it:
> Change *_CLANGDWARF_AARCH64_CC_XIPFLAGS to set the required
> -mstrict-align
> option instead of importing the whole GCC variable.
>
> Signed-off-by: Yeping Song <quic_yepings@quicinc.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.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 5bd5283655ea..c34ecfd557c5 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -2015,7 +2015,7 @@ DEFINE CLANGDWARF_AARCH64_DLINK_FLAGS
> = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_
> *_CLANGDWARF_AARCH64_RC_FLAGS =
> DEF(GCC_AARCH64_RC_FLAGS) DEF(GCC_AARCH64_RC_BTI_FLAGS)
> *_CLANGDWARF_AARCH64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
> DEF(CLANGDWARF_AARCH64_TARGET) $(PLATFORM_FLAGS)
> *_CLANGDWARF_AARCH64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
> DEF(CLANGDWARF_AARCH64_TARGET)
> -*_CLANGDWARF_AARCH64_CC_XIPFLAGS =
> DEF(GCC_AARCH64_CC_XIPFLAGS)
> +*_CLANGDWARF_AARCH64_CC_XIPFLAGS = -mstrict-align
>
> DEBUG_CLANGDWARF_AARCH64_CC_FLAGS =
> DEF(CLANGDWARF_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O1
> DEBUG_CLANGDWARF_AARCH64_DLINK_FLAGS =
> DEF(CLANGDWARF_AARCH64_DLINK_FLAGS) -flto -Wl,-O1 -fuse-ld=lld
> -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64
> -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wl,--no-pie,--no-relax
> --
> 2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110690): https://edk2.groups.io/g/devel/message/110690
Mute This Topic: https://groups.io/mt/102412109/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-06 1:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-03 16:37 [edk2-devel] [PATCH 1/1] BaseTools/tools_def: drop -mgeneral-regs-only for AArch64 CLANGDWARF Yeping Song
2023-11-06 1:03 ` [edk2-devel] 回复: " gaoliming via groups.io
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox