From owner-freebsd-arm@FreeBSD.ORG Thu Feb 12 06:54:47 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB108233 for ; Thu, 12 Feb 2015 06:54:47 +0000 (UTC) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91F4C177 for ; Thu, 12 Feb 2015 06:54:47 +0000 (UTC) Received: by iecrp18 with SMTP id rp18so9757462iec.10 for ; Wed, 11 Feb 2015 22:54:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=ZPXkmnjmVD9dwjdNx0kMrIvTQcn4Wo+sxmD1rD1QBjg=; b=SejPCPm8PObATftiKDj4Fi7dpb1tNgzt8md4L2GNLpvmVLdgoWuFWLkHfYqenGJC3c lLusTdMy4NCvvpwrg+DGkZSpzEK6XCDstO+FWBZDc3FOsxvJbhuRp0e40P5QcKEK8pDF 3uFH6ldY+OyAvn+jZPAZkSXANaXhlqZHHyn1Shm/AeCbMI1LtFUbrvQNNyhj5YpxGbWT TgUj+U9lhUqScJrCd4iXoTszR5QGNwEVUoqQcKdoKUOx7SjvDwDESzd1EhGEPSSEiSI3 91hikxjrftF5zsSwxUsma3A5yfnSgejh0uZSAuRFSi2ZlCRQayAxGGnAK6+BLJkgXRKN /ZXA== X-Gm-Message-State: ALoCoQmM847zWXeYF1hdxuPrFbCKZX7GZV8Ta9c50wjCKkHZOUph+X5z4NNkP2VV7hXjMdSseOVJ X-Received: by 10.50.124.73 with SMTP id mg9mr2087050igb.38.1423724081498; Wed, 11 Feb 2015 22:54:41 -0800 (PST) Received: from netflix-mac-wired.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id c4sm714210igt.19.2015.02.11.22.54.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Feb 2015 22:54:40 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: FreeBSD/arm64 MACHINE/MACHINE_ARCH identification From: Warner Losh In-Reply-To: Date: Wed, 11 Feb 2015 23:54:39 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <71E9C1B9-F819-420B-90A5-A36D58E71817@bsdimp.com> References: <607BF592-A09B-4DB4-9872-C9E63066AB57@bsdimp.com> To: Ed Maste X-Mailer: Apple Mail (2.2070.6) Cc: "freebsd-arm@freebsd.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 06:54:48 -0000 > On Feb 11, 2015, at 8:46 PM, Ed Maste wrote: >=20 > On 11 February 2015 at 19:20, Warner Losh 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=