From owner-freebsd-arch@FreeBSD.ORG Wed Jul 10 21:31:20 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 59CB499B; Wed, 10 Jul 2013 21:31:20 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) by mx1.freebsd.org (Postfix) with ESMTP id 9320F1CDC; Wed, 10 Jul 2013 21:31:19 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id m6so6835489wiv.3 for ; Wed, 10 Jul 2013 14:31:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=AirHhlDCmmIBli0td0pHGeL9kw8YEqLtGZ3S9UhMt9I=; b=eK8gjHU4nPV34fQNwaHOI7nIxMpTaorssXS8O64T+vYFpYehs3Y6Y1wxqcPHCbg9gw PntiLTYB2FC6w1fF7GGTtbE+QTF5dT57muV6h18XtRK8JM1cERxfaFa9fLlH21fO8lrQ 5mUZS7OQlY5a5PH2EXt7fJ3Nhm/E/PCuem+vhLPxJpV57HA8KN1wht762WVapBa7WHFq jHKeR3Q3ZRKW+Abcst9ywlbrkRV8Ly2NQAkWH8hhRCuJDFoDbHX2L52fD1FPIVZaJcYW PDk7ZIRf3K8CqSDDM7qEEAuwIb9W9bz8ZmrfRdGPNOWkwaH/R67EV5nZ+A68lWscxopY HAKw== X-Received: by 10.194.240.169 with SMTP id wb9mr18574613wjc.90.1373491878781; Wed, 10 Jul 2013 14:31:18 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id eu1sm69761484wib.8.2013.07.10.14.31.17 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Jul 2013 14:31:17 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 10 Jul 2013 23:31:15 +0200 From: Baptiste Daroussin To: Warner Losh Subject: Re: Adding a MACHINE_ARCH note Message-ID: <20130710213115.GG68830@ithaqua.etoilebsd.net> References: <32F979BD-FB5C-4111-9586-4C5E7C6DFA71@bsdimp.com> <20130710195547.GB68830@ithaqua.etoilebsd.net> <201307101611.37437.jhb@freebsd.org> <20130710212436.GF68830@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xs+9IvWevLaxKUtW" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Adrian Chadd , Dimitry Andric , Andrew Turner , freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2013 21:31:20 -0000 --xs+9IvWevLaxKUtW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 10, 2013 at 03:27:12PM -0600, Warner Losh wrote: >=20 > On Jul 10, 2013, at 3:24 PM, Baptiste Daroussin wrote: >=20 > > On Wed, Jul 10, 2013 at 04:11:37PM -0400, John Baldwin wrote: > >> On Wednesday, July 10, 2013 3:55:47 pm Baptiste Daroussin wrote: > >>> On Wed, Jul 10, 2013 at 12:26:42PM -0700, Adrian Chadd wrote: > >>>> On 10 July 2013 09:55, Warner Losh wrote: > >>>>=20 > >>>>>> 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 a= gain > >>>>>> later. > >>>>>=20 > >>>>> I've been talking to Baptiste, and it will support this. > >>>>=20 > >>>> Sweet. > >>>>=20 > >>>> Thanks! > >>>>=20 > >>>>=20 > >>>> -adrian > >>>=20 > >>> 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. > >>>=20 > >>> 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 binarie= s support. > >>>=20 > >>> pkgng needs for example to allow i386 packages to be installed on amd= 64 because > >>> amd64 does support it. > >>>=20 > >>> Maintaining a list the compatibility will be painful. > >>>=20 > >>> In my own version I have > >>> os:version:family:class:... > >>>=20 > >>> for example here: > >>> on FreeBSD 9 i386 we have: > >>>=20 > >>> freebsd:9:x86:32 > >>>=20 > >>> on FreeBSD 10 amd64 we have: > >>>=20 > >>> freebsd:9:x86:64 > >>>=20 > >>> now if I do want a package I can install on both amd64 and i386 I jus= t have to > >>> create a package saying: > >>>=20 > >>> freebsd:9:x86 > >>>=20 > >>> or if I want a package that can be installed on all arches: > >>>=20 > >>> freebsd:9 > >>>=20 > >>> It became complicated for arm and mips because of the multiple variat= ion > >>> available. > >>=20 > >> You should look at how MACHINE_CPUARCH vs MACHINE vs MACHINE_ARCH work= s. > >>=20 > >> Keep in mind that amd64/i386/pc98 should probably have MACHINE_CPUARCH= of x86, > >> but we just haven't done that yet. If we did that I think you could f= ollow > >> src's conventions and be fine. Something like: > >>=20 > >> os:version:cpuarch:arch > >>=20 > >> Where cpuarch =3D=3D MACHINE_CPUARCH (should be x86 on amd64/i386/pc98= , but isn't > >> yet. It ss sane on other platforms) and > >> arch =3D=3D MACHINE_ARCH (amd64/i386 (for pc98 MACHINE_ARCH is i386)) > >>=20 > >> So that would give: > >>=20 > >> freebsd:9:x86:amd64 > >> freebsd:9:x86:i386 (for both pc98 and i386) > >> freebsd:9:arm:armv6 > >>=20 > >> etc. > >>=20 > >> I think that means we could eventually support x32 as: > >>=20 > >> freebsd:9:x86:x32 > >>=20 > >> We might have an x32 world (but perhaps not a kernel?, though we would= need > >> the headers to DTRT) > >=20 > > I do like the idea a lot. >=20 > We should add a flag to uname to get MACHINE_CPUARCH, and publish it as h= w.cpu_arch in sysctl. >=20 I will still have to workaround on older releases. The one without those informations. regards, Bapt --xs+9IvWevLaxKUtW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlHd0qMACgkQ8kTtMUmk6Ewo2gCgp6savr1WldJnX7bdfIFEzZmk iXsAnio+PbjWd2JlRVxIXtGnIYynxOGQ =ShTv -----END PGP SIGNATURE----- --xs+9IvWevLaxKUtW--