From owner-freebsd-current@FreeBSD.ORG Tue Mar 20 09:19:40 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB0191065674 for ; Tue, 20 Mar 2012 09:19:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7683C8FC0A for ; Tue, 20 Mar 2012 09:19:40 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q2K9Je6F005867 for ; Tue, 20 Mar 2012 09:19:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q2K9Jef8005866 for current@FreeBSD.org; Tue, 20 Mar 2012 09:19:40 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Tue, 20 Mar 2012 10:19:36 +0100 From: Baptiste Daroussin To: current@FreeBSD.org Message-ID: <20120320091935.GF1692@azathoth.lan> References: <20120319213508.GA1692@azathoth.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="H4SyuGOnfnj3aJqJ" Content-Disposition: inline In-Reply-To: <20120319213508.GA1692@azathoth.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Re: ABI/architecture identification for packages X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2012 09:19:40 -0000 --H4SyuGOnfnj3aJqJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 t= he 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 Another question (by rwatson) that comes here is should we keep the archite= cture names that freebsd uses to avoid confusion or should we try to use more acc= urate names? powerpc-64-freebsd-9 -> powerpc64-64-freebsd-9 x86-32-freebsd-9 -> i386-32-freebsd-9 x86-64-freebsd-9 -> amd64-64-freebsd-9 etc. An example of implementation can be find here: https://github.com/pkgng/pkgng/blob/master/libpkg/pkg_elf.c#L157 PS: Feel free to submit fixes/improvements to the code :) regards, Bapt --H4SyuGOnfnj3aJqJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk9oS6cACgkQ8kTtMUmk6Ey4BACfeAlqrkyo0Llp+C/zAtHF6NAr GtsAn3j6ghvoSMzCtwqZqq6V68FiEGcC =o5y4 -----END PGP SIGNATURE----- --H4SyuGOnfnj3aJqJ--