Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Aug 2020 22:29:03 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Brooks Davis <brooks@freebsd.org>
Cc:        Brandon Bergren <bdragon@freebsd.org>, src-committers <src-committers@freebsd.org>,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r364781 - in head/sys: conf modules/zfs
Message-ID:  <CANCZdfqrQ-RHh=u-K-CGmdjhC3u0ctY2T1Wk03525tWewU0TvA@mail.gmail.com>
In-Reply-To: <20200825201736.GC43898@spindle.one-eyed-alien.net>
References:  <202008251904.07PJ4srL068863@repo.freebsd.org> <20200825201736.GC43898@spindle.one-eyed-alien.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Got diffs?

Warner

On Tue, Aug 25, 2020, 2:17 PM Brooks Davis <brooks@freebsd.org> wrote:

> On Tue, Aug 25, 2020 at 07:04:54PM +0000, Brandon Bergren wrote:
> > Author: bdragon
> > Date: Tue Aug 25 19:04:54 2020
> > New Revision: 364781
> > URL: https://svnweb.freebsd.org/changeset/base/364781
> >
> > Log:
> >   [PowerPC] More preemptive powerpcspe ZFS build fixes
> >
> >   I went through the merge and found the rest of the instances where
> >   ${MACHINE_ARCH} == "powerpc" was being used to detect 32-bit and
> adjusted
> >   the rest of the instances to also check for powerpcspe.
> >
> >   mips32* will probably want to do the same.
> >
> >   Sponsored by:       Tag1 Consulting, Inc.
> >
> > Modified:
> >   head/sys/conf/kern.pre.mk
> >   head/sys/modules/zfs/Makefile
> >
> > Modified: head/sys/conf/kern.pre.mk
> >
> ==============================================================================
> > --- head/sys/conf/kern.pre.mk Tue Aug 25 18:54:10 2020        (r364780)
> > +++ head/sys/conf/kern.pre.mk Tue Aug 25 19:04:54 2020        (r364781)
> > @@ -257,7 +257,7 @@ ZFS_CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64
> -DHAVE_
> >  .endif
> >
> >  .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
> > -     ${MACHINE_ARCH} == "arm"
> > +     ${MACHINE_ARCH} == "powerpcspe" || ${MACHINE_ARCH} == "arm"
> >  ZFS_CFLAGS+= -DBITS_PER_LONG=32
> >  .else
> >  ZFS_CFLAGS+= -DBITS_PER_LONG=64
>
> In CheriBSD we've added a MACHINE_ABI variable that could be used to
> simplify this mess of checks.
>
>
> https://github.com/CTSRD-CHERI/cheribsd/blob/5ee735e5f8ef7268731359a2d8a9a8218df2d23f/share/mk/bsd.cpu.mk#L478
>
> As currently implemented you'd use:
>
> .if ${MACHINE_ABI:Mptr64}
>
> There's be a argument for adding long32 and long64 for to avoid
> conflating long and pointer size.
>
> -- Brooks
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqrQ-RHh=u-K-CGmdjhC3u0ctY2T1Wk03525tWewU0TvA>