From owner-freebsd-arch@FreeBSD.ORG Wed Jul 10 21:27:22 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7E96C73C for ; Wed, 10 Jul 2013 21:27:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by mx1.freebsd.org (Postfix) with ESMTP id 4EC651CAF for ; Wed, 10 Jul 2013 21:27:22 +0000 (UTC) Received: by mail-ie0-f178.google.com with SMTP id u16so16478457iet.37 for ; Wed, 10 Jul 2013 14:27:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=vhKLjA8cQjgqrT2Moi6+Zv/8gxMujrXSoUBUz7GVdok=; b=jgRn5OZGk0xD01Xdf83CdQCw2Z+w70suOP4bTh78mQGX7FwhihcoPyigrgjFUqUroV F8D0Df6mfcFpWhx5tmkzng9gVzTG2NKwV9Vcvci5rDMcekmKLKU4IunDNKK0TdpBt8Ld nJ3mIgKiap7hKAtzTEyB3EglmXtXnDadWsdTaKjh/uvcvuOXOE3XsDSro9yuiRuVRcGy jWRuwIRrKUniSI+LTEHyREw6akm/vYq137/Ydat98g6tkoBgFCImqMaZZsPaKZ+th+j3 axoY7R4yLngTv7HQyy0FGfn4a6dbH0rrHJLY2JFC/Nm3c3OwfYkLsPgBJlZbP1xQBx8A EQ4w== X-Received: by 10.50.18.81 with SMTP id u17mr12419766igd.8.1373491636449; Wed, 10 Jul 2013 14:27:16 -0700 (PDT) Received: from monkey-bot.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPSA id x10sm38104798igl.3.2013.07.10.14.27.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Jul 2013 14:27:15 -0700 (PDT) Sender: Warner Losh Subject: Re: Adding a MACHINE_ARCH note Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20130710212436.GF68830@ithaqua.etoilebsd.net> Date: Wed, 10 Jul 2013 15:27:12 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <32F979BD-FB5C-4111-9586-4C5E7C6DFA71@bsdimp.com> <20130710195547.GB68830@ithaqua.etoilebsd.net> <201307101611.37437.jhb@freebsd.org> <20130710212436.GF68830@ithaqua.etoilebsd.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQnccryUJivAsInqz+QpU8bwmmwmRK0oVgpKcU7uZ5MqKJ/t2f8OI4WdLod7hYbOOdrEcQQX 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:27:22 -0000 On Jul 10, 2013, at 3:24 PM, Baptiste Daroussin wrote: > 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 = again >>>>>> 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 = binaries support. >>>=20 >>> pkgng needs for example to allow i386 packages to be installed on = amd64 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 = just 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 = variation >>> available. >>=20 >> You should look at how MACHINE_CPUARCH vs MACHINE vs MACHINE_ARCH = works. >>=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 = follow >> 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. We should add a flag to uname to get MACHINE_CPUARCH, and publish it as = hw.cpu_arch in sysctl. Warner