Re: git: 783c318fd118 - main - zoneinfo: On amd64, include 32-bit data.
Date: Wed, 25 Jan 2023 16:05:54 UTC
On 25 Jan 2023, at 15:55, Dag-Erling Smørgrav <des@FreeBSD.org> wrote:
>
> The branch main has been updated by des:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=783c318fd1181d46554c31a5039db10e7f5eef49
>
> commit 783c318fd1181d46554c31a5039db10e7f5eef49
> Author: Dag-Erling Smørgrav <des@FreeBSD.org>
> AuthorDate: 2023-01-25 15:54:52 +0000
> Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
> CommitDate: 2023-01-25 15:54:52 +0000
>
> zoneinfo: On amd64, include 32-bit data.
>
> While there, drop the unnecessary posixrules option.
I’m not sure how this makes sense. Isn’t the file format entirely MI?
There’s nothing in zic that knows what TARGET_ARCH is when building the
bootstrap tool, the only thing it could possibly look at is
MACHINE_ARCH for the bootstrap tool, but that would tell you about the
build machine not the target machine. So why does cross-compiling i386
on amd64 work but lib32 from a native amd64 build doesn’t?
Jess
> Sponsored by: Klara, Inc.
> Reviewed by: imp, allanjude
> Differential Revision: https://reviews.freebsd.org/D38142
> ---
> share/zoneinfo/Makefile | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile
> index dfe148544bd6..cffd12cc5e9a 100644
> --- a/share/zoneinfo/Makefile
> +++ b/share/zoneinfo/Makefile
> @@ -51,7 +51,6 @@ LEAPFILE=
> TZFILES= africa antarctica asia australasia etcetera europe \
> factory northamerica southamerica
> TZFILES+= backward
> -POSIXRULES= America/New_York
>
> TZFILES:= ${TZFILES:S/^/${CONTRIBDIR}/}
>
> @@ -78,11 +77,17 @@ all: zoneinfo
> .endif
> META_TARGETS+= zoneinfo install-zoneinfo
>
> +# On amd64, include 32-bit data for compatibility with statically-linked
> +# i386 binaries which still use a 32-bit time_t.
> +.if ${MACHINE_ARCH} == "amd64"
> +ZICFLAGS+= -b fat
> +.endif
> +
> zoneinfo: ${TDATA}
> mkdir -p ${TZBUILDDIR}
> cd ${TZBUILDDIR}; mkdir -p ${TZBUILDSUBDIRS}
> umask 022; cd ${.CURDIR}; \
> - zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
> + zic -D -d ${TZBUILDDIR} ${ZICFLAGS} -m ${NOBINMODE} \
> ${LEAPFILE} ${TZFILES}
>
> #