Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/gnu-efi: fix build on mips64el
@ 2022-04-15 16:49 Fabrice Fontaine
  2022-04-21 19:19 ` Arnout Vandecappelle
  2022-07-24 12:13 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2022-04-15 16:49 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine, Thomas Petazzoni

Drop -Werror to fix the following build failure on mips64el raised since
commit 11b347c03ab0b38389ec11b48f63236a3b4d6547:

/nvmedata/autobuild/instance-9/output-1/build/gnu-efi-3.0.10//lib/dpath.c: In function 'FileDevicePath':
/nvmedata/autobuild/instance-9/output-1/build/gnu-efi-3.0.10//lib/../inc/efilink.h:145:46: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  145 | #define EFI_FIELD_OFFSET(TYPE,Field) ((UINTN)(intptr_t)(&(((TYPE *) 0)->Field)))
      |                                              ^
/nvmedata/autobuild/instance-9/output-1/build/gnu-efi-3.0.10//lib/../inc/efidevp.h:404:38: note: in expansion of macro 'EFI_FIELD_OFFSET'
  404 | #define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
      |                                      ^~~~~~~~~~~~~~~~
/nvmedata/autobuild/instance-9/output-1/build/gnu-efi-3.0.10//lib/dpath.c:250:41: note: in expansion of macro 'SIZE_OF_FILEPATH_DEVICE_PATH'
  250 |     FilePath = AllocateZeroPool (Size + SIZE_OF_FILEPATH_DEVICE_PATH + sizeof(EFI_DEVICE_PATH));
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/d19e57004c36f2904c5eea988e0c38fbdb557c7e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0002-Make.defaults-drop-Werror.patch      | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 package/gnu-efi/0002-Make.defaults-drop-Werror.patch

diff --git a/package/gnu-efi/0002-Make.defaults-drop-Werror.patch b/package/gnu-efi/0002-Make.defaults-drop-Werror.patch
new file mode 100644
index 0000000000..79c847d178
--- /dev/null
+++ b/package/gnu-efi/0002-Make.defaults-drop-Werror.patch
@@ -0,0 +1,48 @@
+From 0e43bcb3876d4000790b0a6784453f333c1db701 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Fri, 15 Apr 2022 18:42:36 +0200
+Subject: [PATCH] Make.defaults: drop -Werror
+
+Drop -Werror to avoid the following build failure on mips64el:
+
+/nvmedata/autobuild/instance-9/output-1/build/gnu-efi-3.0.10//lib/dpath.c: In function 'FileDevicePath':
+/nvmedata/autobuild/instance-9/output-1/build/gnu-efi-3.0.10//lib/../inc/efilink.h:145:46: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
+  145 | #define EFI_FIELD_OFFSET(TYPE,Field) ((UINTN)(intptr_t)(&(((TYPE *) 0)->Field)))
+      |                                              ^
+/nvmedata/autobuild/instance-9/output-1/build/gnu-efi-3.0.10//lib/../inc/efidevp.h:404:38: note: in expansion of macro 'EFI_FIELD_OFFSET'
+  404 | #define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
+      |                                      ^~~~~~~~~~~~~~~~
+/nvmedata/autobuild/instance-9/output-1/build/gnu-efi-3.0.10//lib/dpath.c:250:41: note: in expansion of macro 'SIZE_OF_FILEPATH_DEVICE_PATH'
+  250 |     FilePath = AllocateZeroPool (Size + SIZE_OF_FILEPATH_DEVICE_PATH + sizeof(EFI_DEVICE_PATH));
+      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/d19e57004c36f2904c5eea988e0c38fbdb557c7e
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: not sent yet]
+---
+ Make.defaults | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Make.defaults b/Make.defaults
+index 47ed361..d43c3ff 100755
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -168,11 +168,11 @@ ifneq (mingw32,$(findstring mingw32, $(GCCMACHINE)))
+ endif
+ 
+ ifeq (FreeBSD, $(findstring FreeBSD, $(OS)))
+-CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
++CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra \
+            -fshort-wchar -fno-strict-aliasing \
+            -ffreestanding -fno-stack-protector
+ else
+-CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
++CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra \
+            -fshort-wchar -fno-strict-aliasing \
+ 	   -ffreestanding -fno-stack-protector -fno-stack-check \
+            -fno-stack-check \
+-- 
+2.35.1
+
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-24 12:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-15 16:49 [Buildroot] [PATCH] package/gnu-efi: fix build on mips64el Fabrice Fontaine
2022-04-21 19:19 ` Arnout Vandecappelle
2022-07-24 12:13 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox