grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fs: remove implicit compiler calls to memset/memcpy


From: Pete Batard
Subject: Re: [PATCH] fs: remove implicit compiler calls to memset/memcpy
Date: Sun, 10 Apr 2016 17:50:10 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 2016.04.10 16:30, Vladimir 'phcoder' Serbinenko wrote:
Why is the same solution not suitable for you?

That's the first thing I attempted, but the MSVC compiler is uncooperative.

If you try to redefine memset/memcpy, you get the following compiler error:

error C2169: '_memcpy' : Intrinsic function, cannot be defined

And of course, this means that you then have to link with the standard Windows MSVC libraries, which creates issues when building UEFI drivers...

Apparently, there used to be a way to disable intrinsic functions with older versions of Visual Studio (using a pragma), but this capability was removed in the latest versions. Either that, or Microsoft does not consider memcpy and friends as belonging to the general "intrinsic" category that the compiler can disable.

This means that, right now, the only option available is to patch the GRUB source.

Regards,

/Pete





reply via email to

[Prev in Thread] Current Thread [Next in Thread]