* [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains
@ 2022-12-16 19:50 Pedro Falcato
2022-12-16 21:18 ` [edk2-devel] " Michael D Kinney
2022-12-21 1:25 ` 回复: " gaoliming
0 siblings, 2 replies; 7+ messages in thread
From: Pedro Falcato @ 2022-12-16 19:50 UTC (permalink / raw)
To: devel; +Cc: Pedro Falcato, Marvin Häuser, Bob Feng, Liming Gao,
Yuwei Chen
Currently, UINT64 is not 8-byte aligned for CLANG* toolchains on IA32,
which causes ABI differences between IA32 and X64 in such simple examples as:
struct S {UINT32 A; UINT64 B;};
Pass -malign-double to align it to 8 bytes, as is done for GCC already.
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Marvin Häuser <mhaeuser@posteo.de>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---
BaseTools/Conf/tools_def.template | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index c4e4c7ded0af..2c66a11ae31f 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -2618,15 +2618,15 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
*_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
*_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
-DEBUG_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -g
+DEBUG_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -g -malign-double
DEBUG_CLANG38_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_i386 -Wl,--oformat=elf32-i386
DEBUG_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O3
-RELEASE_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET)
+RELEASE_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -malign-double
RELEASE_CLANG38_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_i386 -Wl,--oformat=elf32-i386
RELEASE_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O3
-NOOPT_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANG38_IA32_TARGET) -g
+NOOPT_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANG38_IA32_TARGET) -g -malign-double
NOOPT_CLANG38_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_i386 -Wl,--oformat=elf32-i386
NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
@@ -2806,15 +2806,15 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
*_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
*_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
-DEBUG_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANGPDB_IA32_TARGET) -gcodeview
+DEBUG_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANGPDB_IA32_TARGET) -gcodeview -malign-double
DEBUG_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap
DEBUG_CLANGPDB_IA32_DLINK2_FLAGS =
-RELEASE_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANGPDB_IA32_TARGET)
+RELEASE_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANGPDB_IA32_TARGET) -malign-double
RELEASE_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /MERGE:.rdata=.data /MLLVM:-exception-model=wineh /lldmap
RELEASE_CLANGPDB_IA32_DLINK2_FLAGS =
-NOOPT_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANGPDB_IA32_TARGET) -gcodeview
+NOOPT_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANGPDB_IA32_TARGET) -gcodeview -malign-double
NOOPT_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap
NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
@@ -2907,15 +2907,15 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
*_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
*_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
-DEBUG_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -g
+DEBUG_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -g -malign-double
DEBUG_CLANGDWARF_IA32_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386 -Wl,--oformat,elf32-i386
DEBUG_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=lld
-RELEASE_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET)
+RELEASE_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -malign-double
RELEASE_CLANGDWARF_IA32_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386 -Wl,--oformat,elf32-i386
RELEASE_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=lld
-NOOPT_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANG38_IA32_TARGET) -g
+NOOPT_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANG38_IA32_TARGET) -g -malign-double
NOOPT_CLANGDWARF_IA32_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_i386 -Wl,--oformat,elf32-i386
NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -fuse-ld=lld
--
2.39.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains
2022-12-16 19:50 [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains Pedro Falcato
@ 2022-12-16 21:18 ` Michael D Kinney
2022-12-21 1:25 ` 回复: " gaoliming
1 sibling, 0 replies; 7+ messages in thread
From: Michael D Kinney @ 2022-12-16 21:18 UTC (permalink / raw)
To: devel@edk2.groups.io, pedro.falcato@gmail.com, Kinney, Michael D
Cc: Marvin Häuser, Feng, Bob C, Gao, Liming, Chen, Christine,
Kinney, Michael D
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Mike
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Pedro Falcato
> Sent: Friday, December 16, 2022 11:50 AM
> To: devel@edk2.groups.io
> Cc: Pedro Falcato <pedro.falcato@gmail.com>; Marvin Häuser <mhaeuser@posteo.de>; Feng, Bob C <bob.c.feng@intel.com>; Gao,
> Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
> Subject: [edk2-devel] [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains
>
> Currently, UINT64 is not 8-byte aligned for CLANG* toolchains on IA32,
> which causes ABI differences between IA32 and X64 in such simple examples as:
>
> struct S {UINT32 A; UINT64 B;};
>
> Pass -malign-double to align it to 8 bytes, as is done for GCC already.
>
> Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
> Cc: Marvin Häuser <mhaeuser@posteo.de>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> ---
> BaseTools/Conf/tools_def.template | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> index c4e4c7ded0af..2c66a11ae31f 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -2618,15 +2618,15 @@ DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>
> -DEBUG_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -g
> +DEBUG_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -g -
> malign-double
> DEBUG_CLANG38_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_i386 -Wl,--oformat=elf32-
> i386
> DEBUG_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O3
>
> -RELEASE_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET)
> +RELEASE_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -
> malign-double
> RELEASE_CLANG38_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_i386 -Wl,--oformat=elf32-
> i386
> RELEASE_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O3
>
> -NOOPT_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANG38_IA32_TARGET) -g
> +NOOPT_CLANG38_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANG38_IA32_TARGET) -g -malign-
> double
> NOOPT_CLANG38_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_i386 -Wl,--oformat=elf32-i386
> NOOPT_CLANG38_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>
> @@ -2806,15 +2806,15 @@ DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
>
> -DEBUG_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANGPDB_IA32_TARGET) -
> gcodeview
> +DEBUG_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANGPDB_IA32_TARGET) -
> gcodeview -malign-double
> DEBUG_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32
> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
> /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap
> DEBUG_CLANGPDB_IA32_DLINK2_FLAGS =
>
> -RELEASE_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANGPDB_IA32_TARGET)
> +RELEASE_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANGPDB_IA32_TARGET) -
> malign-double
> RELEASE_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /ALIGN:32
> /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT)
> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /MERGE:.rdata=.data /MLLVM:-exception-model=wineh /lldmap
> RELEASE_CLANGPDB_IA32_DLINK2_FLAGS =
>
> -NOOPT_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANGPDB_IA32_TARGET) -
> gcodeview
> +NOOPT_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANGPDB_IA32_TARGET) -
> gcodeview -malign-double
> NOOPT_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32
> /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
> /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap
> NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>
> @@ -2907,15 +2907,15 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_IA32_TARGET)
> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_IA32_TARGET)
>
> -DEBUG_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -g
> +DEBUG_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -g
> -malign-double
> DEBUG_CLANGDWARF_IA32_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386 -Wl,--
> oformat,elf32-i386
> DEBUG_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=lld
>
> -RELEASE_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET)
> +RELEASE_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANG38_IA32_TARGET) -
> malign-double
> RELEASE_CLANGDWARF_IA32_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386 -Wl,--
> oformat,elf32-i386
> RELEASE_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=lld
>
> -NOOPT_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANG38_IA32_TARGET) -g
> +NOOPT_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANG38_IA32_TARGET) -g -
> malign-double
> NOOPT_CLANGDWARF_IA32_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_i386 -Wl,--oformat,elf32-
> i386
> NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -fuse-ld=lld
>
> --
> 2.39.0
>
>
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* 回复: [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains
2022-12-16 19:50 [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains Pedro Falcato
2022-12-16 21:18 ` [edk2-devel] " Michael D Kinney
@ 2022-12-21 1:25 ` gaoliming
2022-12-30 2:46 ` [edk2-devel] " Bob Feng
1 sibling, 1 reply; 7+ messages in thread
From: gaoliming @ 2022-12-21 1:25 UTC (permalink / raw)
To: 'Pedro Falcato', devel
Cc: 'Marvin Häuser', 'Bob Feng',
'Yuwei Chen'
This change is good to me. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> -----邮件原件-----
> 发件人: Pedro Falcato <pedro.falcato@gmail.com>
> 发送时间: 2022年12月17日 3:50
> 收件人: devel@edk2.groups.io
> 抄送: Pedro Falcato <pedro.falcato@gmail.com>; Marvin Häuser
> <mhaeuser@posteo.de>; Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> 主题: [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG
> toolchains
>
> Currently, UINT64 is not 8-byte aligned for CLANG* toolchains on IA32,
> which causes ABI differences between IA32 and X64 in such simple examples
> as:
>
> struct S {UINT32 A; UINT64 B;};
>
> Pass -malign-double to align it to 8 bytes, as is done for GCC already.
>
> Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
> Cc: Marvin Häuser <mhaeuser@posteo.de>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> ---
> BaseTools/Conf/tools_def.template | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template
> b/BaseTools/Conf/tools_def.template
> index c4e4c7ded0af..2c66a11ae31f 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -2618,15 +2618,15 @@ DEFINE CLANG38_ALL_CC_FLAGS =
> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
> DEF(CLANG38_IA32_TARGET)
> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
> DEF(CLANG38_IA32_TARGET)
>
> -DEBUG_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -g
> +DEBUG_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -g -malign-double
> DEBUG_CLANG38_IA32_DLINK_FLAGS =
> DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_i386
> -Wl,--oformat=elf32-i386
> DEBUG_CLANG38_IA32_DLINK2_FLAGS =
> DEF(GCC5_IA32_DLINK2_FLAGS) -O3
>
> -RELEASE_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET)
> +RELEASE_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -malign-double
> RELEASE_CLANG38_IA32_DLINK_FLAGS =
> DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_i386
> -Wl,--oformat=elf32-i386
> RELEASE_CLANG38_IA32_DLINK2_FLAGS =
> DEF(GCC5_IA32_DLINK2_FLAGS) -O3
>
> -NOOPT_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANG38_IA32_TARGET) -g
> +NOOPT_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANG38_IA32_TARGET) -g -malign-double
> NOOPT_CLANG38_IA32_DLINK_FLAGS =
> DEF(GCC5_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_i386
> -Wl,--oformat=elf32-i386
> NOOPT_CLANG38_IA32_DLINK2_FLAGS =
> DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>
> @@ -2806,15 +2806,15 @@ DEFINE CLANGPDB_ALL_CC_FLAGS =
> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
> DEF(CLANGPDB_IA32_TARGET)
> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
> DEF(CLANGPDB_IA32_TARGET)
>
> -DEBUG_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANGPDB_IA32_TARGET) -gcodeview
> +DEBUG_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANGPDB_IA32_TARGET) -gcodeview -malign-double
> DEBUG_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO
> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32
> /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL
> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
> /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh
> /lldmap
> DEBUG_CLANGPDB_IA32_DLINK2_FLAGS =
>
> -RELEASE_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANGPDB_IA32_TARGET)
> +RELEASE_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANGPDB_IA32_TARGET) -malign-double
> RELEASE_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /ALIGN:32
> /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL
> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
> /SAFESEH:NO /BASE:0 /MERGE:.rdata=.data
> /MLLVM:-exception-model=wineh /lldmap
> RELEASE_CLANGPDB_IA32_DLINK2_FLAGS =
>
> -NOOPT_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANGPDB_IA32_TARGET) -gcodeview
> +NOOPT_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANGPDB_IA32_TARGET) -gcodeview -malign-double
> NOOPT_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO
> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32
> /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL
> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
> /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh
> /lldmap
> NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>
> @@ -2907,15 +2907,15 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS
> = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
> DEF(CLANG38_IA32_TARGET)
> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
> DEF(CLANG38_IA32_TARGET)
>
> -DEBUG_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -g
> +DEBUG_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -g -malign-double
> DEBUG_CLANGDWARF_IA32_DLINK_FLAGS =
> DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386
> -Wl,--oformat,elf32-i386
> DEBUG_CLANGDWARF_IA32_DLINK2_FLAGS =
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=lld
>
> -RELEASE_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET)
> +RELEASE_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -malign-double
> RELEASE_CLANGDWARF_IA32_DLINK_FLAGS =
> DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386
> -Wl,--oformat,elf32-i386
> RELEASE_CLANGDWARF_IA32_DLINK2_FLAGS =
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=lld
>
> -NOOPT_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANG38_IA32_TARGET) -g
> +NOOPT_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANG38_IA32_TARGET) -g -malign-double
> NOOPT_CLANGDWARF_IA32_DLINK_FLAGS =
> DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_i386
> -Wl,--oformat,elf32-i386
> NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS =
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -fuse-ld=lld
>
> --
> 2.39.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [edk2-devel] 回复: [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains
2022-12-21 1:25 ` 回复: " gaoliming
@ 2022-12-30 2:46 ` Bob Feng
0 siblings, 0 replies; 7+ messages in thread
From: Bob Feng @ 2022-12-30 2:46 UTC (permalink / raw)
To: devel@edk2.groups.io, Gao, Liming, 'Pedro Falcato'
Cc: 'Marvin Häuser', Chen, Christine
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming via groups.io
Sent: Wednesday, December 21, 2022 9:25 AM
To: 'Pedro Falcato' <pedro.falcato@gmail.com>; devel@edk2.groups.io
Cc: 'Marvin Häuser' <mhaeuser@posteo.de>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>
Subject: [edk2-devel] 回复: [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains
This change is good to me. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> -----邮件原件-----
> 发件人: Pedro Falcato <pedro.falcato@gmail.com>
> 发送时间: 2022年12月17日 3:50
> 收件人: devel@edk2.groups.io
> 抄送: Pedro Falcato <pedro.falcato@gmail.com>; Marvin Häuser
> <mhaeuser@posteo.de>; Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> 主题: [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG
> toolchains
>
> Currently, UINT64 is not 8-byte aligned for CLANG* toolchains on IA32,
> which causes ABI differences between IA32 and X64 in such simple
> examples
> as:
>
> struct S {UINT32 A; UINT64 B;};
>
> Pass -malign-double to align it to 8 bytes, as is done for GCC already.
>
> Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
> Cc: Marvin Häuser <mhaeuser@posteo.de>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> ---
> BaseTools/Conf/tools_def.template | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template
> b/BaseTools/Conf/tools_def.template
> index c4e4c7ded0af..2c66a11ae31f 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -2618,15 +2618,15 @@ DEFINE CLANG38_ALL_CC_FLAGS =
> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNIN
> *_CLANG38_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
> DEF(CLANG38_IA32_TARGET)
> *_CLANG38_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
> DEF(CLANG38_IA32_TARGET)
>
> -DEBUG_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -g
> +DEBUG_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -g -malign-double
> DEBUG_CLANG38_IA32_DLINK_FLAGS =
> DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_i386
> -Wl,--oformat=elf32-i386
> DEBUG_CLANG38_IA32_DLINK2_FLAGS =
> DEF(GCC5_IA32_DLINK2_FLAGS) -O3
>
> -RELEASE_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET)
> +RELEASE_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -malign-double
> RELEASE_CLANG38_IA32_DLINK_FLAGS =
> DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_i386
> -Wl,--oformat=elf32-i386
> RELEASE_CLANG38_IA32_DLINK2_FLAGS =
> DEF(GCC5_IA32_DLINK2_FLAGS) -O3
>
> -NOOPT_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANG38_IA32_TARGET) -g
> +NOOPT_CLANG38_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANG38_IA32_TARGET) -g -malign-double
> NOOPT_CLANG38_IA32_DLINK_FLAGS =
> DEF(GCC5_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_i386
> -Wl,--oformat=elf32-i386
> NOOPT_CLANG38_IA32_DLINK2_FLAGS =
> DEF(GCC5_IA32_DLINK2_FLAGS) -O0
>
> @@ -2806,15 +2806,15 @@ DEFINE CLANGPDB_ALL_CC_FLAGS =
> DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARN
> *_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
> DEF(CLANGPDB_IA32_TARGET)
> *_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
> DEF(CLANGPDB_IA32_TARGET)
>
> -DEBUG_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANGPDB_IA32_TARGET) -gcodeview
> +DEBUG_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANGPDB_IA32_TARGET) -gcodeview -malign-double
> DEBUG_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO
> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32
> /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL
> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
> /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap
> DEBUG_CLANGPDB_IA32_DLINK2_FLAGS =
>
> -RELEASE_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANGPDB_IA32_TARGET)
> +RELEASE_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANGPDB_IA32_TARGET) -malign-double
> RELEASE_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB
> /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /ALIGN:32
> /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL
> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
> /SAFESEH:NO /BASE:0 /MERGE:.rdata=.data /MLLVM:-exception-model=wineh
> /lldmap
> RELEASE_CLANGPDB_IA32_DLINK2_FLAGS =
>
> -NOOPT_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANGPDB_IA32_TARGET) -gcodeview
> +NOOPT_CLANGPDB_IA32_CC_FLAGS =
> DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANGPDB_IA32_TARGET) -gcodeview -malign-double
> NOOPT_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO
> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32
> /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL
> /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
> /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap
> NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
>
> @@ -2907,15 +2907,15 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS =
> -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
> *_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
> DEF(CLANG38_IA32_TARGET)
> *_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
> DEF(CLANG38_IA32_TARGET)
>
> -DEBUG_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -g
> +DEBUG_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -g -malign-double
> DEBUG_CLANGDWARF_IA32_DLINK_FLAGS =
> DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386
> -Wl,--oformat,elf32-i386
> DEBUG_CLANGDWARF_IA32_DLINK2_FLAGS =
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=lld
>
> -RELEASE_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET)
> +RELEASE_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586
> DEF(CLANG38_IA32_TARGET) -malign-double
> RELEASE_CLANGDWARF_IA32_DLINK_FLAGS =
> DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386
> -Wl,--oformat,elf32-i386
> RELEASE_CLANGDWARF_IA32_DLINK2_FLAGS =
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=lld
>
> -NOOPT_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANG38_IA32_TARGET) -g
> +NOOPT_CLANGDWARF_IA32_CC_FLAGS =
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=i586
> DEF(CLANG38_IA32_TARGET) -g -malign-double
> NOOPT_CLANGDWARF_IA32_DLINK_FLAGS =
> DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_i386
> -Wl,--oformat,elf32-i386
> NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS =
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -fuse-ld=lld
>
> --
> 2.39.0
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <17315DF115C9EFAB.15628@groups.io>]
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains
[not found] <17315DF115C9EFAB.15628@groups.io>
@ 2022-12-16 19:54 ` Pedro Falcato
2022-12-16 20:08 ` Marvin Häuser
0 siblings, 1 reply; 7+ messages in thread
From: Pedro Falcato @ 2022-12-16 19:54 UTC (permalink / raw)
To: devel, pedro.falcato; +Cc: Marvin Häuser, Bob Feng, Liming Gao, Yuwei Chen
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
PS: it's worth noting that at this moment in time, due to this, the CLANG
toolchains are very broken as they break the UEFI spec and are silently
incompatible with modules compiled in both GCC and MSVC.
Fixing this should be top priority.
Pedro
[-- Attachment #2: Type: text/html, Size: 412 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains
2022-12-16 19:54 ` [edk2-devel] " Pedro Falcato
@ 2022-12-16 20:08 ` Marvin Häuser
2022-12-16 21:19 ` Michael D Kinney
0 siblings, 1 reply; 7+ messages in thread
From: Marvin Häuser @ 2022-12-16 20:08 UTC (permalink / raw)
To: Pedro Falcato
Cc: devel, Bob Feng, Liming Gao, Yuwei Chen, Michael D Kinney,
Leif Lindholm, Andrew Fish
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]
Revised version of last year’s https://edk2.groups.io/g/devel/message/79670
Initially caught by last year‘s https://edk2.groups.io/g/devel/message/79318
But now caught *yet again*, independently, via bugs during development.
Cc stewards so this issue finally gets some attention. Might need validation of already shipped code, who knows.
Best regards,
Marvin
> On 16. Dec 2022, at 20:54, Pedro Falcato <pedro.falcato@gmail.com> wrote:
>
>
> PS: it's worth noting that at this moment in time, due to this, the CLANG toolchains are very broken as they break the UEFI spec and are silently incompatible with modules compiled in both GCC and MSVC.
>
> Fixing this should be top priority.
>
> Pedro
[-- Attachment #2: Type: text/html, Size: 1417 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains
2022-12-16 20:08 ` Marvin Häuser
@ 2022-12-16 21:19 ` Michael D Kinney
0 siblings, 0 replies; 7+ messages in thread
From: Michael D Kinney @ 2022-12-16 21:19 UTC (permalink / raw)
To: Marvin Häuser, Pedro Falcato
Cc: devel@edk2.groups.io, Feng, Bob C, Gao, Liming, Chen, Christine,
Leif Lindholm, Andrew Fish, Kinney, Michael D
[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]
Thank you for highlighting the issue. Makes a lot of sense with same flag used for GCC IA32.
Mike
From: Marvin Häuser <mhaeuser@posteo.de>
Sent: Friday, December 16, 2022 12:08 PM
To: Pedro Falcato <pedro.falcato@gmail.com>
Cc: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Leif Lindholm <quic_llindhol@quicinc.com>; Andrew Fish <afish@apple.com>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains
Revised version of last year’s https://edk2.groups.io/g/devel/message/79670
Initially caught by last year‘s https://edk2.groups.io/g/devel/message/79318
But now caught *yet again*, independently, via bugs during development.
Cc stewards so this issue finally gets some attention. Might need validation of already shipped code, who knows.
Best regards,
Marvin
On 16. Dec 2022, at 20:54, Pedro Falcato <pedro.falcato@gmail.com<mailto:pedro.falcato@gmail.com>> wrote:
PS: it's worth noting that at this moment in time, due to this, the CLANG toolchains are very broken as they break the UEFI spec and are silently incompatible with modules compiled in both GCC and MSVC.
Fixing this should be top priority.
Pedro
[-- Attachment #2: Type: text/html, Size: 42040 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-12-30 2:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-16 19:50 [PATCH 1/1] BaseTools: Fix IA32 UINT64 alignment for CLANG toolchains Pedro Falcato
2022-12-16 21:18 ` [edk2-devel] " Michael D Kinney
2022-12-21 1:25 ` 回复: " gaoliming
2022-12-30 2:46 ` [edk2-devel] " Bob Feng
[not found] <17315DF115C9EFAB.15628@groups.io>
2022-12-16 19:54 ` [edk2-devel] " Pedro Falcato
2022-12-16 20:08 ` Marvin Häuser
2022-12-16 21:19 ` Michael D Kinney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox