Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1602528

Re: [PATCH 2/2] x86, boot: Use regparm=0 for memcpy and memset when using clang

From Michael Davidson <md@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] x86, boot: Use regparm=0 for memcpy and memset when using clang
Date 2017-03-16 16:30 +0100
Message-ID <tlFvH-gv-19@gated-at.bofh.it> (permalink)
References <tloXT-59Y-9@gated-at.bofh.it> <tloXT-59Y-7@gated-at.bofh.it> <tlykx-3qz-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Mar 16, 2017 at 12:46 AM, Ingo Molnar <mingo@kernel.org> wrote:
>
> I don't think we want to add such ugly workarounds for clang bugs in a piecemail
> wise manner. If this was the _only_ workaround required to have a working kernel
> built with clang then maybe, but there's no way to tell from this submission.
>
Apologies for the lack of context. This change, and the #undef of mem*
in x86/boot/string.c
are actually the only patches that are absolutely needed to get an
x86_64 kernel to
build and boot successfully with clang provided that you also arrange
for  clang
be invoked with the -no-integrated-as option. In practice it is also
necessary to disable
a few more clang warnings to make the build tolerable.

I will send out a more complete set of patches later today which deal
with those other
issues.

As far as the specific issue of this particular clang bug is concerned
I did also consider
adding a configuration option to simply not build the real mode boot
code at all but
that looked like it would require much more extensive surgery.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] x86, boot: Use regparm=0 for memcpy and memset when using clang Michael Davidson <md@google.com> - 2017-03-15 22:50 +0100
  Re: [PATCH 2/2] x86, boot: Use regparm=0 for memcpy and memset when  using clang Ingo Molnar <mingo@kernel.org> - 2017-03-16 08:50 +0100
    Re: [PATCH 2/2] x86, boot: Use regparm=0 for memcpy and memset when  using clang Michael Davidson <md@google.com> - 2017-03-16 16:30 +0100

csiph-web