From: "Nicholas Piggin" <npiggin@gmail.com>
To: "Andrew Jones" <andrew.jones@linux.dev>, <kvm@vger.kernel.org>,
<kvm-riscv@lists.infradead.org>, <kvmarm@lists.linux.dev>,
<linuxppc-dev@lists.ozlabs.org>, <linux-s390@vger.kernel.org>
Cc: <pbonzini@redhat.com>, <thuth@redhat.com>, <lvivier@redhat.com>,
<frankja@linux.ibm.com>, <imbrenda@linux.ibm.com>,
<nrb@linux.ibm.com>, <atishp@rivosinc.com>,
<cade.richard@berkeley.edu>, <jamestiotio@gmail.com>
Subject: Re: [kvm-unit-tests PATCH v2 2/4] Makefile: Prepare for clang EFI builds
Date: Wed, 11 Sep 2024 10:21:39 +1000 [thread overview]
Message-ID: <D430XMRU4FZD.1FFPMW6WVWRSD@gmail.com> (raw)
In-Reply-To: <20240904105020.1179006-8-andrew.jones@linux.dev>
On Wed Sep 4, 2024 at 8:50 PM AEST, Andrew Jones wrote:
> clang complains about GNU extensions such as variable sized types not
> being at the end of structs unless -Wno-gnu is used. We may
> eventually want -Wno-gnu, but for now let's just handle the warnings
> as they come. Add -Wno-gnu-variable-sized-type-not-at-end to avoid
> the warning issued for the initrd_dev_path struct.
You could also make a variant of struct efi_vendor_dev_path with no
vendordata just for initrd_dev_path?
It's taken from Linux or some efi upstream though so maybe it's annoying
to make such changes here. Okay in that case since it's limited to EFI.
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
>
> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
> ---
> Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 3d51cb726120..7471f7285b78 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -50,6 +50,8 @@ EFI_CFLAGS += -fshort-wchar
> # EFI applications use PIC as they are loaded to dynamic addresses, not a fixed
> # starting address
> EFI_CFLAGS += -fPIC
> +# Avoid error with the initrd_dev_path struct
> +EFI_CFLAGS += -Wno-gnu-variable-sized-type-not-at-end
> # Create shared library
> EFI_LDFLAGS := -Bsymbolic -shared -nostdlib
> endif
next prev parent reply other threads:[~2024-09-11 0:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 10:50 [kvm-unit-tests PATCH v2 0/4] Support cross compiling with clang Andrew Jones
2024-09-04 10:50 ` [kvm-unit-tests PATCH v2 1/4] riscv: Drop mstrict-align Andrew Jones
2024-09-11 0:08 ` Nicholas Piggin
2024-09-11 8:19 ` Andrew Jones
2024-09-04 10:50 ` [kvm-unit-tests PATCH v2 2/4] Makefile: Prepare for clang EFI builds Andrew Jones
2024-09-04 10:57 ` Thomas Huth
2024-09-11 0:21 ` Nicholas Piggin [this message]
2024-09-11 8:21 ` Andrew Jones
2024-09-04 10:50 ` [kvm-unit-tests PATCH v2 3/4] configure: Support cross compiling with clang Andrew Jones
2024-09-11 0:24 ` Nicholas Piggin
2024-09-11 8:24 ` Andrew Jones
2024-09-04 10:50 ` [kvm-unit-tests PATCH v2 4/4] riscv: gitlab-ci: Add clang build tests Andrew Jones
2024-09-11 0:26 ` Nicholas Piggin
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=D430XMRU4FZD.1FFPMW6WVWRSD@gmail.com \
--to=npiggin@gmail.com \
--cc=andrew.jones@linux.dev \
--cc=atishp@rivosinc.com \
--cc=cade.richard@berkeley.edu \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=jamestiotio@gmail.com \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lvivier@redhat.com \
--cc=nrb@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=thuth@redhat.com \
/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).