Adding a MACHINE_ARCH note

Baptiste Daroussin bapt at freebsd.org
Wed Jul 10 19:55:53 UTC 2013


On Wed, Jul 10, 2013 at 12:26:42PM -0700, Adrian Chadd wrote:
> On 10 July 2013 09:55, Warner Losh <imp at bsdimp.com> wrote:
> 
> >> That's the reason I replied about it. Not specifically to make it
> >> happen _everywhere_, but to see if we're about to migrate to a tool
> >> that doesn't support it, making it a much bigger deal to migrate again
> >> later.
> >
> > I've been talking to Baptiste, and it will support this.
> 
> Sweet.
> 
> Thanks!
> 
> 
> -adrian

Yeah I need to get a simple and uniq way to gather the different ABI, I have
been creating my own ABI string to solve this, but I'm far from being a
specialist.

While thinking about this kind of thing, please please think about a format that
can easily give us a way to figure out a way to get cross ABI binaries support.

pkgng needs for example to allow i386 packages to be installed on amd64 because
amd64 does support it.

Maintaining a list the compatibility will be painful.

In my own version I have
os:version:family:class:...

for example here:
on FreeBSD 9 i386 we have:

freebsd:9:x86:32

on FreeBSD 10 amd64 we have:

freebsd:9:x86:64

now if I do want a package I can install on both amd64 and i386 I just have to
create a package saying:

freebsd:9:x86

or if I want a package that can be installed on all arches:

freebsd:9

It became complicated for arm and mips because of the multiple variation
available.

the problem with that is that I have to read the binary supported from the
binaries themselves which enforce me to get some magical numbers for every
arches (which was apparently wrong on arm, thanks Andrew for the fix) Having a
note with the direct MACHINE_ARCH will save us complicated code and potential
failures with magic numbers. and would be more reliable that getting from
uname(3).

Just tell me where I can get the right string and how can I check the compatible
ABI and pkgng will switch to it. I would have love this to happen a year and a
half before that would have saved me from having to prepare a migration path,
but better late that never :)

regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20130710/b69d9359/attachment.sig>


More information about the freebsd-arch mailing list