Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2015 10:26:26 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Ed Maste <emaste@FreeBSD.org>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: FreeBSD/arm64 MACHINE/MACHINE_ARCH identification
Message-ID:  <84AC4061-2FF8-4066-8C38-D5240F7FB86A@bsdimp.com>
In-Reply-To: <CAPyFy2BKzhiA4tbi-mXd6T114_zawmWTi3XbyXiUcgijQfHdyw@mail.gmail.com>
References:  <CAPyFy2A=Ev5gdYPKgEE0LS3-1sY%2BXmkZA7VCe71E6Fmbb=vMRw@mail.gmail.com> <607BF592-A09B-4DB4-9872-C9E63066AB57@bsdimp.com> <CAPyFy2Bgrap3TkFNuChyMC0Vwbjdt5FVW0ey03XtkK1iwNL1KQ@mail.gmail.com> <71E9C1B9-F819-420B-90A5-A36D58E71817@bsdimp.com> <CAPyFy2ATn5xgsvePCdvzqnyBS45izVHdL8yLaQQoKeJenSv9tg@mail.gmail.com> <228428CC-4042-4902-90A4-E7040F4BFFF5@bsdimp.com> <CAPyFy2BKzhiA4tbi-mXd6T114_zawmWTi3XbyXiUcgijQfHdyw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> On Feb 12, 2015, at 10:15 AM, Ed Maste <emaste@FreeBSD.org> wrote:
>=20
>>> Oh - I don't care what directory Linux puts the kernel source in, =
only
>>> what's reported by uname.  As far as I can tell that has always been
>>> aarch64 for uname -m.
>>=20
>> Traditionally in Linux, they have been a matched set.
>=20
> Ok, it appears they may have abandoned this.
>=20
>>> We might decide that "uname -m" has to be aarch64 to match
>>> expectations of third-party software set by other operating systems.
>>> If that in turn means we have to move the kernel source, so be it.
>>=20
>> This one I=E2=80=99m not on board with. You=E2=80=99ve not made a =
compelling case for
>> it yet.
>=20
> That's why I said "we might decide" -- I'm not sure myself.
>=20
> However, there's no backwards compatibility concern here, we've never
> had a FreeBSD release that reports "arm64" for "uname -m". There's no
> reason for us to prefer "arm64" if everyone else uses "aarch64."
> Also, having arm64 for uname -m and aarch64 for uname -p seems a bit
> odd.

They are different because they can be different. The machine name for
pc98 is pc98 not i386. It=E2=80=99s the platform, while the machine_arch =
name is
i386 since that=E2=80=99s the cpu abi it is built on.

FWIW, netbsd reports =E2=80=98amd64=E2=80=99 for the machine and =
=E2=80=98x86_64=E2=80=99 for
machine_arch which is one of the reasons I know ours is wrong :(

>> One other area that these choices impact the system is in the =
MACHINE_CPUARCH
>> macro, which is derived from MACHINE_ARCH (-p), so it might need =
another
>> special case.
>=20
> There's a special case already for TARGET_TRIPLE :C/arm64/aarch64/.

We=E2=80=99ll likely need more of this sort of thing. which is kinda a =
pita.

>> There=E2=80=99s also a number of places we test different of these =
variables
>> against arm*<mumble> that will need to be audited if we make this =
change as well.
>> Thankfully, there=E2=80=99s only about a dozen. While not externally =
visible, any change here
>> will need to make sure we=E2=80=99re consistent when building.
>=20
> Yes, I'm not too worried about the naming within our tree - dealing
> with a few dozen tests in the FreeBSD tree is much easier than trying
> to change expectations of third-party software.

My worry is that they get fixed at the same time any name changes, which
weren=E2=80=99t in the patches :)

I=E2=80=99m not at all sure what the right thing here will be.

Warner=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84AC4061-2FF8-4066-8C38-D5240F7FB86A>