[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: |
Paul Eggert |
Subject: |
bug#50972: src/ls.c fails to build when __GNUC_PREREQ is not defined (e.g., OpenBSD) |
Date: |
Sat, 2 Oct 2021 19:07:04 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
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.