All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] grub: fix build with squashfs support enabled
Date: Sun, 10 Mar 2019 20:11:19 +0000	[thread overview]
Message-ID: <20190310201119.3269-1-Martin.Jansa@gmail.com> (raw)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../grub/files/fix.build.with.squashfs.patch  | 24 +++++++++++++++++++
 meta/recipes-bsp/grub/grub2.inc               |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta/recipes-bsp/grub/files/fix.build.with.squashfs.patch

diff --git a/meta/recipes-bsp/grub/files/fix.build.with.squashfs.patch b/meta/recipes-bsp/grub/files/fix.build.with.squashfs.patch
new file mode 100644
index 0000000000..2c2d2ea0b1
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/fix.build.with.squashfs.patch
@@ -0,0 +1,24 @@
+When squashfs support is enabled, the build fails with:
+
+../grub-2.02/grub-core/fs/squash4.c: In function 'direct_read':
+../grub-2.02/grub-core/fs/squash4.c:868:10: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+       if (err)
+          ^
+cc1: all warnings being treated as errors
+Makefile:7272: recipe for target 'grub-core/fs/libgrubmods_a-squash4.o' failed
+
+Upstream-Status: Pending (should be fixed in gnulib which is then rarely updated in grub)
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+--- grub-2.02/grub-core/fs/squash4.c	2019-03-10 20:00:14.070468728 +0000
++++ grub-2.02.fixed/grub-core/fs/squash4.c	2019-03-10 19:58:31.382477818 +0000
+@@ -746,7 +746,7 @@
+ 	     struct grub_squash_cache_inode *ino,
+ 	     grub_off_t off, char *buf, grub_size_t len)
+ {
+-  grub_err_t err;
++  grub_err_t err = 0;
+   grub_off_t cumulated_uncompressed_size = 0;
+   grub_uint64_t a = 0;
+   grub_size_t i;
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 3f3165c264..c6994723f9 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -22,6 +22,7 @@ SRC_URI = "https://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
            file://0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch \
            file://0001-grub-setup-Debug-message-cleanup.patch \
            file://disable-address-of-packed-member.patch \
+           file://fix.build.with.squashfs.patch \
 "
 SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d"
 SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d"
-- 
2.17.1



                 reply	other threads:[~2019-03-10 20:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190310201119.3269-1-Martin.Jansa@gmail.com \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.