From nobody Fri Nov 1 12:30:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517400011997255.45492250435098; Wed, 31 Jan 2018 04:00:11 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 907F52222C23A; Wed, 31 Jan 2018 03:54:34 -0800 (PST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 41B252222C229 for ; Wed, 31 Jan 2018 03:54:32 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2018 04:00:08 -0800 Received: from shwde7172.ccr.corp.intel.com ([10.239.9.15]) by orsmga003.jf.intel.com with ESMTP; 31 Jan 2018 04:00:07 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,439,1511856000"; d="scan'208";a="23641192" From: Liming Gao To: edk2-devel@lists.01.org Date: Wed, 31 Jan 2018 19:59:56 +0800 Message-Id: <1517399997-1784-2-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 In-Reply-To: <1517399997-1784-1-git-send-email-liming.gao@intel.com> References: <1517399997-1784-1-git-send-email-liming.gao@intel.com> Subject: [edk2] [Patch 1/2] BaseTools GNUmakefile: Move HOST_ARCH detection into common makefile X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" With this change, enter single tool directory, make can pass. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao --- BaseTools/Source/C/Makefiles/header.makefile | 28 ++++++++++++++++++++++++= ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Sourc= e/C/Makefiles/header.makefile index e034da2..0976973 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -6,7 +6,7 @@ # HOST_ARCH =3D ia64 or IA64 for IA64 build # HOST_ARCH =3D Arm or ARM for ARM build # -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BS= D License # which accompanies this distribution. The full text of the license may= be found at @@ -15,7 +15,31 @@ # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. =20 -HOST_ARCH ?=3D IA32 +ifndef HOST_ARCH + # + # If HOST_ARCH is not defined, then we use 'uname -m' to attempt + # try to figure out the appropriate HOST_ARCH. + # + uname_m =3D $(shell uname -m) + $(info Attempting to detect HOST_ARCH from 'uname -m': $(uname_m)) + ifneq (,$(strip $(filter $(uname_m), x86_64 amd64))) + HOST_ARCH=3DX64 + endif + ifeq ($(patsubst i%86,IA32,$(uname_m)),IA32) + HOST_ARCH=3DIA32 + endif + ifneq (,$(findstring aarch64,$(uname_m))) + HOST_ARCH=3DAARCH64 + endif + ifneq (,$(findstring arm,$(uname_m))) + HOST_ARCH=3DARM + endif + ifndef HOST_ARCH + $(info Could not detected HOST_ARCH from uname results) + $(error HOST_ARCH is not defined!) + endif + $(info Detected HOST_ARCH of $(HOST_ARCH) using uname.) +endif =20 CYGWIN:=3D$(findstring CYGWIN, $(shell uname -s)) LINUX:=3D$(findstring Linux, $(shell uname -s)) --=20 2.8.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel