Menu

#20 fixes needed for MSVC (VS2013) compilation

Unstable_(example)
closed
None
5
2015-01-05
2014-12-08
Pete Batard
No

The following patch is needed to allow compilation of the library using Microsoft Visual Studio. Please see the patch comment for details of the errors and warnings addressed.

An example of the gnu-efi library, being used as a git submodule for the compilation and testing of UEFI applications, can be found at https://github.com/pbatard/uefi-simple

I would greatly appreciate if this could be applied to gnu-efi as it would make developing UEFI applications using gratis tools, such as Visual Studio 2013 Community Edition, a lot more simpler and user friendly on Windows.

Thanks.

1 Attachments

Discussion

  • Nigel Croxon

    Nigel Croxon - 2014-12-09
    • assigned_to: Nigel Croxon
     
  • Nigel Croxon

    Nigel Croxon - 2014-12-09

    I will start to review your patch.

     
  • Pete Batard

    Pete Batard - 2014-12-10

    Thanks.

    Since I have moved to using gnu-efi + Visual Studio to build EFI drivers (https://github.com/pbatard/efifs), and found the need for additional changes, please find an updated version of the patch.

    The redefinition of EFI_DRIVER_ENTRY_POINT(), which was added for all intel architectures, is needed because the existing definition uses attribute() which is a pure GNU extension, and I think it makes more sense to use the /ENTRY option of the MSVC linker to specify the entry point.

    I also replaced _MSC_VER -> _MSC_EXTENSIONS in previous sections, to be consistent with the rest of gnu-efi. I also checked that the MSVC compiler seems to be happy mixing 64 and 32 bit operands for shift/mult/div, when compiling 32 bit code (math.c _asm calls removal).

     
  • Nigel Croxon

    Nigel Croxon - 2015-01-05

    Hello Pete,

    I have reviewed, tested and released your patch. (git, download).
    Version 3.0.1.

     
  • Nigel Croxon

    Nigel Croxon - 2015-01-05
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB