Date: Tue, 20 Mar 2012 12:20:08 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Baptiste Daroussin <bapt@freebsd.org> Cc: current@freebsd.org Subject: Re: ABI/architecture identification for packages Message-ID: <20120320102008.GH2358@deviant.kiev.zoral.com.ua> In-Reply-To: <20120320091935.GF1692@azathoth.lan> References: <20120319213508.GA1692@azathoth.lan> <20120320091935.GF1692@azathoth.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
--OpLPJvDmhXTZE4Lg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 20, 2012 at 10:19:36AM +0100, Baptiste Daroussin wrote: > On Mon, Mar 19, 2012 at 10:35:08PM +0100, Baptiste Daroussin wrote: > > Hi all, > >=20 > > In order to identify architectures I need to find a uniq id for every > > possibilities (for pkgng) > >=20 > > here is the identification I propose: > >=20 > > arch-class-os-majorversion(-archi_specific_extension) > >=20 > > arch can be one of the following: > >=20 > > - x86 for i386 and amd64 (discussed with kib) > > - powerpc for powerpc and powerpc64 > > - arm > > - mips > > - sparc > >=20 > > class may be: > > - 32 bits > > - 64 bits > >=20 > > os will always be freebsd :) (lower case) > >=20 > > majorversion the freebsd major version (10 9 8) > >=20 > > achi_specific_extension currently only mips and arm are concerned, > > for arm could be: > > el_oabi > > eb_oabi > > el_eabi > > eb_eabi > >=20 > > (I don't know how to get arm version or hardfp/softfp from the elf) > >=20 > > for mips I don't know much. > >=20 > > for ia64, I have strictly no idea what I should set. > >=20 > > Everything is read from the elf file > >=20 > > for example: > > x86-64-freebsd-10 > > x86-32-freebsd-8 > > arm-32-freebsd-10-el_oabi > >=20 > > Please help me to improve this to get the better identification to have= the best > > possible to determine which package can be installed where. > >=20 > > while proposing information please tell me how to get the information > > (dynamically) > >=20 > > regards, > > Bapt >=20 > Another question (by rwatson) that comes here is should we keep the archi= tecture > names that freebsd uses to avoid confusion or should we try to use more a= ccurate > names? >=20 > powerpc-64-freebsd-9 -> powerpc64-64-freebsd-9 > x86-32-freebsd-9 -> i386-32-freebsd-9 > x86-64-freebsd-9 -> amd64-64-freebsd-9 i386-32 and amd64-64 is weird and confusing. IMO, you should go either with x86-{32,64} names, or with i386/amd64, not with a mix. > etc. >=20 > An example of implementation can be find here: > https://github.com/pkgng/pkgng/blob/master/libpkg/pkg_elf.c#L157 >=20 > PS: Feel free to submit fixes/improvements to the code :) >=20 > regards, > Bapt --OpLPJvDmhXTZE4Lg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9oWdgACgkQC3+MBN1Mb4jNYwCeM9Ix5uOwe5Gzm9N4A9ahb/oT HokAoLiou5Eh5eTj6r4uW73rIx2ajs4p =nE1a -----END PGP SIGNATURE----- --OpLPJvDmhXTZE4Lg--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120320102008.GH2358>