Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2015 23:54:39 -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:  <71E9C1B9-F819-420B-90A5-A36D58E71817@bsdimp.com>
In-Reply-To: <CAPyFy2Bgrap3TkFNuChyMC0Vwbjdt5FVW0ey03XtkK1iwNL1KQ@mail.gmail.com>
References:  <CAPyFy2A=Ev5gdYPKgEE0LS3-1sY%2BXmkZA7VCe71E6Fmbb=vMRw@mail.gmail.com> <607BF592-A09B-4DB4-9872-C9E63066AB57@bsdimp.com> <CAPyFy2Bgrap3TkFNuChyMC0Vwbjdt5FVW0ey03XtkK1iwNL1KQ@mail.gmail.com>

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

> On Feb 11, 2015, at 8:46 PM, Ed Maste <emaste@FreeBSD.org> wrote:
>=20
> On 11 February 2015 at 19:20, Warner Losh <imp@bsdimp.com> wrote:
>>=20
>> Linux used the original aarch64, but later changed to arm64.
>=20
> Are you sure? As far as I can tell Linux reports "aarch64" for uname
> -m (i.e., hw.machine) and that is what config.guess / autoconf
> expects.

They moved the sources in the kernel from aarch64 to arm64. I=E2=80=99m =
sure.

>> I suggest
>> that we follow this carefully. We botched the naming of amd64 and =
have
>> dozens of warts in our build system because of it.
>=20
> Indeed. We have to be sure that this is correct before it makes it to =
HEAD.
>=20
>> I strongly object to the MACHINE change for reasons stated above, but =
the MACHINE_ARCH
>> is likely a very good change since it aligns with the expected values =
for configuring things like
>> clang, gcc, bintuils, etc.
>=20
> As far as I can tell it's uname -m / sysctl hw.machine that's used by
> autoconf.  Uname -p is hw.machine_arch and doesn't seem to be used.

I think you=E2=80=99re wrong here. uname -p is definitely used when you =
configure
things like gcc. This is why we had to hack it to make armv6 as our
uname -p output work so we could bootstrap on the native hardware.
amd64=E2=80=99s -p name should have been x86_64. We=E2=80=99ve created =
no end of
issues for ourselves by not doing that.

config.guess uses uname -p:

    *:FreeBSD:*:*)
        UNAME_PROCESSOR=3D`/usr/bin/uname -p`
        echo ${UNAME_PROCESSOR}-unknown-freebsd`echo =
${UNAME_RELEASE}|sed -e 's/[-(].*//'`
        exit ;;

so uname -p must be =E2=80=98aarch64=E2=80=99 since that=E2=80=99s what =
is expected. name -m must
be arm64 unless we move our kernel implementation to sys/aarch64 from =
the
sys/arm64 it is now.

Warner=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?71E9C1B9-F819-420B-90A5-A36D58E71817>