From: Pete Batard <pete@akeo.ie>
To: grub-devel@gnu.org
Subject: Re: [PATCH] fs: remove implicit compiler calls to memset/memcpy
Date: Sun, 10 Apr 2016 17:50:10 +0200 [thread overview]
Message-ID: <570A7632.1060209@akeo.ie> (raw)
In-Reply-To: <CAEaD8JNm61wut+sFkc104FP0pj-Y8FVa_dzpjEgGbRikxZ6vZw@mail.gmail.com>
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
next prev parent reply other threads:[~2016-04-10 15:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-10 13:52 [PATCH] fs: remove implicit compiler calls to memset/memcpy Pete Batard
2016-04-10 14:30 ` Vladimir 'phcoder' Serbinenko
2016-04-10 15:50 ` Pete Batard [this message]
2016-04-18 5:50 ` Vladimir 'phcoder' Serbinenko
2016-04-18 10:13 ` Pete Batard
2016-04-18 10:36 ` Andrei Borzenkov
2016-04-18 10:49 ` Vladimir 'phcoder' Serbinenko
2016-04-18 12:03 ` Pete Batard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=570A7632.1060209@akeo.ie \
--to=pete@akeo.ie \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).