Re: Future of 32-bit platforms (including i386) [armv7 specific note]

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.architechture
Message-ID <[email protected]>
Brooks Davis <brooks_at_freebsd.org> wrote on
Date: Thu, 25 May 2023 17:48:28 UTC :

> On Wed, May 24, 2023 at 07:55:15AM -0700, Mark Millard wrote:
> > John Baldwin <jhb_at_FreeBSD.org> wrote on
> > Date: Tue, 23 May 2023 23:46:51 UTC :
> > 
> > . . .
> > 
> > (Prompted by manu's
> > https://lists.freebsd.org/archives/freebsd-arch/2023-May/000454.html .)
> > 
> > I'll note that armv7 does not now have lib32 support
> > for aarch64's that support EL0 AArch32. That would be
> > a development effort.
> > 
> > armv7 can be used via the likes of chrooting into a
> > armv7 world's directory tree for such aarch64's. That
> > is what I do on aarch64 for armv7.
> > 
> > > One question for this is if we think we will have sufficient developer
> > > resources to maintain armv7 kernels for the life of stable/15.
> > 
> > Sufficient developer support to get lib32 supporting
> > armv7 in place and keep it operational?
> 
> It's not too hard (but I did make it harder by requiring that lib32 be
> build via -m32 on an aarch64 sysroot.) Someone would need to get -m32
> working well enough to meet the needs of lib32. I'd suggest looking
> for i386 ifdefs in the x86 and amd64 trees as a start.

Just about -m32 . . .

share/mk/src.opts.mk has long had:

# aarch64 needs arm for -m32 support.
.elif ${__T} == "aarch64" && ${__llt:Marm*} != ""
__DEFAULT_DEPENDENT_OPTIONS+=   LLVM_TARGET_ARM/LLVM_TARGET_AARCH64

that, if I understood right, meant that aarch64 also had
arm targeting enabled by default and such was sufficient
for -m32 to be used.

This was put in place in the 2018-Jun-27 commit described
by:

QUOTE
LLVM_TARGET_ALL: Default LLVM_TARGET_ARM on for aarch64.
This is needed for -m32 support which is used in the kernel cloudabi32 module. Tweak the style to make it easier to understand. 
END QUOTE

So it seems that -m32 had been already in use in some
way.

May be this is not about -m32 itself but about having
more FreeBSD code able to handle -m32 being enabled?
If so, a bunch of commits from 2022-Jun-13 that are
titled like "amd64: -m32 support for machine/..."
might be some of the "x86 and amd64 trees" that you
are referencing?


> Ideally we'd also integrate tests so things didn't rot. I had tests for
> libcompat libraries working in CheriBSD at one point, I'm not entirely
> sure what the state is at the moment, but it wasn't too hard and could
> be resurrected if it's rotted.
> 
> This is one of those things where people need to show up and do the work
> or they have voted with their feet that armv7 isn't important. This
> stuff isn't super hard.

But there may not be many for which much of what is
needed is already familiar material.

===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.