Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Brandon Maier via buildroot <buildroot@buildroot.org>
Cc: Jan Pedersen <jp@jp-embedded.com>,
	Brandon Maier <brandon.maier@collins.com>
Subject: Re: [Buildroot] [PATCH 2/2] package/zip: fix build with GCC 14
Date: Sat, 11 May 2024 08:56:19 +0200	[thread overview]
Message-ID: <20240511085619.304cff8f@windsurf> (raw)
In-Reply-To: <20240510235510.2454216-2-brandon.maier@collins.com>

On Fri, 10 May 2024 23:55:10 +0000
Brandon Maier via buildroot <buildroot@buildroot.org> wrote:

> Builds with GCC 14 print the following error
> 
> > zip.h:726:10: error: conflicting types for 'memset'; have 'char *(char *, int,  unsigned int)'  
> 
> This is because with GCC 14, Zip incorrectly detects that the memset functions
> exist. Which enables the ZMEM flag and declares its own version of memset.
> 
> This is because the ./unix/configure script attempts to compile a C file using
> 'memset' but it does not include the <string.h>. This was allowed in gnu89, but
> in GCC 14 -Werror=implicit-function-declaration is enabled by default[1].
> 
> We forcefully set '-std=gnu89' so that Zip will compile everything against
> gnu89, which suppresses the warning.
> 
> [1] https://gcc.gnu.org/gcc-14/porting_to.html#warnings-as-errors
> 
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> ---
>  package/zip/zip.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

My first thought was that this should be fixed with a patch, that we
send upstream. However, it seems like the zip 3.0 release we're using
dates back from 2008, and despite an announce of zip 3.1 on the
website, this still hasn't happened. As it's not clear how active
upstream is, I've applied your solution that doesn't involve a patch.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-05-11  6:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10 23:55 [Buildroot] [PATCH 1/2] support/testing: add zip test Brandon Maier via buildroot
2024-05-10 23:55 ` [Buildroot] [PATCH 2/2] package/zip: fix build with GCC 14 Brandon Maier via buildroot
2024-05-11  6:56   ` Thomas Petazzoni via buildroot [this message]
2024-06-08  7:44   ` Peter Korsgaard
2024-05-11  6:54 ` [Buildroot] [PATCH 1/2] support/testing: add zip test Thomas Petazzoni via buildroot
2024-06-08  7:44 ` Peter Korsgaard

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=20240511085619.304cff8f@windsurf \
    --to=buildroot@buildroot.org \
    --cc=brandon.maier@collins.com \
    --cc=jp@jp-embedded.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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