From nobody Mon Oct 18 16:09:33 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E48BA17F06AD; Mon, 18 Oct 2021 16:09:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HY1zK6BBVz4Yts; Mon, 18 Oct 2021 16:09:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFE07236F2; Mon, 18 Oct 2021 16:09:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19IG9XHx026768; Mon, 18 Oct 2021 16:09:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19IG9XxW026767; Mon, 18 Oct 2021 16:09:33 GMT (envelope-from git) Date: Mon, 18 Oct 2021 16:09:33 GMT Message-Id: <202110181609.19IG9XxW026767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 8c22b9f3ba58 - main - Fix cross-building on Linux/aarch64 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c22b9f3ba586e008e8e55a6215a1d46eb6830b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8c22b9f3ba586e008e8e55a6215a1d46eb6830b9 commit 8c22b9f3ba586e008e8e55a6215a1d46eb6830b9 Author: Kyle Evans AuthorDate: 2021-10-18 02:26:47 +0000 Commit: Kyle Evans CommitDate: 2021-10-18 16:09:00 +0000 Fix cross-building on Linux/aarch64 Add necessary bits to detect ELF format on Linux/aarch64; note that Linux calls it aarch64 where we would typically call it arm64 (uname -m) Reviewed by: arichardson, emaste, imp Sponsored by: Ampere Computing LLC Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D32542 --- contrib/elftoolchain/common/native-elf-format | 2 ++ tools/build/Makefile | 3 +++ 2 files changed, 5 insertions(+) diff --git a/contrib/elftoolchain/common/native-elf-format b/contrib/elftoolchain/common/native-elf-format index cef29e75111e..903dc37d0fbe 100755 --- a/contrib/elftoolchain/common/native-elf-format +++ b/contrib/elftoolchain/common/native-elf-format @@ -39,6 +39,8 @@ $1 ~ "Machine:" { elfarch = "EM_X86_64"; } else if (match($0, "PowerPC64")) { elfarch = "EM_PPC64"; + } else if (match($0, "AArch64")) { + elfarch = "EM_AARCH64"; } else { elfarch = "unknown"; } diff --git a/tools/build/Makefile b/tools/build/Makefile index 742432872c49..ec9b11398ae9 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -125,6 +125,9 @@ _host_arch=${MACHINE} .if ${_host_arch} == "x86_64" # bmake on Linux/mac often prints that instead of amd64 _host_arch=amd64 +.elif ${_host_arch} == "aarch64" +# Linux calls arm64, aarch64, across the board +_host_arch=arm64 .elif ${_host_arch:Mppc*} _host_arch=powerpc .endif