From: Stefan Liebler <stli@linux.ibm.com>
To: Bruno Haible <bruno@clisp.org>, Paul Eggert <eggert@cs.ucla.edu>
Cc: bug-gnulib@gnu.org
Subject: Re: FYI: s390x: Require GCC 7.1 or later to build glibc due to __builtin_add_overflow
Date: Thu, 7 Jan 2021 18:00:33 +0100 [thread overview]
Message-ID: <86017a48-d2f2-a5e4-ac65-060cdebd7521@linux.ibm.com> (raw)
In-Reply-To: <3477388.eNboq5l62f@omega>
On 12/18/20 7:32 PM, Bruno Haible wrote:
> Paul Eggert wrote:
>>> Thanks for the heads-up. Indeed, what I understand from this bug report is that
>>> the condition code handling (required by __builtin_add_overflow on many
>>> platforms) was unreliable before 2017-01-27, i.e. in GCC versions < 7.
>>> So, gnulib shouldn't make use of it in these GCC versions.
>>
>> So the problem is on all platforms, not just s390x?
>
> That's my understanding, from the cited
> <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>.
> Even if I'm wrong, given that GCC 5 and 6 are in decreasing use, I feel it's
> better to err on the safe side.
>
> Bruno
>
According to Andreas comment in the gcc-bugzilla 98269, the issue was
fixed with a common-code patch. On s390x this issue was hidden due to a
s390-specific patch (committed before the common-code fix).
Thus, I also think, that this bug could happen on all platforms, but I
don't know if this really happens anywhere.
The gcc-bugzilla 78559 (=> common-code patch) was reported on aarch64
for gcc > 6.2.1 && <= 7.0. (If you have an aarch64 system, you could try it)
I've just build and run tst-gcc-addoverflow.c (attached to the
gcc-bugzilla 98269) on x86_64 with
gcc version 6.5.0 20181026 (Ubuntu 6.5.0-2ubuntu1~18.04)
=> __builtin_add_overflow() SUCCEED
Florian Weimer added the usage of __builtin_add_overflow which fails
with gcc 6.5 on s390x. After reporting the issue, he said, that he did
not recognize the issue on other platforms. But I don't know which gcc
versions or platforms he has used for testing.
Thanks,
Stefan
prev parent reply other threads:[~2021-01-07 17:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201215141803.252050-1-stli@linux.ibm.com>
[not found] ` <861d7df6-f87f-0ff6-5eda-9269a14d48f9@linaro.org>
2020-12-18 7:40 ` FYI: s390x: Require GCC 7.1 or later to build glibc due to __builtin_add_overflow Stefan Liebler
2020-12-18 12:14 ` Bruno Haible
2020-12-18 16:55 ` Paul Eggert
2020-12-18 18:32 ` Bruno Haible
2020-12-18 21:23 ` Paul Eggert
2021-01-07 17:00 ` Stefan Liebler [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
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86017a48-d2f2-a5e4-ac65-060cdebd7521@linux.ibm.com \
--to=stli@linux.ibm.com \
--cc=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
--cc=eggert@cs.ucla.edu \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).