[continued from previous message]
would configure gcc with --with-arch64=x86-64-v3 and then dpkg-architecture would parse the output of gcc -Q --help=target to set DEB_HOST_ARCH_VARIANT appropriately? (modulo mistakes in details) Or do you mean something else entirely?
Some of the above problems could perhaps be avoided if we introduced
a concept of architecture aliases/ISAs (similar to what rpm has), which
would side-step the pool sharing issue, the binary package renaming,
etc. One big issue with this is that it requires for dpkg to have an exhaustive table of all such aliases, and if there's ever a new alias
added, old dpkg versions need to be updated or they will not understand
what they match with. So this does not seem ideal either. So I guess this
is a variation over your proposal, but perhaps this could still be used
in specific contexts, say only at build-time (but not for dependency relationships), for repo management (say binary-arm64v9/Packages.xz),
or binary package names where the field would specify the actual name
for the filename, say:
Architecture: arm64
ArchitectureIsa: arm64v9
or maybe better:
Architecture: arm64
ArchitectureIsa: v9
resulting in dpkg-deb generating:
binpkg_1.0-1_arm64v9.deb
but targeting arm64.
I'm not sure but I think you have talked yourself into suggesting something very similar to my proposal here?
I also think I prefer naming this explicitly as ISA
variants, if you will, than just architecture variants as that gives
way too much room
Certainly I think all the interesting use cases are basically changing the
set of instructions emitted by the toolchains by default. I suppose you
could have a variant that changed the set of hardening flags or something
but that doesn't seem an especially good idea. So I guess I'd be happy with s/ArchitectureVariant/ArchitectureISA/ everywhere.
(which perhaps we want, but then that has other
implications over compatibility), and for the field perhaps just Isa is better, to avoid the implicit repetition of ArchitectureInstructionSetArchitecture :), but that makes it less easy
to associate both as related.
In the end though, I think there are perhaps bigger constraints from
the infra side of things than the package tooling, stuff like archive management software, or binary transition migration and similar.
I think I managed to convince myself that most things like britney and ben
can and should treat each variant/ISA as a separate architecture. It
depends a bit how publication is done in the case where not all packages
are built for all ISAs but not in very interesting ways I think. And my intention is to start with amd64v3 and build everything for this ISA (as we have heaps of builder capacity on amd64 in Ubuntu) and sidestep worrying
about that for a little while.
In terms of building consensus around this design, I thought it makes
sense
to start at the bottom of the stack and so here I am on this mailing list :-) I guess in due course this could become a DEP, and would certainly
need
to be discussed on debian-devel before getting too far.
I'm not sure there's ever been much of a wide interest in something
like this in Debian TBH. Due to deployment and increased infra
overhead at least?
Yes that's fair. And as I said somewhere, I myself am not proposing to
support any additional ISAs in Debian at this time.
What do you think? Have I missed any glaring implications?
No, I think the overall picture is about right, and captures most of the things we have discussed at various times and places in the past. :)
I am very happy to read this!
Is there a better way of doing this?
I think starting from 5, the rest are probably just details to hammer
out, but not insurmountable things.
Great. The things I see as a bit vague at a base level currently are:
* Should the ISA influence the toolchain via toolchain defaults or dpkg-buildflags?
* How is the default ISA for a buildd chroot selected?
There is also the question of whether partial coverage of an ISA is handled
by the package publisher or client side in apt but that's at least one
level higher.
Cheers,
mwh
<div dir="ltr"><div dir="ltr">On Wed, 6 Sept 2023 at 21:27, Guillem Jover <<a href="mailto:
[email protected]" target="_blank">
[email protected]</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br></blockquote><div><br></div><div>Hi!</div><div><br></div><div>Thanks for the considered response. And sorry for the very slow reply.</div><div> </div><blockquote class="gmail_
quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Fri, 2023-09-01 at 08:43:55 +1200, Michael Hudson-Doyle wrote:<br>
> Recently the topic of exploiting newer instructions without dropping<br> > support for older machines has come up several times inside Ubuntu<br> > engineering. I understand this topic has come up several times in the past<br>
> for Debian as well, but nothing has really come of it to date.<br>
I also had a chat about this with Matthias Klose (CCed) around 2022-05.<br>
> I've spent a while thinking through the options and coming up with a design<br>
> and wrote some notes into a wiki page:<br>
> <a href="
https://wiki.debian.org/ArchitectureVariants" rel="noreferrer" target="_blank">
https://wiki.debian.org/ArchitectureVariants</a><br>
I think we are already doing 1, 2 and 3. I agree 4 is just wrong. And<br> something like 5 is what I suggested to Matthias for Ubuntu when we<br>
last discussed it as the best way to go about this.<br></blockquote><div><br></div><div>OK, glad we agree to this point.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:
1ex">
I'm not sure I entirely agree with the requirements you set forth<br> though:<br>
- I think such optimized builds might need to be done with "special<br> toolchains" (these could simply be wrappers over the host compiler<br>
passing the appropriate flags via command-line or via specs or<br>
similar, not necessarily full blown toolchains), passing these via<br>
something like dpkg-buildflags seems currently unreliable, as I don't<br>
think we have full coverage in packages (neither for all compilers<br>
available)? Although it would be better as it would centralize the<br>
management. (For reference this is in part how rpm handles this:<br>
[continued in next message]
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)