[continued from previous message]
Yeah, that works, and follows the current DPKG_*_ARCH_ABI lead for
example.
which dpkg-buildpackage could also setup internally via a new option,
say --arch-isa=amd64v3 or similar
--host-arch-isa would be more coherent I think.
Ah absolutely! For some reason had --arch in mind as a valid option
(I only see it now in dpkg-scanpackages :D, or maybe I was thinking
about --host-isa :).
I guess one could add support for --target-host-arch-isa to build a
toolchain that defaults to a particular ISA. But well.
Yes, the ISA support in dpkg should be extensive enough (so that if
this needs to be supported in the toolchain, then it is possible).
So to summarise, here are the generic changes that I think need to be made
to src:dpkg to support variant ISAs as a thing:
* add get_host_arch_isa() to Dpkg::Arch
Yes (perhaps as mentioned below also just get_host_isa()).
* dpkg-gencontrol records DEB_HOST_ARCH_ISA into DEBIAN/control as ArchitectureIsa
Probably better Architecture-Isa, otherwise the current automatic
case folding would make it end up as Architectureisa.
* dpkg-architecture emits DEB_HOST_ARCH_ISA and grows --host-arch-isa flag
Also DEB_BUILD_ARCH_ISA and DEB_TARGET_ARCH_ISA, and also grows a --target-arch-isa (but I'm thinking whether the shorter --host-isa would
be nicer, for example the --match-bits are not spelled --match-arch-bits,
which would seem also a bit redundant).
* dpkg-buildpackage passes --host-arch-isa to dpkg-architecture
Yes, but only when not the baseline.
* dpkg-genchanges should record the ISA in the changes file somehow I
guess?
Yes, also dpkg-genbuildinfo. This could be done either from the
envvars, or perhaps through the debian/files attributes support. But
given that this is supposedly build global (I think it would be rather
weird to end up with a .changes including say _amd64.deb and
_amd64v3.deb file references from the same build), then probably using
the envvar might be the better way.
* dpkg-deb records the ISA in the file name
Yes.
Have I missed anything?
Nothing else comes to mind right now (except what I might have already
added).
(Hmm does anything need to reject unknown values
found in DEB_HOST_ARCH_ISA / --host-arch-isa? Probably...)
I guess it indeed makes sense to define what ISAs are supported, and
either error out or warn and ignore such values. So there might be a
need to add something like a new data/isatable.
Conceptually slightly separately, it might make sense to add a build "feature" to Dpkg::Vendor::Debian to allow setting -march (and -mtune?)
Then when we want to add support to an ISA, we add a little thing to set_build_features (in either Vendor::Debian or Vendor::Ubuntu or wherever) that maps get_host_arch_isa() to values for the march-influencing feature.
Hmm, right, how to hook this. I'm not sure the current interface is good
enough to describe this via build flags features, because such new feature
area would expose arch-specific features. I have been thinking through
the build flags and will try to send a proposal/RFC to revamp parts of
it during the weekend. But I think the ISA stuff is better just handled
(at leas for now) directly by injecting whatever flags when the requested
ISA is different to the baseline.
Thanks,
Guillem
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)