Date: Wed, 10 Jul 2013 16:51:03 -0500 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: freebsd-arch@freebsd.org Subject: Re: Adding a MACHINE_ARCH note Message-ID: <51DDD747.80206@freebsd.org> In-Reply-To: <20130710213115.GG68830@ithaqua.etoilebsd.net> References: <32F979BD-FB5C-4111-9586-4C5E7C6DFA71@bsdimp.com> <CAJ-Vmo=sUKs4u-pq%2B1hx-q1bfhPugMcSp4XYzNcBNwHMrw3Kug@mail.gmail.com> <20130710195547.GB68830@ithaqua.etoilebsd.net> <201307101611.37437.jhb@freebsd.org> <20130710212436.GF68830@ithaqua.etoilebsd.net> <AE10F27F-6D86-45F0-8C8D-1274CF09CC42@bsdimp.com> <20130710213115.GG68830@ithaqua.etoilebsd.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 07/10/13 16:31, Baptiste Daroussin wrote: > On Wed, Jul 10, 2013 at 03:27:12PM -0600, Warner Losh wrote: >> On Jul 10, 2013, at 3:24 PM, Baptiste Daroussin wrote: >> >>> >>> You should look at how MACHINE_CPUARCH vs MACHINE vs MACHINE_ARCH works. >>> >>> 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: >>> >>> os:version:cpuarch:arch >>> >>> Where cpuarch == MACHINE_CPUARCH (should be x86 on amd64/i386/pc98, but isn't >>> yet. It ss sane on other platforms) and >>> arch == MACHINE_ARCH (amd64/i386 (for pc98 MACHINE_ARCH is i386)) >>> >>> So that would give: >>> >>> freebsd:9:x86:amd64 >>> freebsd:9:x86:i386 (for both pc98 and i386) >>> freebsd:9:arm:armv6 >>> >>> etc. >>> >>> I think that means we could eventually support x32 as: >>> >>> freebsd:9:x86:x32 >>> >>> We might have an x32 world (but perhaps not a kernel?, though we would need >>> the headers to DTRT) >>> 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. >> > I will still have to workaround on older releases. The one without those > informations. > > regards, > Bapt On those systems, I think you can easily get away with assuming hw.abi == `uname -p`. Installing i386 packages on amd64 systems (or powerpc on powerpc64 or ...) will likely require some infrastructure work anyway and hw.abi is a perfect quick MFC candidate. A few quick special cases will solve any remaining problems almost universally. -Nathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51DDD747.80206>