Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@buildroot.org
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: [Buildroot] [PATCH v2,1/1] package/file: fix build with gcc 4.8
Date: Tue,  4 Jan 2022 21:54:55 +0100	[thread overview]
Message-ID: <20220104205455.3632671-1-fontaine.fabrice@gmail.com> (raw)

Fix the following build failure raised since bump to version 5.41 in
commit d38b72bcd75392a88b5100839ac410859d0a6a79:

readelf.c: In function 'do_auxv_note':
readelf.c:1046:2: error: 'for' loop initial declarations are only allowed in C99 mode
  for (size_t off = 0; off + elsize <= descsz; off += elsize) {
  ^

Fixes:
 - http://autobuild.buildroot.org/results/31cbc313fceb84c0cbb1969fca5ac44244871dbc

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2 (after review of Yann E. Morin):
 - Set ac_cv_prog_c99 for host as already done for target instead of
   adding an upstreamable patch

 package/file/file.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/file/file.mk b/package/file/file.mk
index 12647af8bb..62cec4b2c9 100644
--- a/package/file/file.mk
+++ b/package/file/file.mk
@@ -9,6 +9,7 @@ FILE_SITE = ftp://ftp.astron.com/pub/file
 FILE_DEPENDENCIES = host-file
 HOST_FILE_DEPENDENCIES = host-zlib
 FILE_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
+HOST_FILE_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
 FILE_INSTALL_STAGING = YES
 FILE_LICENSE = BSD-2-Clause, BSD-4-Clause (one file), BSD-3-Clause (one file)
 FILE_LICENSE_FILES = COPYING src/mygetopt.h src/vasprintf.c
-- 
2.34.1

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

             reply	other threads:[~2022-01-04 20:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 20:54 Fabrice Fontaine [this message]
2022-01-07 18:08 ` [Buildroot] [PATCH v2, 1/1] package/file: fix build with gcc 4.8 Thomas Petazzoni
2022-01-08 10:51 ` Thomas Petazzoni
2022-01-08 16:13   ` Fabrice Fontaine
2022-01-08 17:39     ` Peter Seiderer
2022-01-08 18:38       ` Thomas Petazzoni
2022-01-08 18:46         ` Fabrice Fontaine
2022-01-08 18:50         ` Arnout Vandecappelle
2022-01-08 20:41           ` Fabrice Fontaine
2022-01-08 22:04 ` Yann E. MORIN

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=20220104205455.3632671-1-fontaine.fabrice@gmail.com \
    --to=fontaine.fabrice@gmail.com \
    --cc=buildroot@buildroot.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox