[edk2-devel] [PATCH 0/1] Use _MSC_VER to determine MSVC compiler

Liming Gao liming.gao at intel.com
Tue Feb 4 06:56:33 UTC 2020


Vitaly:
  Yes. I think we should have better solution in OpenSSL to support EDK2 usage. But, this is a long term solution. For now, I will try the solution to remove -fms-compatibility option in CLANGPDB tool chain.

Thanks
Liming
From: vit9696 <vit9696 at protonmail.com>
Sent: Monday, February 3, 2020 7:29 PM
To: Gao, Liming <liming.gao at intel.com>; devel at edk2.groups.io; Marvin Häuser <marvin.haeuser at outlook.com>
Subject: RE: [edk2-devel] [PATCH 0/1] Use _MSC_VER to determine MSVC compiler

Liming,

I believe it is reasonable to fix OpenSSL, but most likely it is faster to address EDK II code at first. In future we should still stick to _MSC_VER, but for now just ensuring that any toolchain by MSVC does not define _MSC_EXTENSIONS should work too.

I believe that -fms-compatibility option is not needed for CLANGPDB, as CLANGPDB is literally using clang, and that worked fine before in CLANG38 and XCODE5. We may still have to update some preprocessor conditions to include __clang__ near __GNUC__ if __GNUC__ is left undefined even when we remove -fms-compatibility, but that sounds fine for me.

We will investigate that on our own and submit a new patch, but help from other parties is strongly appreciated. We mostly use XCODE5 and are not well aware of other platforms.

Best wishes,
Vitaly

On Mon, Feb 3, 2020 at 11:00, Gao, Liming <liming.gao at intel.com<mailto:liming.gao at intel.com>> wrote:
Vitaly:
This change will cause CryptoPkg openssl build failure, because OpensslLib.inf undefines _MSC_VER macro to make sure openssl source code be built in edk2 project without using MS VS functions.

Now, I have no good solution to fix this issue. One way is to use defined(_MSC_EXTENSIONS) && !defined(__clang__), another way is to investigate whether we can remove -fms-compatibility option in CLANGPDB.

Thanks
Liming
> -----Original Message-----
> From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> On Behalf Of Vitaly Cheptsov via Groups.Io
> Sent: Saturday, February 1, 2020 5:17 AM
> To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>
> Subject: [edk2-devel] [PATCH 0/1] Use _MSC_VER to determine MSVC compiler
>
> Patch details are explained in https://bugzilla.tianocore.org/show_bug.cgi?id=2397.
> We request this to be merged in edk2-stable202002.
>
> Vitaly Cheptsov (1):
> MdePkg: Use _MSC_VER to determine MSVC compiler
>
> MdePkg/Include/AArch64/ProcessorBind.h | 2 +-
> MdePkg/Include/Arm/ProcessorBind.h | 8 ++++----
> MdePkg/Include/Base.h | 10 +++++-----
> MdePkg/Include/Ia32/ProcessorBind.h | 6 +++---
> MdePkg/Include/X64/ProcessorBind.h | 6 +++---
> 5 files changed, 16 insertions(+), 16 deletions(-)
>
> --
> 2.21.1 (Apple Git-122.3)
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#53623): https://edk2.groups.io/g/devel/message/53623
> Mute This Topic: https://groups.io/mt/70882954/1759384
> Group Owner: devel+owner at edk2.groups.io<mailto:devel+owner at edk2.groups.io>
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [liming.gao at intel.com]
> -=-=-=-=-=-=



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#53700): https://edk2.groups.io/g/devel/message/53700
Mute This Topic: https://groups.io/mt/70882954/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20200204/7fdda210/attachment.htm>


More information about the edk2-devel-archive mailing list