From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.85.128.66, mailfrom: philmd@redhat.com) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by groups.io with SMTP; Thu, 11 Apr 2019 12:55:48 -0700 Received: by mail-wm1-f66.google.com with SMTP id v14so8130916wmf.2 for ; Thu, 11 Apr 2019 12:55:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=06LPYQtinWcSMmJCyVVd7XKCmeaAyPY5BNxKL6wEgyA=; b=k2Vu3pOZqIyMe13W1rQyo/I7CiWz6TZCvAn74xUxpCyZjCzReoIN6VIsKq/E1GDtmU tuz+TjIUUcTBSIP5zvlgbkywNBisYwP8VvPoYgf+UfeU9GyfAMfvj4E89tFATd0seCzx ilWvi73pSWUZzPRe/PlBrjq5Kln6LE7Vfh4xer1z5nD3abBwcZvzOID5dZIU6d2TOk5L dd4oc0D17ge3dGSoBnx56s03IjPEdsrFslcslHG3Ey//MPrBdNduGvx00Ww0ER7n3JM0 38QemgcfjJ63oY/0il4T1OtNnE2SH0+gY0jKkbsdPMXIkeMPGuU/v4zOnS1zmH+RVdMR 2Dqw== X-Gm-Message-State: APjAAAUUaVetxLovrxgypg4xQ5ur8bC1wIOM/n58JlOuOqz7vvYveOPB lTxcO9h+zlcd+tbQovIT1Usbhg== X-Google-Smtp-Source: APXvYqzuGJRNZI7JXqY2KAutVNQGNpWe1RYQ6re1pk1mymLMmQ0NcMy/mPhxshOjoiYrZ/CNcFy2OQ== X-Received: by 2002:a1c:eb18:: with SMTP id j24mr7850903wmh.32.1555012546891; Thu, 11 Apr 2019 12:55:46 -0700 (PDT) Return-Path: Received: from [192.168.1.33] (193.red-88-21-103.staticip.rima-tde.net. [88.21.103.193]) by smtp.gmail.com with ESMTPSA id s189sm12590152wmf.45.2019.04.11.12.55.45 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 12:55:46 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH] BaseTools: support arm64 as a platform name in addition to aarch64 To: Laszlo Ersek , devel@edk2.groups.io, rebecca@bluestop.org, Liming Gao , Yonghong Zhu References: <20190411031653.38092-1-rebecca@bluestop.org> <19000479-83f6-49fb-7a68-e09b31cd0a0e@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: Date: Thu, 11 Apr 2019 21:55:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <19000479-83f6-49fb-7a68-e09b31cd0a0e@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 4/11/19 7:52 PM, Laszlo Ersek wrote: > On 04/11/19 16:23, Philippe Mathieu-Daudé wrote: >> On 4/11/19 5:16 AM, Rebecca Cran via Groups.Io wrote: >>> Some systems such as FreeBSD identify the platform as 'arm64' >>> and not 'aarch64' as Linux does. >> >> Per https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220297 >> this seems to be a FreeBSD bug. > > You are correct, but that issue was filed on 2017-06-26. I don't think > we should hold our breaths, as long as the workaround is simple. And, it > does look simple. (We've worked around worse.) > > I do suggest an addition to the patch, however: Rebecca, please add the > link discovered by Phil near the "arm64" matches, in a comment. > Something like: > > # work around Good idea. > Thanks, > Laszlo > >> >>> Signed-off-by: Rebecca Cran >>> --- >>> BaseTools/Source/C/GNUmakefile | 5 +++-- >>> BaseTools/Source/C/Makefiles/header.makefile | 5 +++-- >>> 2 files changed, 6 insertions(+), 4 deletions(-) >>> >>> diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile >>> index 1d048c4cc6..37bcce519c 100644 >>> --- a/BaseTools/Source/C/GNUmakefile >>> +++ b/BaseTools/Source/C/GNUmakefile >>> @@ -21,8 +21,9 @@ ifndef HOST_ARCH >>> endif >>> ifneq (,$(findstring aarch64,$(uname_m))) >>> HOST_ARCH=AARCH64 >>> - endif >>> - ifneq (,$(findstring arm,$(uname_m))) >>> + else ifneq (,$(findstring arm64,$(uname_m))) Here you change 2 different if() blocks into a single if/elif/elif. Although not mentioned in the patch description, it is cleaner than before your patch. With the work around link added: Reviewed-by: Philippe Mathieu-Daude Thanks, Phil. >>> + HOST_ARCH=AARCH64 >>> + else ifneq (,$(findstring arm,$(uname_m))) >>> HOST_ARCH=ARM >>> endif >>> ifndef HOST_ARCH >>> diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile >>> index 90fb3453ad..d76b8283dd 100644 >>> --- a/BaseTools/Source/C/Makefiles/header.makefile >>> +++ b/BaseTools/Source/C/Makefiles/header.makefile >>> @@ -23,8 +23,9 @@ ifndef HOST_ARCH >>> endif >>> ifneq (,$(findstring aarch64,$(uname_m))) >>> HOST_ARCH=AARCH64 >>> - endif >>> - ifneq (,$(findstring arm,$(uname_m))) >>> + else ifneq (,$(findstring arm64,$(uname_m))) >>> + HOST_ARCH=AARCH64 >>> + else ifneq (,$(findstring arm,$(uname_m))) >>> HOST_ARCH=ARM >>> endif >>> ifndef HOST_ARCH >>> >> >> >> >