Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jan 2025 00:01:09 +0000
From:      Jessica Clarke <jrtc27@freebsd.org>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org>
Subject:   Re: git: c3450ad127e9 - main - clang: re-downgrade implicit int/function declarations to warning only
Message-ID:  <277132FC-870F-48C7-A874-210789C71BD2@freebsd.org>
In-Reply-To: <90D8C9F1-0634-44E5-B5B5-20455A91E042@FreeBSD.org>
References:  <202306222111.35MLBAqB066211@gitrepo.freebsd.org> <E1BA0D85-6246-4901-B7F4-B2062A54202A@freebsd.org> <90D8C9F1-0634-44E5-B5B5-20455A91E042@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28 Jan 2025, at 23:20, Dimitry Andric <dim@FreeBSD.org> wrote:

> On 28 Jan 2025, at 19:32, Jessica Clarke <jrtc27@freebsd.org> wrote:
>>=20
>> On 22 Jun 2023, at 22:11, Dimitry Andric <dim@FreeBSD.org> wrote:
>>=20
>>> The branch main has been updated by dim:
>>>=20
>>> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3Dc3450ad127e94d3fa67ae337310e59c0=
02f51bfc
>>>=20
>>> commit c3450ad127e94d3fa67ae337310e59c002f51bfc
>>> Author:     Dimitry Andric <dim@FreeBSD.org>
>>> AuthorDate: 2023-04-25 19:24:04 +0000
>>> Commit:     Dimitry Andric <dim@FreeBSD.org>
>>> CommitDate: 2023-06-22 18:22:33 +0000
>>>=20
>>>  clang: re-downgrade implicit int/function declarations to warning =
only
>>>=20
>>>  This reapplies upstream commit c0141f3c300f by Aaron Ballman:
>>>=20
>>>    Downgrade implicit int and implicit function declaration to =
warning only
>>>=20
>>>    The changes in Clang 15.0.0 which enabled these diagnostics as a
>>>    warning which defaulted to an error caused disruption for people
>>>    working on distributions such as Gentoo. There was an explicit =
request
>>>    to downgrade these to be warning-only in Clang 15.0.1 with the
>>>    expectation that Clang 16 will default the diagnostics to an =
error.
>>>=20
>>>    See
>>>    =
https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror=
-implicit-function-declaration/65213
>>>    for more details on the discussion.
>>>=20
>>>    See https://reviews.llvm.org/D133800 for the public review of =
these
>>>    changes.
>>>=20
>>>  As noted in the upstream discussion, there are many programs that =
fail
>>>  to configure or build correctly, if these warnings are turned into
>>>  errors by default.
>>>=20
>>>  Note that most affected programs in ports are relatively old, and =
are
>>>  unlikely to be fixed by actually adjusting their declarations, but =
by
>>>  compiling with -std=3Dgnu89, which downgrades the errors back to =
warning
>>>  again. Lots of tedious work for very little gain.
>>=20
>> This remains as a downstream divergence 1.5 years later, but I do not
>> think we should be carrying this indefinitely. Software needs to =
build
>> with upstream LLVM, and the fact that many ports do not is now biting
>> us for CheriBSD where we use our own external toolchain that does not
>> have such a diff. In my opinion this should be reverted for FreeBSD =
15
>> and it=E2=80=99s long time for ports people to step up or have the =
broken ports
>> removed; we can=E2=80=99t keep going on like this with abandonware =
holding back
>> forward progress.
>=20
> While I agree, at the least a full exp-run should be done, and even =
then
> you can't be entirely sure if ports that build are built the same as
> before, for example due to bad configure tests. So this is potentially =
a
> massive undertaking.

I=E2=80=99m aware of the problem. Red Hat put in a lot of engineering =
effort to
find and fix such bugs. GCC 14.1 makes it an error by default for C99
too. Clang 16 kept it as an error. FreeBSD is now an outlier in turning
this off, and non-obscure ports really should already be fixed if
they=E2=80=99re being kept up-to-date. I appreciate that there will be =
fallout,
but we can=E2=80=99t just do nothing because nobody in ports has stepped =
up in
the past 1.5 years to act on this. We need to commit to this happening
and then ports will have to deal with it. Otherwise another year will
go by and we=E2=80=99ll still be doing this.

Jess




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?277132FC-870F-48C7-A874-210789C71BD2>