From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: "musl@lists.openwall.com" <musl@lists.openwall.com>
Cc: "Joel Stanley" <joel@jms.id.au>, "Cédric Le Goater" <clg@kaod.org>
Subject: Re: [musl] ./src/internal/atomic.h:229:14: error: size of array 'a_cas_p_undefined_but_pointer_not_32bit' is negative on PowerPC
Date: Fri, 29 Jul 2022 17:34:17 +0200 [thread overview]
Message-ID: <20220729173417.206a8fd3@windsurf> (raw)
In-Reply-To: <20220722162900.GB1320090@port70.net>
Hello,
On Fri, 22 Jul 2022 18:29:00 +0200
Szabolcs Nagy <nsz@port70.net> wrote:
> * Thomas Petazzoni <thomas.petazzoni@bootlin.com> [2022-07-22 09:12:24 +0200]:
> > Hello,
> >
> > We've "recently" started in Buildroot the build testing of fully random
> > configurations, so we're now testing many more cases and seeing new
> > build failures.
> >
> > As part of this, we're now seeing build failures of musl on PowerPC
> > 32-bit architectures. So far, we've seen the problem on power4
> > (-mcpu=power4), power5 (-mcpu=power5) and power6 (-mcpu=power6), 970
> > (-mcpu=970), power8 (-mcpu=power8), 620 (-mcpu=620), 630 (-mcpu=630).
> >
> > The failure is:
> >
> > ./src/internal/atomic.h:229:14: error: size of array 'a_cas_p_undefined_but_pointer_not_32bit' is negative
> > 229 | typedef char a_cas_p_undefined_but_pointer_not_32bit[-sizeof(char) == 0xffffffff ? 1 : -1];
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> the compiler is not configured for 32-bit target abi, but the triplet
> (powerpc-buildroot-linux-musl) selects the 32-bit target in musl.
>
> please use powerpc64* --target triplet when configuring musl or configure
> gcc to default to 32-bit abi if that's what you want.
>
> (the bug would be more obvious looking at gcc -v)
Thanks a lot for the feedback. I have added in Cc Joel and Cédric, who
help maintain the PowerPC support in Buildroot. Joel has submitted just
today a patch series to Buildroot that I believe should help address
this particular issue. Joel, do you confirm?
Thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
prev parent reply other threads:[~2022-07-29 15:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 7:12 Thomas Petazzoni
2022-07-22 16:29 ` Szabolcs Nagy
2022-07-29 15:34 ` Thomas Petazzoni [this message]
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=20220729173417.206a8fd3@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).