bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50972: src/ls.c fails to build when __GNUC_PREREQ is not defined (e.


From: Pádraig Brady
Subject: bug#50972: src/ls.c fails to build when __GNUC_PREREQ is not defined (e.g., OpenBSD)
Date: Sun, 3 Oct 2021 12:38:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0

On 03/10/2021 03:07, Paul Eggert wrote:
On 10/2/21 7:44 AM, Brian Callahan wrote:
Once this fix is done, the rest of coreutils-9.0 builds and works OK.

Thanks for letting us know, as it's been a while since I tried building
coreutils on OpenBSD. I just now tried it on OpenBSD 6.9 and found some
other problems that were easy to lose sight of in the blizzard of false
alarms that clang emits on OpenBSD 6.9. I fixed all the problems I
noticed and installed the following patches into coreutils:

https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=4cfd48481da0486e2bad193495bc38e7d5ead7e4
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=b31a6a09ad0caddce29729f8c9bc4c36c073b7b6
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=5b43b8e9ce215864001314f92097584bceb71b58

These rely on the following OpenBSD-related patches to Gnulib, which I
installed earlier today:

https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=9bcd248da1ef25b3ff3431248f53401e1123d74f
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=dd0af10fa597a95ffe5f4f110ef5edefc2f680bc

The first patch listed above should fix the problem you mentioned; you
might want to look at the other patches as well.

By the way, how do you deal with all those false positives from clang?
Do you suppress them with CFLAGS? I'm referring to the many warnings
like "comparison is always true due to limited range of data type" and a
few "integer overflow in expression" warnings. With so many false alarms
I wouldn't be surprised if people stopped paying attention to compiler
warnings even if they're valid.

Thanks for doing all that.
I'm confused as to why some functions need _Noreturn and some don't.
For example why does cleanup_fatal() in csplit.c need it since it calls exit()?
Does GCC not propagate the noreturn from exit to cleanup_fatal()?

In general I see this may introduce warnings on older systems,
but that's fine as dev is generally done on newer compilers,
and non dev builds on older systems will not have -Werror set.

thanks,
Pádraig





reply via email to

[Prev in Thread] Current Thread [Next in Thread]