Date: Sun, 3 May 2026 12:31:50 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Jessica Clarke <jrtc27@freebsd.org> Cc: "Stephen J. Kiernan" <stevek@freebsd.org>, "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: 01674e15dedb - main - bsd.endian.mk: Optimize the handling of big/little endian determination. Message-ID: <CAJ-Vmo=A0s0XXvkmRziUT8Sn9KzOHsK_ZH7Ldyr4ZHitnO3tvQ@mail.gmail.com> In-Reply-To: <6C5FEC1A-D8E1-45B8-A80A-B32F81392058@freebsd.org> References: <69f6b1ec.181e8.27d0b938@gitrepo.freebsd.org> <6C5FEC1A-D8E1-45B8-A80A-B32F81392058@freebsd.org>
index | next in thread | previous in thread | raw e-mail
I just hit this too. can we revert the diff for now until we figure out why it breaks ports building at least? -a On Sun, 3 May 2026 at 11:49, Jessica Clarke <jrtc27@freebsd.org> wrote: > > On 3 May 2026, at 03:24, Stephen J. Kiernan <stevek@freebsd.org> wrote: > > > > The branch main has been updated by stevek: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=01674e15dedb15f8ce498af0680c50bb075c5482 > > > > commit 01674e15dedb15f8ce498af0680c50bb075c5482 > > Author: Stephen J. Kiernan <stevek@FreeBSD.org> > > AuthorDate: 2024-04-03 23:25:19 +0000 > > Commit: Stephen J. Kiernan <stevek@FreeBSD.org> > > CommitDate: 2026-05-03 02:21:56 +0000 > > > > bsd.endian.mk: Optimize the handling of big/little endian determination. > > > > Add variables to contain lists of MACHINE_ARCH values to use > > to determine little or big endian. > > > > Only error out about not being able to determine endianess if > > TARGET_ENDIANNESS is empty and not cross-compiling. > > > > Reviewed by: sjg > > Obtained from: Hewlett Packard Enterprise Development LP > > Differential Revision: https://reviews.freebsd.org/D44629 > > --- > > share/mk/bsd.endian.mk | 39 +++++++++++++++++++++++++++++---------- > > 1 file changed, 29 insertions(+), 10 deletions(-) > > > > diff --git a/share/mk/bsd.endian.mk b/share/mk/bsd.endian.mk > > index 0c5ebb7aeba2..2a617a1d2794 100644 > > --- a/share/mk/bsd.endian.mk > > +++ b/share/mk/bsd.endian.mk > > @@ -1,20 +1,35 @@ > > > > -.if ${MACHINE_CPUARCH} == "aarch64" || \ > > - ${MACHINE_CPUARCH} == "arm" || \ > > - ${MACHINE_ARCH} == "amd64" || \ > > - ${MACHINE_ARCH} == "i386" || \ > > - ${MACHINE_ARCH} == "powerpc64le" || \ > > - ${MACHINE_CPUARCH} == "riscv" > > Losing MACHINE_CPUARCH makes me sad as a downstream that adds new > MACHINE_ARCH for aarch64 and riscv. For riscv at least it’s now riscv* > which I guess is close enough, but for aarch64 it’s not wildcarded. > Similarly arm though I don’t care about that personally. > > > +MACHINE_ARCH_LIST.little = \ > > + aarch64 \ > > + amd64 \ > > + armv7 \ > > + i386 \ > > + powerpc64le \ > > + riscv* > > + > > +MACHINE_ARCH_LIST.big = \ > > + powerpc \ > > + powerpc64 > > + > > +.for e in big little > > +N_$e:= ${MACHINE_ARCH_LIST.$e:${M_ListToSkip}} > > Should we be worried about catching MACHINE(_ARCH) being empty? > > Jessica > > > +.endfor > > + > > +# For the host, we need to look at the host architecture > > +.if ${MACHINE:Nhost*} == "" > > +_ENDIAN_ARCH=${_HOST_ARCH} > > +.else > > +_ENDIAN_ARCH=${MACHINE_ARCH} > > +.endif > > + > > +.if ${_ENDIAN_ARCH:${N_little}} == "" > > TARGET_ENDIANNESS= 1234 > > CAP_MKDB_ENDIAN= -l > > LOCALEDEF_ENDIAN= -l > > -.elif ${MACHINE_ARCH} == "powerpc" || \ > > - ${MACHINE_ARCH} == "powerpc64" > > +.elif ${_ENDIAN_ARCH:${N_big}} == "" > > TARGET_ENDIANNESS= 4321 > > CAP_MKDB_ENDIAN= -b > > LOCALEDEF_ENDIAN= -b > > -.elif ${.MAKE.OS} == "FreeBSD" > > -.error Don't know the endian of this architecture > > .else > > # > > # During bootstrapping on !FreeBSD OSes, we need to define some value. Short of > > @@ -33,3 +48,7 @@ TARGET_ENDIANNESS= 1234 > > CAP_MKDB_ENDIAN= -B # Poisoned value, invalid flags for both cap_mkdb > > LOCALEDEF_ENDIAN= -B # and localedef. > > .endif > > + > > +.if empty(TARGET_ENDIANNESS) && ${.MAKE.OS} == "FreeBSD" > > +.error Don't know the endianness of this architecture > > +.endif > > > >home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=A0s0XXvkmRziUT8Sn9KzOHsK_ZH7Ldyr4ZHitnO3tvQ>
