* [PATCH 0/1] BaseTools: Switch to GNU mode for CLANGPDB
@ 2020-02-10 10:59 Vitaly Cheptsov
2020-02-10 10:59 ` [PATCH 1/1] " Vitaly Cheptsov
0 siblings, 1 reply; 11+ messages in thread
From: Vitaly Cheptsov @ 2020-02-10 10:59 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 487 bytes --]
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397
I did not include __clang__ removal in this patch series, as it is
also used in arm and aarch64 code, which makes me believe they could
be using specialised toolchains.
Request this to be merged in edk2-stable202002.
Vitaly Cheptsov (1):
BaseTools: Switch to GNU mode for CLANGPDB
BaseTools/Conf/tools_def.template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.21.1 (Apple Git-122.3)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
2020-02-10 10:59 [PATCH 0/1] BaseTools: Switch to GNU mode for CLANGPDB Vitaly Cheptsov
@ 2020-02-10 10:59 ` Vitaly Cheptsov
2020-02-10 13:47 ` [edk2-devel] " Liming Gao
0 siblings, 1 reply; 11+ messages in thread
From: Vitaly Cheptsov @ 2020-02-10 10:59 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 2185 bytes --]
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397
Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
---
BaseTools/Conf/tools_def.template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index feee2bbf16..6bf6c5768e 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -2755,11 +2755,11 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl
DEFINE CLANGPDB_IA32_PREFIX = ENV(CLANG_BIN)
DEFINE CLANGPDB_X64_PREFIX = ENV(CLANG_BIN)
-DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows
-DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows
+DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows-gnu
+DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows-gnu
DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-microsoft-enum-forward-reference
-DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference -fms-compatibility -mno-stack-arg-probe
+DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -fno-asynchronous-unwind-tables -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc
###########################
# CLANGPDB IA32 definitions
--
2.21.1 (Apple Git-122.3)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
2020-02-10 10:59 ` [PATCH 1/1] " Vitaly Cheptsov
@ 2020-02-10 13:47 ` Liming Gao
2020-02-10 19:23 ` Vitaly Cheptsov
0 siblings, 1 reply; 11+ messages in thread
From: Liming Gao @ 2020-02-10 13:47 UTC (permalink / raw)
To: devel@edk2.groups.io, vit9696@protonmail.com
Vitaly:
This change is good. Can you your test for it? I verify this patch for Ovmf platform on Windows. It can make ovmf pass build with CLANGPDB.
Thanks
Liming
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Vitaly Cheptsov via Groups.Io
> Sent: Monday, February 10, 2020 6:59 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397
>
> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
> ---
> BaseTools/Conf/tools_def.template | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> index feee2bbf16..6bf6c5768e 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -2755,11 +2755,11 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl
> DEFINE CLANGPDB_IA32_PREFIX = ENV(CLANG_BIN)
> DEFINE CLANGPDB_X64_PREFIX = ENV(CLANG_BIN)
>
> -DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows
> -DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows
> +DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows-gnu
> +DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows-gnu
>
> DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-
> of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-microsoft-enum-
> forward-reference
> -DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-
> asynchronous-unwind-tables -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -
> funsigned-char -fno-ms-extensions -Wno-null-dereference -fms-compatibility -mno-stack-arg-probe
> +DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> fno-asynchronous-unwind-tables -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-
> address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-
> implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc
>
> ###########################
> # CLANGPDB IA32 definitions
> --
> 2.21.1 (Apple Git-122.3)
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#54130): https://edk2.groups.io/g/devel/message/54130
> Mute This Topic: https://groups.io/mt/71134286/1759384
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [liming.gao@intel.com]
> -=-=-=-=-=-=
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
2020-02-10 13:47 ` [edk2-devel] " Liming Gao
@ 2020-02-10 19:23 ` Vitaly Cheptsov
2020-02-11 5:33 ` Liming Gao
[not found] ` <15F24239275957C5.19576@groups.io>
0 siblings, 2 replies; 11+ messages in thread
From: Vitaly Cheptsov @ 2020-02-10 19:23 UTC (permalink / raw)
To: Gao, Liming, devel@edk2.groups.io
[-- Attachment #1: Type: text/plain, Size: 3314 bytes --]
Liming,
We did run several of our projects based on EDK II in X64 mode, DEBUG, RELEASE, NOOPT. Noticed no change from XCODE5.
We also tried building several EDK builtin packages like CryptoPkg, MdePkg, MdeModulePkg.
Best wishes,
Vitaly
В пн, февр. 10, 2020 в 16:47, Gao, Liming <liming.gao@intel.com> пишет:
> Vitaly:
> This change is good. Can you your test for it? I verify this patch for Ovmf platform on Windows. It can make ovmf pass build with CLANGPDB.
>
> Thanks
> Liming
>> -----Original Message-----
>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Vitaly Cheptsov via Groups.Io
>> Sent: Monday, February 10, 2020 6:59 PM
>> To: devel@edk2.groups.io
>> Subject: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>>
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397
>>
>> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
>> ---
>> BaseTools/Conf/tools_def.template | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
>> index feee2bbf16..6bf6c5768e 100755
>> --- a/BaseTools/Conf/tools_def.template
>> +++ b/BaseTools/Conf/tools_def.template
>> @@ -2755,11 +2755,11 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl
>> DEFINE CLANGPDB_IA32_PREFIX = ENV(CLANG_BIN)
>> DEFINE CLANGPDB_X64_PREFIX = ENV(CLANG_BIN)
>>
>> -DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows
>> -DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows
>> +DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows-gnu
>> +DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows-gnu
>>
>> DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-
>> of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-microsoft-enum-
>> forward-reference
>> -DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
>> mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-
>> asynchronous-unwind-tables -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -
>> funsigned-char -fno-ms-extensions -Wno-null-dereference -fms-compatibility -mno-stack-arg-probe
>> +DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
>> fno-asynchronous-unwind-tables -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-
>> address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-
>> implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc
>>
>> ###########################
>> # CLANGPDB IA32 definitions
>> --
>> 2.21.1 (Apple Git-122.3)
>>
>>
>> -=-=-=-=-=-=
>> Groups.io Links: You receive all messages sent to this group.
>>
>> View/Reply Online (#54130): https://edk2.groups.io/g/devel/message/54130
>> Mute This Topic: https://groups.io/mt/71134286/1759384
>> Group Owner: devel+owner@edk2.groups.io
>> Unsubscribe: https://edk2.groups.io/g/devel/unsub [liming.gao@intel.com]
>> -=-=-=-=-=-=
[-- Attachment #2: Type: text/html, Size: 4190 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
2020-02-10 19:23 ` Vitaly Cheptsov
@ 2020-02-11 5:33 ` Liming Gao
[not found] ` <15F24239275957C5.19576@groups.io>
1 sibling, 0 replies; 11+ messages in thread
From: Liming Gao @ 2020-02-11 5:33 UTC (permalink / raw)
To: vit9696, devel@edk2.groups.io
[-- Attachment #1: Type: text/plain, Size: 3784 bytes --]
Reviewed-by: Liming Gao <liming.gao@intel.com>
From: vit9696 <vit9696@protonmail.com>
Sent: Tuesday, February 11, 2020 3:23 AM
To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io
Subject: RE: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
Liming,
We did run several of our projects based on EDK II in X64 mode, DEBUG, RELEASE, NOOPT. Noticed no change from XCODE5.
We also tried building several EDK builtin packages like CryptoPkg, MdePkg, MdeModulePkg.
Best wishes,
Vitaly
В пн, февр. 10, 2020 в 16:47, Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>> пишет:
Vitaly:
This change is good. Can you your test for it? I verify this patch for Ovmf platform on Windows. It can make ovmf pass build with CLANGPDB.
Thanks
Liming
> -----Original Message-----
> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Vitaly Cheptsov via Groups.Io
> Sent: Monday, February 10, 2020 6:59 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Subject: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397
>
> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com<mailto:vit9696@protonmail.com>>
> ---
> BaseTools/Conf/tools_def.template | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> index feee2bbf16..6bf6c5768e 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -2755,11 +2755,11 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl
> DEFINE CLANGPDB_IA32_PREFIX = ENV(CLANG_BIN)
> DEFINE CLANGPDB_X64_PREFIX = ENV(CLANG_BIN)
>
> -DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows
> -DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows
> +DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows-gnu
> +DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows-gnu
>
> DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-
> of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-microsoft-enum-
> forward-reference
> -DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-
> asynchronous-unwind-tables -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -
> funsigned-char -fno-ms-extensions -Wno-null-dereference -fms-compatibility -mno-stack-arg-probe
> +DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> fno-asynchronous-unwind-tables -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-
> address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-
> implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc
>
> ###########################
> # CLANGPDB IA32 definitions
> --
> 2.21.1 (Apple Git-122.3)
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#54130): https://edk2.groups.io/g/devel/message/54130
> Mute This Topic: https://groups.io/mt/71134286/1759384
> Group Owner: devel+owner@edk2.groups.io<mailto:devel+owner@edk2.groups.io>
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [liming.gao@intel.com]
> -=-=-=-=-=-=
[-- Attachment #2: Type: text/html, Size: 7698 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
[not found] ` <15F24239275957C5.19576@groups.io>
@ 2020-02-11 6:02 ` Liming Gao
2020-02-11 7:09 ` Vitaly Cheptsov
0 siblings, 1 reply; 11+ messages in thread
From: Liming Gao @ 2020-02-11 6:02 UTC (permalink / raw)
To: devel@edk2.groups.io, Gao, Liming, vit9696
[-- Attachment #1: Type: text/plain, Size: 4293 bytes --]
Vitaly:
Can you update this patch based on the latest edk2 trunk? I will catch it for edk2 Q1 stable tag.
Thanks
Liming
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Liming Gao
Sent: Tuesday, February 11, 2020 1:34 PM
To: vit9696 <vit9696@protonmail.com>; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
Reviewed-by: Liming Gao <liming.gao@intel.com<mailto:liming.gao@intel.com>>
From: vit9696 <vit9696@protonmail.com<mailto:vit9696@protonmail.com>>
Sent: Tuesday, February 11, 2020 3:23 AM
To: Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: RE: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
Liming,
We did run several of our projects based on EDK II in X64 mode, DEBUG, RELEASE, NOOPT. Noticed no change from XCODE5.
We also tried building several EDK builtin packages like CryptoPkg, MdePkg, MdeModulePkg.
Best wishes,
Vitaly
В пн, февр. 10, 2020 в 16:47, Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>> пишет:
Vitaly:
This change is good. Can you your test for it? I verify this patch for Ovmf platform on Windows. It can make ovmf pass build with CLANGPDB.
Thanks
Liming
> -----Original Message-----
> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Vitaly Cheptsov via Groups.Io
> Sent: Monday, February 10, 2020 6:59 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Subject: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397
>
> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com<mailto:vit9696@protonmail.com>>
> ---
> BaseTools/Conf/tools_def.template | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> index feee2bbf16..6bf6c5768e 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -2755,11 +2755,11 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl
> DEFINE CLANGPDB_IA32_PREFIX = ENV(CLANG_BIN)
> DEFINE CLANGPDB_X64_PREFIX = ENV(CLANG_BIN)
>
> -DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows
> -DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows
> +DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows-gnu
> +DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows-gnu
>
> DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-
> of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-microsoft-enum-
> forward-reference
> -DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-
> asynchronous-unwind-tables -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -
> funsigned-char -fno-ms-extensions -Wno-null-dereference -fms-compatibility -mno-stack-arg-probe
> +DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> fno-asynchronous-unwind-tables -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-
> address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-
> implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc
>
> ###########################
> # CLANGPDB IA32 definitions
> --
> 2.21.1 (Apple Git-122.3)
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#54130): https://edk2.groups.io/g/devel/message/54130
> Mute This Topic: https://groups.io/mt/71134286/1759384
> Group Owner: devel+owner@edk2.groups.io<mailto:devel+owner@edk2.groups.io>
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [liming.gao@intel.com]
> -=-=-=-=-=-=
[-- Attachment #2: Type: text/html, Size: 9028 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
2020-02-11 6:02 ` Liming Gao
@ 2020-02-11 7:09 ` Vitaly Cheptsov
2020-02-12 1:38 ` Zhiguang Liu
0 siblings, 1 reply; 11+ messages in thread
From: Vitaly Cheptsov @ 2020-02-11 7:09 UTC (permalink / raw)
To: Gao, Liming, zhiguang.liu, steven.shi; +Cc: devel@edk2.groups.io
[-- Attachment #1.1: Type: text/plain, Size: 5537 bytes --]
Liming,
Done. As a side note, I am not positive how can 7990438f1437f47990a8890dee51978cb8dbc25c[1] resolve BZ 2415[2]. The bug was about CLANG38, and the toolchain updated was CLANGPDB. While it makes sense to update CLANGPDB with this flag to stay clean (it will not make a difference for clang in GNU mode), CLANGPDB has nothing to do to CLANG38.
Best wishes,
Vitaly
[1] https://bugzilla.tianocore.org/show_bug.cgi?id=2415 <https://bugzilla.tianocore.org/show_bug.cgi?id=2415>
[2] https://github.com/tianocore/edk2/commit/7990438f1437f47990a8890dee51978cb8dbc25c <https://github.com/tianocore/edk2/commit/7990438f1437f47990a8890dee51978cb8dbc25c>
> 11 февр. 2020 г., в 09:02, Gao, Liming <liming.gao@intel.com> написал(а):
>
> Vitaly:
> Can you update this patch based on the latest edk2 trunk? I will catch it for edk2 Q1 stable tag.
>
> Thanks
> Liming
> From: devel@edk2.groups.io <mailto:devel@edk2.groups.io> <devel@edk2.groups.io <mailto:devel@edk2.groups.io>> On Behalf Of Liming Gao
> Sent: Tuesday, February 11, 2020 1:34 PM
> To: vit9696 <vit9696@protonmail.com <mailto:vit9696@protonmail.com>>; devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>
> Reviewed-by: Liming Gao <liming.gao@intel.com <mailto:liming.gao@intel.com>>
>
> From: vit9696 <vit9696@protonmail.com <mailto:vit9696@protonmail.com>>
> Sent: Tuesday, February 11, 2020 3:23 AM
> To: Gao, Liming <liming.gao@intel.com <mailto:liming.gao@intel.com>>; devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> Subject: RE: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>
> Liming,
>
> We did run several of our projects based on EDK II in X64 mode, DEBUG, RELEASE, NOOPT. Noticed no change from XCODE5.
>
> We also tried building several EDK builtin packages like CryptoPkg, MdePkg, MdeModulePkg.
>
> Best wishes,
> Vitaly
>
> В пн, февр. 10, 2020 в 16:47, Gao, Liming <liming.gao@intel.com <mailto:liming.gao@intel.com>> пишет:
> Vitaly:
> This change is good. Can you your test for it? I verify this patch for Ovmf platform on Windows. It can make ovmf pass build with CLANGPDB.
>
> Thanks
> Liming
> > -----Original Message-----
> > From: devel@edk2.groups.io <mailto:devel@edk2.groups.io> <devel@edk2.groups.io <mailto:devel@edk2.groups.io>> On Behalf Of Vitaly Cheptsov via Groups.Io
> > Sent: Monday, February 10, 2020 6:59 PM
> > To: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> > Subject: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397 <https://bugzilla.tianocore.org/show_bug.cgi?id=2397>
> >
> > Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com>>
> > ---
> > BaseTools/Conf/tools_def.template | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> > index feee2bbf16..6bf6c5768e 100755
> > --- a/BaseTools/Conf/tools_def.template
> > +++ b/BaseTools/Conf/tools_def.template
> > @@ -2755,11 +2755,11 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl
> > DEFINE CLANGPDB_IA32_PREFIX = ENV(CLANG_BIN)
> > DEFINE CLANGPDB_X64_PREFIX = ENV(CLANG_BIN)
> >
> > -DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows
> > -DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows
> > +DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows-gnu
> > +DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows-gnu
> >
> > DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-
> > of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-microsoft-enum-
> > forward-reference
> > -DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> > mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-
> > asynchronous-unwind-tables -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -
> > funsigned-char -fno-ms-extensions -Wno-null-dereference -fms-compatibility -mno-stack-arg-probe
> > +DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> > fno-asynchronous-unwind-tables -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-
> > address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-
> > implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc
> >
> > ###########################
> > # CLANGPDB IA32 definitions
> > --
> > 2.21.1 (Apple Git-122.3)
> >
> >
> > -=-=-=-=-=-=
> > Groups.io Links: You receive all messages sent to this group.
> >
> > View/Reply Online (#54130): https://edk2.groups.io/g/devel/message/54130 <https://edk2.groups.io/g/devel/message/54130>
> > Mute This Topic: https://groups.io/mt/71134286/1759384 <https://groups.io/mt/71134286/1759384>
> > Group Owner: devel+owner@edk2.groups.io <mailto:devel+owner@edk2.groups.io>
> > Unsubscribe: https://edk2.groups.io/g/devel/unsub <https://edk2.groups.io/g/devel/unsub> [liming.gao@intel.com]
> > -=-=-=-=-=-=
>
>
>
>
[-- Attachment #1.2: Type: text/html, Size: 13942 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
2020-02-11 7:09 ` Vitaly Cheptsov
@ 2020-02-12 1:38 ` Zhiguang Liu
2020-02-12 8:07 ` Vitaly Cheptsov
0 siblings, 1 reply; 11+ messages in thread
From: Zhiguang Liu @ 2020-02-12 1:38 UTC (permalink / raw)
To: devel@edk2.groups.io, vit9696@protonmail.com, Gao, Liming,
Shi, Steven
[-- Attachment #1: Type: text/plain, Size: 5815 bytes --]
Hi Vitaly,
After your patch to Switch to GNU mode for CLANGPDB, the build option -DNO_MSABI_VA_FUNCS is not required. I will send another patch to remove it.
And for you question, this is a patch set that resolves BZ 2415, and the second patch 21821933aea284cd3dfea6994bd4b83bd9739fc9 has direct influence to CLANG38.
Thanks
Zhiguang
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Vitaly Cheptsov via Groups.Io
Sent: Tuesday, February 11, 2020 3:09 PM
To: Gao, Liming <liming.gao@intel.com>; Liu, Zhiguang <zhiguang.liu@intel.com>; Shi, Steven <steven.shi@intel.com>
Cc: devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
Liming,
Done. As a side note, I am not positive how can 7990438f1437f47990a8890dee51978cb8dbc25c[1] resolve BZ 2415[2]. The bug was about CLANG38, and the toolchain updated was CLANGPDB. While it makes sense to update CLANGPDB with this flag to stay clean (it will not make a difference for clang in GNU mode), CLANGPDB has nothing to do to CLANG38.
Best wishes,
Vitaly
[1] https://bugzilla.tianocore.org/show_bug.cgi?id=2415
[2] https://github.com/tianocore/edk2/commit/7990438f1437f47990a8890dee51978cb8dbc25c
11 февр. 2020 г., в 09:02, Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>> написал(а):
Vitaly:
Can you update this patch based on the latest edk2 trunk? I will catch it for edk2 Q1 stable tag.
Thanks
Liming
From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Liming Gao
Sent: Tuesday, February 11, 2020 1:34 PM
To: vit9696 <vit9696@protonmail.com<mailto:vit9696@protonmail.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
Reviewed-by: Liming Gao <liming.gao@intel.com<mailto:liming.gao@intel.com>>
From: vit9696 <vit9696@protonmail.com<mailto:vit9696@protonmail.com>>
Sent: Tuesday, February 11, 2020 3:23 AM
To: Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: RE: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
Liming,
We did run several of our projects based on EDK II in X64 mode, DEBUG, RELEASE, NOOPT. Noticed no change from XCODE5.
We also tried building several EDK builtin packages like CryptoPkg, MdePkg, MdeModulePkg.
Best wishes,
Vitaly
В пн, февр. 10, 2020 в 16:47, Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>> пишет:
Vitaly:
This change is good. Can you your test for it? I verify this patch for Ovmf platform on Windows. It can make ovmf pass build with CLANGPDB.
Thanks
Liming
> -----Original Message-----
> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Vitaly Cheptsov via Groups.Io
> Sent: Monday, February 10, 2020 6:59 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Subject: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397
>
> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com<mailto:vit9696@protonmail.com>>
> ---
> BaseTools/Conf/tools_def.template | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> index feee2bbf16..6bf6c5768e 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -2755,11 +2755,11 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl
> DEFINE CLANGPDB_IA32_PREFIX = ENV(CLANG_BIN)
> DEFINE CLANGPDB_X64_PREFIX = ENV(CLANG_BIN)
>
> -DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows
> -DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows
> +DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows-gnu
> +DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows-gnu
>
> DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-
> of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-microsoft-enum-
> forward-reference
> -DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-
> asynchronous-unwind-tables -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -
> funsigned-char -fno-ms-extensions -Wno-null-dereference -fms-compatibility -mno-stack-arg-probe
> +DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> fno-asynchronous-unwind-tables -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-
> address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-
> implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc
>
> ###########################
> # CLANGPDB IA32 definitions
> --
> 2.21.1 (Apple Git-122.3)
>
>
> -=-=-=-=-=-=
> Groups.io<http://Groups.io> Links: You receive all messages sent to this group.
>
> View/Reply Online (#54130): https://edk2.groups.io/g/devel/message/54130
> Mute This Topic: https://groups.io/mt/71134286/1759384
> Group Owner: devel+owner@edk2.groups.io<mailto:devel+owner@edk2.groups.io>
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [liming.gao@intel.com<mailto:liming.gao@intel.com>]
> -=-=-=-=-=-=
[-- Attachment #2: Type: text/html, Size: 14390 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
2020-02-12 1:38 ` Zhiguang Liu
@ 2020-02-12 8:07 ` Vitaly Cheptsov
2020-02-12 14:01 ` Liming Gao
0 siblings, 1 reply; 11+ messages in thread
From: Vitaly Cheptsov @ 2020-02-12 8:07 UTC (permalink / raw)
To: Liu, Zhiguang; +Cc: devel@edk2.groups.io, Gao, Liming, Shi, Steven
[-- Attachment #1.1: Type: text/plain, Size: 6940 bytes --]
Liu,
Thanks for explanation, it does make sense now. As for no need to -DNO_MSABI_VA_FUNCS I agree, but it will not make much difference, because from what I understand the VA_ARG implementation is chosen based on EFIAPI presence when generic __builtin’s are used.
Best,
Vitaly
> 12 февр. 2020 г., в 04:38, Liu, Zhiguang <zhiguang.liu@intel.com> написал(а):
>
> Hi Vitaly,
> After your patch to Switch to GNU mode for CLANGPDB, the build option -DNO_MSABI_VA_FUNCS is not required. I will send another patch to remove it.
> And for you question, this is a patch set that resolves BZ 2415, and the second patch 21821933aea284cd3dfea6994bd4b83bd9739fc9 has direct influence to CLANG38.
>
> Thanks
> Zhiguang
>
> From: devel@edk2.groups.io <mailto:devel@edk2.groups.io> <devel@edk2.groups.io <mailto:devel@edk2.groups.io>> On Behalf Of Vitaly Cheptsov via Groups.Io
> Sent: Tuesday, February 11, 2020 3:09 PM
> To: Gao, Liming <liming.gao@intel.com <mailto:liming.gao@intel.com>>; Liu, Zhiguang <zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com>>; Shi, Steven <steven.shi@intel.com <mailto:steven.shi@intel.com>>
> Cc: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>
> Liming,
>
> Done. As a side note, I am not positive how can 7990438f1437f47990a8890dee51978cb8dbc25c[1] resolve BZ 2415[2]. The bug was about CLANG38, and the toolchain updated was CLANGPDB. While it makes sense to update CLANGPDB with this flag to stay clean (it will not make a difference for clang in GNU mode), CLANGPDB has nothing to do to CLANG38.
>
> Best wishes,
> Vitaly
>
> [1] https://bugzilla.tianocore.org/show_bug.cgi?id=2415 <https://bugzilla.tianocore.org/show_bug.cgi?id=2415>
> [2] https://github.com/tianocore/edk2/commit/7990438f1437f47990a8890dee51978cb8dbc25c <https://github.com/tianocore/edk2/commit/7990438f1437f47990a8890dee51978cb8dbc25c>
>
>
>
> 11 февр. 2020 г., в 09:02, Gao, Liming <liming.gao@intel.com <mailto:liming.gao@intel.com>> написал(а):
>
> Vitaly:
> Can you update this patch based on the latest edk2 trunk? I will catch it for edk2 Q1 stable tag.
>
> Thanks
> Liming
> From: devel@edk2.groups.io <mailto:devel@edk2.groups.io> <devel@edk2.groups.io <mailto:devel@edk2.groups.io>> On Behalf Of Liming Gao
> Sent: Tuesday, February 11, 2020 1:34 PM
> To: vit9696 <vit9696@protonmail.com <mailto:vit9696@protonmail.com>>; devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>
> Reviewed-by: Liming Gao <liming.gao@intel.com <mailto:liming.gao@intel.com>>
>
> From: vit9696 <vit9696@protonmail.com <mailto:vit9696@protonmail.com>>
> Sent: Tuesday, February 11, 2020 3:23 AM
> To: Gao, Liming <liming.gao@intel.com <mailto:liming.gao@intel.com>>; devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> Subject: RE: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>
> Liming,
>
> We did run several of our projects based on EDK II in X64 mode, DEBUG, RELEASE, NOOPT. Noticed no change from XCODE5.
>
> We also tried building several EDK builtin packages like CryptoPkg, MdePkg, MdeModulePkg.
>
> Best wishes,
> Vitaly
>
> В пн, февр. 10, 2020 в 16:47, Gao, Liming <liming.gao@intel.com <mailto:liming.gao@intel.com>> пишет:
> Vitaly:
> This change is good. Can you your test for it? I verify this patch for Ovmf platform on Windows. It can make ovmf pass build with CLANGPDB.
>
> Thanks
> Liming
> > -----Original Message-----
> > From: devel@edk2.groups.io <mailto:devel@edk2.groups.io> <devel@edk2.groups.io <mailto:devel@edk2.groups.io>> On Behalf Of Vitaly Cheptsov via Groups.Io
> > Sent: Monday, February 10, 2020 6:59 PM
> > To: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> > Subject: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397 <https://bugzilla.tianocore.org/show_bug.cgi?id=2397>
> >
> > Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com <mailto:vit9696@protonmail.com>>
> > ---
> > BaseTools/Conf/tools_def.template | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> > index feee2bbf16..6bf6c5768e 100755
> > --- a/BaseTools/Conf/tools_def.template
> > +++ b/BaseTools/Conf/tools_def.template
> > @@ -2755,11 +2755,11 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl
> > DEFINE CLANGPDB_IA32_PREFIX = ENV(CLANG_BIN)
> > DEFINE CLANGPDB_X64_PREFIX = ENV(CLANG_BIN)
> >
> > -DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows
> > -DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows
> > +DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows-gnu
> > +DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows-gnu
> >
> > DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-
> > of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-microsoft-enum-
> > forward-reference
> > -DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> > mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-
> > asynchronous-unwind-tables -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -
> > funsigned-char -fno-ms-extensions -Wno-null-dereference -fms-compatibility -mno-stack-arg-probe
> > +DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> > fno-asynchronous-unwind-tables -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-
> > address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-
> > implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc
> >
> > ###########################
> > # CLANGPDB IA32 definitions
> > --
> > 2.21.1 (Apple Git-122.3)
> >
> >
> > -=-=-=-=-=-=
> > Groups.io <http://groups.io/> Links: You receive all messages sent to this group.
> >
> > View/Reply Online (#54130): https://edk2.groups.io/g/devel/message/54130 <https://edk2.groups.io/g/devel/message/54130>
> > Mute This Topic: https://groups.io/mt/71134286/1759384 <https://groups.io/mt/71134286/1759384>
> > Group Owner: devel+owner@edk2.groups.io <mailto:devel+owner@edk2.groups.io>
> > Unsubscribe: https://edk2.groups.io/g/devel/unsub <https://edk2.groups.io/g/devel/unsub> [liming.gao@intel.com <mailto:liming.gao@intel.com>]
> > -=-=-=-=-=-=
>
>
>
>
>
[-- Attachment #1.2: Type: text/html, Size: 21489 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
2020-02-12 8:07 ` Vitaly Cheptsov
@ 2020-02-12 14:01 ` Liming Gao
2020-02-12 14:15 ` Vitaly Cheptsov
0 siblings, 1 reply; 11+ messages in thread
From: Liming Gao @ 2020-02-12 14:01 UTC (permalink / raw)
To: devel@edk2.groups.io, vit9696@protonmail.com, Liu, Zhiguang; +Cc: Shi, Steven
[-- Attachment #1: Type: text/plain, Size: 6973 bytes --]
Vitaly:
With this change, X64 GCC and CLANG tool chain will use below VA_START definition.
#define VA_START(Marker, Parameter) __builtin_ms_va_start (Marker, Parameter)
Thanks
Liming
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Vitaly Cheptsov via Groups.Io
Sent: Wednesday, February 12, 2020 4:08 PM
To: Liu, Zhiguang <zhiguang.liu@intel.com>
Cc: devel@edk2.groups.io; Gao, Liming <liming.gao@intel.com>; Shi, Steven <steven.shi@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
Liu,
Thanks for explanation, it does make sense now. As for no need to -DNO_MSABI_VA_FUNCS I agree, but it will not make much difference, because from what I understand the VA_ARG implementation is chosen based on EFIAPI presence when generic __builtin’s are used.
Best,
Vitaly
12 февр. 2020 г., в 04:38, Liu, Zhiguang <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>> написал(а):
Hi Vitaly,
After your patch to Switch to GNU mode for CLANGPDB, the build option -DNO_MSABI_VA_FUNCS is not required. I will send another patch to remove it.
And for you question, this is a patch set that resolves BZ 2415, and the second patch 21821933aea284cd3dfea6994bd4b83bd9739fc9 has direct influence to CLANG38.
Thanks
Zhiguang
From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Vitaly Cheptsov via Groups.Io
Sent: Tuesday, February 11, 2020 3:09 PM
To: Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>>; Liu, Zhiguang <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>>; Shi, Steven <steven.shi@intel.com<mailto:steven.shi@intel.com>>
Cc: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
Liming,
Done. As a side note, I am not positive how can 7990438f1437f47990a8890dee51978cb8dbc25c[1] resolve BZ 2415[2]. The bug was about CLANG38, and the toolchain updated was CLANGPDB. While it makes sense to update CLANGPDB with this flag to stay clean (it will not make a difference for clang in GNU mode), CLANGPDB has nothing to do to CLANG38.
Best wishes,
Vitaly
[1] https://bugzilla.tianocore.org/show_bug.cgi?id=2415
[2] https://github.com/tianocore/edk2/commit/7990438f1437f47990a8890dee51978cb8dbc25c
11 февр. 2020 г., в 09:02, Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>> написал(а):
Vitaly:
Can you update this patch based on the latest edk2 trunk? I will catch it for edk2 Q1 stable tag.
Thanks
Liming
From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Liming Gao
Sent: Tuesday, February 11, 2020 1:34 PM
To: vit9696 <vit9696@protonmail.com<mailto:vit9696@protonmail.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
Reviewed-by: Liming Gao <liming.gao@intel.com<mailto:liming.gao@intel.com>>
From: vit9696 <vit9696@protonmail.com<mailto:vit9696@protonmail.com>>
Sent: Tuesday, February 11, 2020 3:23 AM
To: Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: RE: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
Liming,
We did run several of our projects based on EDK II in X64 mode, DEBUG, RELEASE, NOOPT. Noticed no change from XCODE5.
We also tried building several EDK builtin packages like CryptoPkg, MdePkg, MdeModulePkg.
Best wishes,
Vitaly
В пн, февр. 10, 2020 в 16:47, Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>> пишет:
Vitaly:
This change is good. Can you your test for it? I verify this patch for Ovmf platform on Windows. It can make ovmf pass build with CLANGPDB.
Thanks
Liming
> -----Original Message-----
> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Vitaly Cheptsov via Groups.Io
> Sent: Monday, February 10, 2020 6:59 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Subject: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397
>
> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com<mailto:vit9696@protonmail.com>>
> ---
> BaseTools/Conf/tools_def.template | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> index feee2bbf16..6bf6c5768e 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -2755,11 +2755,11 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl
> DEFINE CLANGPDB_IA32_PREFIX = ENV(CLANG_BIN)
> DEFINE CLANGPDB_X64_PREFIX = ENV(CLANG_BIN)
>
> -DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows
> -DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows
> +DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows-gnu
> +DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows-gnu
>
> DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-
> of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-microsoft-enum-
> forward-reference
> -DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-
> asynchronous-unwind-tables -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -
> funsigned-char -fno-ms-extensions -Wno-null-dereference -fms-compatibility -mno-stack-arg-probe
> +DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
> fno-asynchronous-unwind-tables -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-
> address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-
> implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc
>
> ###########################
> # CLANGPDB IA32 definitions
> --
> 2.21.1 (Apple Git-122.3)
>
>
> -=-=-=-=-=-=
> Groups.io<http://groups.io/> Links: You receive all messages sent to this group.
>
> View/Reply Online (#54130): https://edk2.groups.io/g/devel/message/54130
> Mute This Topic: https://groups.io/mt/71134286/1759384
> Group Owner: devel+owner@edk2.groups.io<mailto:devel+owner@edk2.groups.io>
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [liming.gao@intel.com<mailto:liming.gao@intel.com>]
> -=-=-=-=-=-=
[-- Attachment #2: Type: text/html, Size: 18447 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
2020-02-12 14:01 ` Liming Gao
@ 2020-02-12 14:15 ` Vitaly Cheptsov
0 siblings, 0 replies; 11+ messages in thread
From: Vitaly Cheptsov @ 2020-02-12 14:15 UTC (permalink / raw)
To: Gao, Liming, devel@edk2.groups.io, Liu, Zhiguang
Cc: Shi, Steven, Marvin Häuser
[-- Attachment #1: Type: text/plain, Size: 7627 bytes --]
Liming,
Yes, perhaps that was unclear from my message. From what I understand __builtin_va_start behaves the same way as __builtin_ms_va__start for EFIAPI functions, and these are currently the only functions where variadic arguments are allowed.
For non-EFIAPI functions the calling conventions may be different from Microsoft 64-bit, i.e. they are System V for CLANG, CLANGPDB, and GCC. If you use variadic arguments in non-EFIAPI functions (which I believe is currently unsupported), you will end up with different calling conventions for variadic arguments as well. In this case the use of __builtin_va_start will work fine here, as System V variadic arguments will be used for non-EFIAPI, and Microsoft 64-bit for EFIAPI, while __builtin_ms_va_start may technically break non-EFIAPI.
Perhaps I do not fully understand the underlying mechanism, but that is how I have always thought it works.
Best wishes,
Vitaly
On Wed, Feb 12, 2020 at 17:01, Gao, Liming <liming.gao@intel.com> wrote:
> Vitaly:
>
> With this change, X64 GCC and CLANG tool chain will use below VA_START definition.
>
> #define VA_START(Marker, Parameter) __builtin_ms_va_start (Marker, Parameter)
>
> Thanks
>
> Liming
>
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Vitaly Cheptsov via Groups.Io
> Sent: Wednesday, February 12, 2020 4:08 PM
> To: Liu, Zhiguang <zhiguang.liu@intel.com>
> Cc: devel@edk2.groups.io; Gao, Liming <liming.gao@intel.com>; Shi, Steven <steven.shi@intel.com>
> Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>
> Liu,
>
> Thanks for explanation, it does make sense now. As for no need to -DNO_MSABI_VA_FUNCS I agree, but it will not make much difference, because from what I understand the VA_ARG implementation is chosen based on EFIAPI presence when generic __builtin’s are used.
>
> Best,
>
> Vitaly
>
>> 12 февр. 2020 г., в 04:38, Liu, Zhiguang <zhiguang.liu@intel.com> написал(а):
>>
>> Hi Vitaly,
>>
>> After your patch to Switch to GNU mode for CLANGPDB, the build option -DNO_MSABI_VA_FUNCS is not required. I will send another patch to remove it.
>>
>> And for you question, this is a patch set that resolves BZ 2415, and the second patch 21821933aea284cd3dfea6994bd4b83bd9739fc9 has direct influence to CLANG38.
>>
>> Thanks
>>
>> Zhiguang
>>
>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Vitaly Cheptsov via Groups.Io
>> Sent: Tuesday, February 11, 2020 3:09 PM
>> To: Gao, Liming <liming.gao@intel.com>; Liu, Zhiguang <zhiguang.liu@intel.com>; Shi, Steven <steven.shi@intel.com>
>> Cc: devel@edk2.groups.io
>> Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>>
>> Liming,
>>
>> Done. As a side note, I am not positive how can 7990438f1437f47990a8890dee51978cb8dbc25c[1] resolve BZ 2415[2]. The bug was about CLANG38, and the toolchain updated was CLANGPDB. While it makes sense to update CLANGPDB with this flag to stay clean (it will not make a difference for clang in GNU mode), CLANGPDB has nothing to do to CLANG38.
>>
>> Best wishes,
>>
>> Vitaly
>>
>> [1] https://bugzilla.tianocore.org/show_bug.cgi?id=2415
>>
>> [2] https://github.com/tianocore/edk2/commit/7990438f1437f47990a8890dee51978cb8dbc25c
>>
>>> 11 февр. 2020 г., в 09:02, Gao, Liming <liming.gao@intel.com> написал(а):
>>>
>>> Vitaly:
>>>
>>> Can you update this patch based on the latest edk2 trunk? I will catch it for edk2 Q1 stable tag.
>>>
>>> Thanks
>>>
>>> Liming
>>>
>>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Liming Gao
>>> Sent: Tuesday, February 11, 2020 1:34 PM
>>> To: vit9696 <vit9696@protonmail.com>; devel@edk2.groups.io
>>> Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>>>
>>> Reviewed-by: Liming Gao <liming.gao@intel.com>
>>>
>>> From: vit9696 <vit9696@protonmail.com>
>>> Sent: Tuesday, February 11, 2020 3:23 AM
>>> To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io
>>> Subject: RE: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>>>
>>> Liming,
>>>
>>> We did run several of our projects based on EDK II in X64 mode, DEBUG, RELEASE, NOOPT. Noticed no change from XCODE5.
>>>
>>> We also tried building several EDK builtin packages like CryptoPkg, MdePkg, MdeModulePkg.
>>>
>>> Best wishes,
>>>
>>> Vitaly
>>>
>>> В пн, февр. 10, 2020 в 16:47, Gao, Liming <liming.gao@intel.com> пишет:
>>>
>>>> Vitaly:
>>>> This change is good. Can you your test for it? I verify this patch for Ovmf platform on Windows. It can make ovmf pass build with CLANGPDB.
>>>>
>>>> Thanks
>>>> Liming
>>>>> -----Original Message-----
>>>>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Vitaly Cheptsov via Groups.Io
>>>>> Sent: Monday, February 10, 2020 6:59 PM
>>>>> To: devel@edk2.groups.io
>>>>> Subject: [edk2-devel] [PATCH 1/1] BaseTools: Switch to GNU mode for CLANGPDB
>>>>>
>>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397
>>>>>
>>>>> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
>>>>> ---
>>>>> BaseTools/Conf/tools_def.template | 6 +++---
>>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
>>>>> index feee2bbf16..6bf6c5768e 100755
>>>>> --- a/BaseTools/Conf/tools_def.template
>>>>> +++ b/BaseTools/Conf/tools_def.template
>>>>> @@ -2755,11 +2755,11 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl
>>>>> DEFINE CLANGPDB_IA32_PREFIX = ENV(CLANG_BIN)
>>>>> DEFINE CLANGPDB_X64_PREFIX = ENV(CLANG_BIN)
>>>>>
>>>>> -DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows
>>>>> -DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows
>>>>> +DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows-gnu
>>>>> +DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows-gnu
>>>>>
>>>>> DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-
>>>>> of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-microsoft-enum-
>>>>> forward-reference
>>>>> -DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
>>>>> mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-
>>>>> asynchronous-unwind-tables -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -
>>>>> funsigned-char -fno-ms-extensions -Wno-null-dereference -fms-compatibility -mno-stack-arg-probe
>>>>> +DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -
>>>>> fno-asynchronous-unwind-tables -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-
>>>>> address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-
>>>>> implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc
>>>>>
>>>>> ###########################
>>>>> # CLANGPDB IA32 definitions
>>>>> --
>>>>> 2.21.1 (Apple Git-122.3)
>>>>>
>>>>>
>>>>> -=-=-=-=-=-=
>>>>> [Groups.io](http://groups.io/) Links: You receive all messages sent to this group.
>>>>>
>>>>> View/Reply Online (#54130): https://edk2.groups.io/g/devel/message/54130
>>>>> Mute This Topic: https://groups.io/mt/71134286/1759384
>>>>> Group Owner: devel+owner@edk2.groups.io
>>>>> Unsubscribe: https://edk2.groups.io/g/devel/unsub [liming.gao@intel.com]
>>>>> -=-=-=-=-=-=
>
>
[-- Attachment #2: Type: text/html, Size: 16720 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-02-12 14:16 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-10 10:59 [PATCH 0/1] BaseTools: Switch to GNU mode for CLANGPDB Vitaly Cheptsov
2020-02-10 10:59 ` [PATCH 1/1] " Vitaly Cheptsov
2020-02-10 13:47 ` [edk2-devel] " Liming Gao
2020-02-10 19:23 ` Vitaly Cheptsov
2020-02-11 5:33 ` Liming Gao
[not found] ` <15F24239275957C5.19576@groups.io>
2020-02-11 6:02 ` Liming Gao
2020-02-11 7:09 ` Vitaly Cheptsov
2020-02-12 1:38 ` Zhiguang Liu
2020-02-12 8:07 ` Vitaly Cheptsov
2020-02-12 14:01 ` Liming Gao
2020-02-12 14:15 ` Vitaly Cheptsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox