* [PATCH 0/4] Dist Archive and Clang Build Fixes
@ 2025-10-25 15:53 Andrew Hamilton
2025-10-25 15:53 ` [PATCH 1/4] build: Include MAINTAINERS and SECURITY files in dist archive Andrew Hamilton
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Andrew Hamilton @ 2025-10-25 15:53 UTC (permalink / raw)
To: grub-devel; +Cc: daniel.kiper, Andrew Hamilton
Add several additional files to the dist archive:
MAINTAINERS
SECURITY
zstd test support files
tpm2key.asn file
These now show up in the dist archive such as created
with "make dist-gzip".
Correct build error with Clang targetting EFI. This was
caused by Clang flagging a missing initializer for
"vendor_defined_data" which is a zero length array. Add
a conditional compile pragma to allow Clang to build this.
To reproduce the issue:
./configure BUILD_CC=clang HOST_CC=clang TARGET_CC=clang CC=clang
make
<observe error>
Andrew Hamilton (4):
build: Include MAINTAINERS and SECURITY files in dist archive
build: Include new zstd test support files in dist archive
build: Add tpm2asn file for reference to dist archive
loader/efi/linux: Fix Compile Error With Clang
conf/Makefile.extra-dist | 5 +++++
grub-core/loader/efi/linux.c | 8 ++++++++
2 files changed, 13 insertions(+)
--
2.43.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] build: Include MAINTAINERS and SECURITY files in dist archive
2025-10-25 15:53 [PATCH 0/4] Dist Archive and Clang Build Fixes Andrew Hamilton
@ 2025-10-25 15:53 ` Andrew Hamilton
2025-10-25 15:53 ` [PATCH 2/4] build: Include new zstd test support " Andrew Hamilton
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Andrew Hamilton @ 2025-10-25 15:53 UTC (permalink / raw)
To: grub-devel; +Cc: daniel.kiper, Andrew Hamilton
Include the MAINTAINERS and SECURITY files in the dist archive
for reference in distributed archives by end users.
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
---
| 2 ++
1 file changed, 2 insertions(+)
--git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
index dcb0bed07..936d3bef6 100644
--- a/conf/Makefile.extra-dist
+++ b/conf/Makefile.extra-dist
@@ -83,6 +83,8 @@ EXTRA_DIST += grub-core/lib/LzmaDec.c
EXTRA_DIST += grub-core/fs/cpio_common.c
EXTRA_DIST += BUGS
+EXTRA_DIST += MAINTAINERS
+EXTRA_DIST += SECURITY
EXTRA_DIST += util/i386/efi/grub-dumpdevtree
EXTRA_DIST += util/spkmodem-recv.c
EXTRA_DIST += util/import_gcrypth.sed
--
2.43.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] build: Include new zstd test support files in dist archive
2025-10-25 15:53 [PATCH 0/4] Dist Archive and Clang Build Fixes Andrew Hamilton
2025-10-25 15:53 ` [PATCH 1/4] build: Include MAINTAINERS and SECURITY files in dist archive Andrew Hamilton
@ 2025-10-25 15:53 ` Andrew Hamilton
2025-10-25 15:53 ` [PATCH 3/4] build: Add tpm2asn file for reference to " Andrew Hamilton
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Andrew Hamilton @ 2025-10-25 15:53 UTC (permalink / raw)
To: grub-devel; +Cc: daniel.kiper, Andrew Hamilton
Include the two new zstd test support files in the dist archive
so end users can successfully run this test.
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
---
| 2 ++
1 file changed, 2 insertions(+)
--git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
index 936d3bef6..6b276b187 100644
--- a/conf/Makefile.extra-dist
+++ b/conf/Makefile.extra-dist
@@ -183,6 +183,8 @@ EXTRA_DIST += tests/file_filter/file.lzop
EXTRA_DIST += tests/file_filter/file.lzop.sig
EXTRA_DIST += tests/file_filter/file.xz
EXTRA_DIST += tests/file_filter/file.xz.sig
+EXTRA_DIST += tests/file_filter/file.zstd
+EXTRA_DIST += tests/file_filter/file.zstd.sig
EXTRA_DIST += tests/file_filter/keys
EXTRA_DIST += tests/file_filter/keys.pub
EXTRA_DIST += tests/file_filter/test.cfg
--
2.43.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] build: Add tpm2asn file for reference to dist archive
2025-10-25 15:53 [PATCH 0/4] Dist Archive and Clang Build Fixes Andrew Hamilton
2025-10-25 15:53 ` [PATCH 1/4] build: Include MAINTAINERS and SECURITY files in dist archive Andrew Hamilton
2025-10-25 15:53 ` [PATCH 2/4] build: Include new zstd test support " Andrew Hamilton
@ 2025-10-25 15:53 ` Andrew Hamilton
2025-10-25 15:53 ` [PATCH 4/4] loader/efi/linux: Fix Compile Error With Clang Andrew Hamilton
2025-10-27 17:16 ` [PATCH 0/4] Dist Archive and Clang Build Fixes Daniel Kiper via Grub-devel
4 siblings, 0 replies; 6+ messages in thread
From: Andrew Hamilton @ 2025-10-25 15:53 UTC (permalink / raw)
To: grub-devel; +Cc: daniel.kiper, Andrew Hamilton
Add the tpm2asn file to the dist archive for reference by
end users.
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
---
| 1 +
1 file changed, 1 insertion(+)
--git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
index 6b276b187..288ba1f87 100644
--- a/conf/Makefile.extra-dist
+++ b/conf/Makefile.extra-dist
@@ -75,6 +75,7 @@ EXTRA_DIST += grub-core/efiemu/runtime/config.h
EXTRA_DIST += grub-core/tests/asn1/asn1_test.h
EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/tests/asn1/tests -name '*.h')
EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/commands/tpm2_key_protector -name '*.h')
+EXTRA_DIST += grub-core/commands/tpm2_key_protector/tpm2key.asn
EXTRA_DIST += grub-core/commands/appendedsig/appendedsig.h
--
2.43.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] loader/efi/linux: Fix Compile Error With Clang
2025-10-25 15:53 [PATCH 0/4] Dist Archive and Clang Build Fixes Andrew Hamilton
` (2 preceding siblings ...)
2025-10-25 15:53 ` [PATCH 3/4] build: Add tpm2asn file for reference to " Andrew Hamilton
@ 2025-10-25 15:53 ` Andrew Hamilton
2025-10-27 17:16 ` [PATCH 0/4] Dist Archive and Clang Build Fixes Daniel Kiper via Grub-devel
4 siblings, 0 replies; 6+ messages in thread
From: Andrew Hamilton @ 2025-10-25 15:53 UTC (permalink / raw)
To: grub-devel; +Cc: daniel.kiper, Andrew Hamilton
Clang will produce a warning (which is treated as
an error) that "vendor_defined_data" is uninitialized.
This is a "zero length" array member of this struct.
Add conditional compile pragma to allow this to
compile with Clang.
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
---
grub-core/loader/efi/linux.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
index 4f5589862..ded507cd5 100644
--- a/grub-core/loader/efi/linux.c
+++ b/grub-core/loader/efi/linux.c
@@ -55,6 +55,14 @@ static bool initrd_use_loadfile2 = false;
static grub_guid_t load_file2_guid = GRUB_EFI_LOAD_FILE2_PROTOCOL_GUID;
static grub_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID;
+/*
+ * Clang will produce a warning for missing initializer for the
+ * zero-length array "vendor_defined_data" inside this structure.
+ * Suppress this warning which is treated as an error.
+ */
+#ifdef __clang__
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
static initrd_media_device_path_t initrd_lf2_device_path = {
{
{
--
2.43.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] Dist Archive and Clang Build Fixes
2025-10-25 15:53 [PATCH 0/4] Dist Archive and Clang Build Fixes Andrew Hamilton
` (3 preceding siblings ...)
2025-10-25 15:53 ` [PATCH 4/4] loader/efi/linux: Fix Compile Error With Clang Andrew Hamilton
@ 2025-10-27 17:16 ` Daniel Kiper via Grub-devel
4 siblings, 0 replies; 6+ messages in thread
From: Daniel Kiper via Grub-devel @ 2025-10-27 17:16 UTC (permalink / raw)
To: Andrew Hamilton; +Cc: Daniel Kiper, grub-devel
On Sat, Oct 25, 2025 at 10:53:36AM -0500, Andrew Hamilton wrote:
> Add several additional files to the dist archive:
> MAINTAINERS
> SECURITY
> zstd test support files
> tpm2key.asn file
> These now show up in the dist archive such as created
> with "make dist-gzip".
>
> Correct build error with Clang targetting EFI. This was
> caused by Clang flagging a missing initializer for
> "vendor_defined_data" which is a zero length array. Add
> a conditional compile pragma to allow Clang to build this.
> To reproduce the issue:
> ./configure BUILD_CC=clang HOST_CC=clang TARGET_CC=clang CC=clang
> make
> <observe error>
>
> Andrew Hamilton (4):
> build: Include MAINTAINERS and SECURITY files in dist archive
> build: Include new zstd test support files in dist archive
> build: Add tpm2asn file for reference to dist archive
> loader/efi/linux: Fix Compile Error With Clang
For all patches Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>...
Thank you for fixing these issues!
Daniel
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-10-27 17:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-25 15:53 [PATCH 0/4] Dist Archive and Clang Build Fixes Andrew Hamilton
2025-10-25 15:53 ` [PATCH 1/4] build: Include MAINTAINERS and SECURITY files in dist archive Andrew Hamilton
2025-10-25 15:53 ` [PATCH 2/4] build: Include new zstd test support " Andrew Hamilton
2025-10-25 15:53 ` [PATCH 3/4] build: Add tpm2asn file for reference to " Andrew Hamilton
2025-10-25 15:53 ` [PATCH 4/4] loader/efi/linux: Fix Compile Error With Clang Andrew Hamilton
2025-10-27 17:16 ` [PATCH 0/4] Dist Archive and Clang Build Fixes Daniel Kiper via Grub-devel
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).