[Rpm-maint] Multiple ABI architectures (parallel installation, detection, handling)

Dennis Gilmore dennis at ausil.us
Fri Oct 21 19:00:56 UTC 2011

Hash: SHA1

On Sat, 17 Sep 2011 16:02:52 +0300
Panu Matilainen <pmatilai at laiskiainen.org> wrote:

> On 09/16/2011 04:58 PM, Dennis Gilmore wrote:
> > On Friday, September 16, 2011 04:46:33 AM Panu Matilainen wrote:
> >> Oh I knew this would happen... the send-button is a magic
> >> memory-enhancer in disguise. One (of probably many) forgotten
> >> bits, this
> >>
> >> time hopefully with working address for Dennish too:
> >>> On 09/15/2011 01:55 PM, Jon Masters wrote:
> >>>> All of the existing stuff assumes that if we have vfpv3 on ARMv7
> >>>> we're going to be running in hardfp. We can keep that notion
> >>>> around in the very short term, but we need a longer term
> >>>> solution. And although we don't necessarily plan actual parallel
> >>>> installs of different ABIs, it is not technically the case that
> >>>> all ARMv7 systems are going to be running the hardfp port. We
> >>>> may e.g. install an ARMv5 port therein.
> >>
> >>    From what I've heard + read about the hardfp ABI, its not
> >> actually possible to parallel-install with anything else because
> >> even the dynamic linker has no clue whether hardfp or some other
> >> ABI was used (see
> >> http://wiki.debian.org/ArmHardFloatPort/VfpComparison, cheers to
> >> our friends over Debian side again for a nice article :) Which
> >> makes this a truly<cough>  "unique"<cough>  piece of work. I'd
> >> love to know why it was done that way - my layman sense thinks the
> >> compiler toolchain should be able to mark the ABI in the elf
> >> headers (heck this is what the whole hwcap thing is about).
> >> >
> > _______________________________________________
> > Rpm-maint mailing list
> > Rpm-maint at lists.rpm.org
> > http://lists.rpm.org/mailman/listinfo/rpm-maint
> _______________________________________________
> Rpm-maint mailing list
> Rpm-maint at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-maint
> >
> >> Since the ABI difference is apparently not recorded anywhere,
> >> there's little chance of rpm being able to automatically do the
> >> right thing really, and I dunno if its worth it trying to jump
> >> through a whole lot of hoops for what seems an unachievable task.
> >>
> >> One simple brute-force "solution" that should work right now is to
> >> just keep the softfp/hardfp "architectures" incompatible from rpm
> >> POV and make the assumption that hardfp ABI will be used if the
> >> system is capable of it. And if somebody wants to override this
> >> assumption, that's what /etc/rpm/platform is for (allow overriding
> >> rpm's hw detection).
> >
> > im not the biggest fan of this,  Maybe we can hard code it somehow
> > at compilation time?
> Care to elaborate why would you want to hardcode it instead of just 
> utilizing an existing method for special-case override, which is what
> we have here?
> > as well as extend rpm-python to be able to expose it so yum
> > can do the right thing.
> The arch used by rpm (whether detected or overridden) is available in 
> %{_host_cpu} macro. If something else is needed then I need to know
> what that would be.

its not sufficient. it evaluates to armv7l on a hardware floating point
system. we would need it to be armv7hl or armv7hnl to give yum the info
it needs

> > we have no plans to support multi-arch here, and
> > anaconda (which we dont have yet but is underway) doesnt write out a
> > /etc/rpm/platform file any longer. ive not looked to see if that
> > code is removed from anaconda or just disabled.  our plan is if you
> > install a softfloat on the system thats all you can run.  and same
> > for hardfloat.  while the buildsystem will have v7 builders that
> > are building for v5 and therfore running softfp, most people should
> > be running the hardfp port since its in the order of 300% faster
> > for floating point operations. the only common case of softfp use i
> > see on v7 hardware is those already running it.
> Anaconda stopped writing /etc/rpm/platform for "a few crazy 
> architectures" when it no longer needed to do so, no reason why it 
> couldn't do so again. Whether thats the best option or not I dunno.
> If there's a way (define or such) that can be used to detect which
> ABI we're compiling for then sure ifdef'ing the entire hardfp
> detection out is one option. Another option might be just ship with a
> hardwired /etc/rpm/platform for softfp arch version of rpm.
> >
> > Ill revise my patch to use hwcaps rather than reading /proc/cpuinfo
> > id really like to wrap the code path around something define or
> > something set when we build for armv7hl
> No need to revise the patch, what you currently have works for now
> and there's not much of a benefit for doing it just for ARM. If/when
> the whole detection is changed to use AT_PLATFORM/AT_HWCAP it'll go 
> naturally along with that.
> FWIW the auxiliary vector has issues of its own: to reliably access
> it from a library requires reading /proc/self/auxv, and there we have
> that /proc dependency again.
> >
> >> Of course the entire hw-detection and arch-compatibility system is
> >> seriously outdated and inadequate for todays needs, back in the
> >> nineties systems were a lot less schizophrenic :) I've various
> >> vagueish ideas in this area, but the current concept of "arch" is
> >> built so deep into tools around rpm that fundamentally changing it
> >> is likely to be a long and hard road.
> > rather than having yum do its own arch detection it should be able
> > to grab it from rpm that way both tools use the same code path and
> > will always give the same result.
> >
> >
> > We also have an issue where we are setting the isa to the<arch>-32
> > we really should use arm-32 and armhfp-32 or armhf-32  that way the
> > sub arches  can be used correctly.  some packages especially in the
> > softfloat port could do with having additional arches built. pixman
> > for example could do with armv6l and armv7l builds on softfp.
> If multiarch setup isn't in the plans, %{_isa} shouldn't matter a
> whole lot. The softfp and hardfp packages would live in separate
> repositories anyway, right? But maybe I'm missing something... if it
> needs a different %{_isa} then it does.

multilib  is not in the plans. but it is entirely possbile to build
some packages optimised for another arch. while is less likely for the
software floating point abi port  its quite probable that we end up
with some neon optimised versions of some packages. so we will use
armv7hl and armv7hnl on the same system, so we should set isa to be the
same on compatiable sub-arches.

> > yum has its basearch variable that it uses which currently is arm
> > for all arm arches but should be armhfp for the new abi,  I do
> > think that the best way to deal with the new abi is to treat it as
> > a new seperate arch.  not sure if thats true of the new x86 abi.
> >
> > Dennis
> >

Version: GnuPG v2.0.18 (GNU/Linux)


More information about the Rpm-maint mailing list