From dfe3645bb2535904f441d9031080dd4cd118688a Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 11 Jun 2018 13:04:43 -0400
Subject: [PATCH 1/2] Make some compiler versions ignore missing field
initializers.
There's literally no reason for -Wmissing-field-initializers to ever
trigger when you're using -std= /anything c99 or newer/, but some
compilers do, so nerf it out.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
efi/Makefile | 1 +
linux/Makefile | 1 +
2 files changed, 2 insertions(+)
diff --git a/efi/Makefile b/efi/Makefile
index 6699af1d400..f4d079e8816 100644
--- a/efi/Makefile
+++ b/efi/Makefile
@@ -13,6 +13,7 @@ CFLAGS ?= -Og -g3 -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 \
-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 \
-grecord-gcc-switches
BUILDFLAGS := $(CFLAGS) -fpic -Werror -Wall -Wextra -fshort-wchar \
+ -Wno-error=missing-field-initializers -Wno-missing-field-initializers \
-fno-merge-constants -ffreestanding \
-fno-stack-protector -fno-stack-check --std=gnu11 -DCONFIG_$(ARCH) \
-I/usr/include/efi/ -I/usr/include/efi/$(ARCH)/ \
diff --git a/linux/Makefile b/linux/Makefile
index 6089b4758bb..7aed70495cb 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -34,6 +34,7 @@ endif
BUILDFLAGS := $(CFLAGS) -Wall -Wextra -Werror -Wno-error=cpp \
-Wno-unused-result -Wno-unused-function \
-Wsign-compare -Werror=sign-compare \
+ -Wno-error=missing-field-initializers -Wno-missing-field-initializers \
-fshort-wchar --std=gnu11 \
-DLOCALEDIR=\"$(localedir)\" -D_GNU_SOURCE \
-DFWUP_EFI_DIR_NAME=\"$(EFIDIR)\" \
--
2.17.1