[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: remaining tasks before Autoconf release
From: |
Bruno Haible |
Subject: |
Re: remaining tasks before Autoconf release |
Date: |
Fri, 12 May 2023 14:32:34 +0200 |
Paul Eggert wrote:
> > 3) The hint
> >
> > Did you mean to build a 64-bit binary? (E.g.,
> > 'CC="gcc -m64"'.)
> >
> > should not occur on a 32-bit OS. It should only occur on bi-arch systems
> > (64-bit OS, 32-bit $CC).
>
> If we could come up with a reliable way to distinguish between the two,
> I suppose we could use the abovementioned message on bi-arch platforms
> and some other message (e.g., "Wouldn't it be better to build for a
> platform that won't stop working in 2038?") on 32-bit time_t only
> platforms.
The code in lib/autoconf/specific.m4 already makes this distinction,
and I think it is reliable:
* The test in AC_SYS_YEAR2038 (specific.m4 lines 211..219) detects
a bi-arch system in which a 64-bit binary is year-2038-safe
whereas a 32-bit binary is not.
This is exactly the case in which the suggestion "Did you mean
to build a 64-bit binary?" makes sense.
* In the other cases
- 32-bit OS, or
- bi-arch system in which neither a 32-bit nor a 64-bit binary are
year-2038-safe,
AC_SYS_YEAR2038_RECOMMENDED (specific.m4 lines 228..233) the
suggestion "Did you mean to build a 64-bit binary?" is pointless.
Due to the AC_REQUIRE in line 227, the AC_SYS_YEAR2038 test is always
executed before the AC_SYS_YEAR2038_RECOMMENDED test.
> > - Did you mean to build a 64-bit binary? (E.g., 'CC="${CC} -m64"'.)
>
> Doesn't removing this line suppress the suggestion even for bi-arch
> systems where the suggestion is useful? That seems like a step backwards.
No. As you can see, either from the specific.m4 code or from the testing
that I reported, there are two AC_MSG_FAILURE invocations. Removing this
line from the invocation in AC_SYS_YEAR2038_RECOMMENDED does not remove it
from the invocation in AC_SYS_YEAR2038.
So, I continue to suggest applying the patch from
https://lists.gnu.org/archive/html/autoconf/2023-05/msg00002.html .
Bruno