[continued from previous message]
so that when adding a new arch, for example you can specify whether<br>
that arch is runnable, which could help dpkg decide whether to allow<br>
by default to install M-A:foreign packages.<br></blockquote><div><br></div><div>Ah. Would this be a change to /var/lib/dpkg/arch or an additional file or ...?</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 guess this is similar, so such future interface should probably take<br>
this into account as something to support too. Will check where this<br>
is tracked and add a note to it.<br></blockquote><div><br></div><div>Did you find this place? :)</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">
And of course that is fine as a guardrail, but if a user hit that out<br>
of running a frontend, then that would already be too late, which to<br>
me means that frontends need to be aware of this too (and not pass<br>
packages that dpkg would/could/might refuse to install), when deciding<br>
what to pass to dpkg.<br></blockquote><div><br></div><div>Good 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">
But in any case, as you say, this currently would not be worse than<br> configuring a foreign arch, installing some foreign package and trying<br>
to run it, but it might make it potentially more common. And as<br>
mentioned above the effecting layer this needs to be decided up seems<br> higher anyway (even if dpkg could provide the infra for it).<br>
> > If the only change in the package filename format is in the <arch> part<br>
> > where we'd use a name which would otherwise be valid as an arch name (so,<br>
> > no weird symbols, or «-» separators that are not intended to split <os><br>
> > and <cpu> or similar), then using a name for the variant/ISA would be<br>
> > fine.<br>
> Right. I think that (when possible pretending e.g. "amd64v3" is a distinct<br>
> architecture will generally make things easier. E.g. I think britney<br> > wouldn't need to know about the relationship between "amd64" and "amd64v3".<br>
I guess that depends on whether the intention is to create a full<br>
optimized archive, or just a partial overlay one. In the latter case<br>
then it might need to know to be able to satisfy dependencies.<br></blockquote><div><br></div><div>Maybe! Depends on details I think.</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">
> > That would be one solution yes, which could give automatic bijective<br>
> > mappings, although ideally with a machine-readable way to get at it,<br>
> > which I'm not sure we have currently.<br>
> I think "gcc -Q --help=target | grep -e '^\s*-march'" is about as machine<br>
> readable as it gets currently, for better or worse (mostly worse).<br>
That does not look very satisfactory, though. </blockquote><div><br></div><div>Agreed!</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">And llvm/clang does not
support it. :/<br></blockquote><div><br></div><div>Ah I did not know that.</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">
> > For example code in dpkg-dev<br>
> > already runs «$CC -dumpmachine» to infer the host architecture to use<br>
> > during builds.<br>
> ><br>
> > While using a triplet variation could be a way to do that, that would<br>
> > require such triplet support for each variant/ISA, which tends to be<br>
> > very painful to introduce if it's not there already, so I'd not<br>
> > consider this specific way a viable option.<br>
> <br>
> I admit I'm not an expert on triplet intricacies but I think a new triplet<br>
> is not appropriate here (a bit like a new Debian architecture for a<br> > variant/ISA choice is not the right concept).<br>
We have i386 or arm (?) as (bad IMO) examples where the triplet can<br>
define the arch baseline. The problem is that this requires updating<br>
the GNU config.git upstream, and then getting that to trickle down into<br> every package that might be using autotools and not using autoreconf<br>
at build time, or to even update triplet matches in configure scripts<br>
and similar, which might be "acceptable" for a new arch, but seems<br>
disproportionate for a new ISA, so yes, as mentioned I agree it's not<br> viable.<br></blockquote><div><br></div><div>OK. Let's stop worrying about that then :)</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 Thu, 2023-09-21 at 14:43:42 +1200, Michael Hudson-Doyle wrote:<br> > > > * Should the ISA influence the toolchain via toolchain defaults or<br>
> > > dpkg-buildflags?<br>
> > > * How is the default ISA for a buildd chroot selected?<br>
> ><br>
> > So the clear downsides of either modifying the default toolchain or<br>
> > having to provide an additional one is that this seems pretty heavy<br>
> > weight. Also because people might want to build optimized variants<br>
> > locally w/o having to mess with their already existing toolchains.<br>
> > (I'm not sure whether something going along the lines of<br>
> > <<a href="
https://git.hadrons.org/cgit/debian/fakecross.git" rel="noreferrer" target="_blank">
https://git.hadrons.org/cgit/debian/fakecross.git</a>> could be an<br>
> > option, although as mentioned above, if that would imply new triplets,<br>
> > then probably not.)<br>
> ><br>
> > So the easiest way might indeed be by controlling this via an envvar,<br>
> <br>
> DEB_HOST_ARCH_ISA?<br>
Yeah, that works, and follows the current DPKG_*_ARCH_ABI lead for<br> example.<br>
> > which dpkg-buildpackage could also setup internally via a new option,<br>
> > say --arch-isa=amd64v3 or similar<br>
> --host-arch-isa would be more coherent I think.<br>
Ah absolutely! For some reason had --arch in mind as a valid option<br>
(I only see it now in dpkg-scanpackages :D, or maybe I was thinking<br>
about --host-isa :).<br>
> I guess one could add support for --target-host-arch-isa to build a<br> > toolchain that defaults to a particular ISA. But well.<br>
Yes, the ISA support in dpkg should be extensive enough (so that if<br>
this needs to be supported in the toolchain, then it is possible).<br>
> So to summarise, here are the generic changes that I think need to be made<br>
> to src:dpkg to support variant ISAs as a thing:<br>
> <br>
> * add get_host_arch_isa() to Dpkg::Arch<br>
Yes (perhaps as mentioned below also just get_host_isa()).<br>
> * dpkg-gencontrol records DEB_HOST_ARCH_ISA into DEBIAN/control as<br> > ArchitectureIsa<br>
[continued in next message]
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)