From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=pete@akeo.ie; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7566522436955 for ; Fri, 23 Feb 2018 01:44:18 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id a20so6135992wmd.1 for ; Fri, 23 Feb 2018 01:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+jmXkiw7qDQ/WGqTk6+FBYyOz156HPz2N3GZVVuSwIg=; b=aweCDV5Gbd+LEABaP/uWc/tc1hNXoBU3DgDSbpLS2wgBU005cUUxYxVLQio96rrb48 OXAI8E+R+NoL5KQFkhFWDKmG5k4POU/YEop9yzwpbNOS30vtAJwEKuWWfIYzzAFjVLJh aPrvtWF3zeZuZrQdgAnCkPRHv6OXI7trwqvJqOn0jg+6WHQemhc5JBRw4Qjs3lmF/+8l zD/xYS4VT5WeazQHEfUfC9YmVMRwnA2WUyIU5pIpE1MBp21swRRQc+Zb7m8yGEWy+JWO /7vWpt3gWeBfo20UZ9ZHTxX8XOCWZ8WkQ3jG975eeU4wSdgyRmFUMg/WWq+NFl/vXGlN WWFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+jmXkiw7qDQ/WGqTk6+FBYyOz156HPz2N3GZVVuSwIg=; b=JeR6KEqydrehtjJrxv9xwpqpX7dPSmFDInAY8sngvW2vxhUzJXkr3cWoUoWu+KSAh7 P6cIhofpyH/EB0+ZaCBxgiV8HRNQCq0mHgLWyVXuoOhvGq7/COJtaVOAlpUQoaT+UFQS NbZ9v65g5NYZ751ZvuTUlpA+cucNy/EHh6EfXOZ4mWwqTrmGNqkkQLwyIKaT0Oj4Fo6k uLsXjk2a3RmpQNKWRsCyk3tx5imOBgMuhyNsWxYApjL9TwmrM+O6GVyfYBj7nV3/cK3k jHNJUXGjdAjUzVC/YxrNzuZScxlDSbQj9SVk4SiSMwc1K320IqlgKV0aX9SpNUDtj9J+ cbZQ== X-Gm-Message-State: APf1xPCUaFGyip3Y4qXm8TkxGrvNaMV4Cs8QZHl2Rp+gkpTpou15WrG4 6nyjpX2Mes57LfUFykVkPOfyfMcGHRk= X-Google-Smtp-Source: AH8x227ROpHd+9sxgDDyTvaFkNf0Y3yLI/ebAvi/43LTsGSg3Xuds76H+QVz3q6BWn7DAjOIud8aLg== X-Received: by 10.80.203.2 with SMTP id g2mr2008497edi.4.1519379418246; Fri, 23 Feb 2018 01:50:18 -0800 (PST) Received: from localhost.localdomain ([84.203.54.151]) by smtp.gmail.com with ESMTPSA id z11sm1640521edh.94.2018.02.23.01.50.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Feb 2018 01:50:17 -0800 (PST) From: Pete Batard To: edk2-devel@lists.01.org Cc: liming.gao@intel.com, ard.biesheuvel@linaro.org Date: Fri, 23 Feb 2018 09:50:03 +0000 Message-Id: <20180223095003.6012-5-pete@akeo.ie> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20180223095003.6012-1-pete@akeo.ie> References: <20180223095003.6012-1-pete@akeo.ie> Subject: [PATCH 4/4] BaseTools/Conf: Add VS2017/ARM64 support 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: , X-List-Received-Date: Fri, 23 Feb 2018 09:44:19 -0000 Build options for ARM64 are the same as for ARM, except for /BASE:0 which is removed from DLINK flags to avoid LNK1355 error: invalid base address 0x0; ARM64 image cannot have base address below 4GB Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard --- BaseTools/Conf/build_rule.template | 2 +- BaseTools/Conf/tools_def.template | 32 ++++++++++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template index 77ed282e0311..308505b3dca5 100755 --- a/BaseTools/Conf/build_rule.template +++ b/BaseTools/Conf/build_rule.template @@ -206,7 +206,7 @@ # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii -[Assembly-Code-File.COMMON.ARM] +[Assembly-Code-File.COMMON.ARM,Assembly-Code-File.COMMON.AARCH64] # Remove --convert-hex for ARM as it breaks MSFT assemblers ?.asm, ?.Asm, ?.ASM diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 427ad60b0e26..703019129f79 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -80,6 +80,7 @@ DEFINE VS2017_BIN_HOST = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\DEF(VS2017_HOST DEFINE VS2017_BIN_IA32 = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\x86 DEFINE VS2017_BIN_X64 = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\x64 DEFINE VS2017_BIN_ARM = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\arm +DEFINE VS2017_BIN_AARCH64 = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\arm64 DEFINE WINSDK_BIN = ENV(WINSDK_PREFIX) DEFINE WINSDKx86_BIN = ENV(WINSDKx86_PREFIX) @@ -329,7 +330,7 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc # Intel(r) ACPI Compiler (iasl.exe) from # https://acpica.org/downloads # VS2017 -win32- Requires: -# Microsoft Visual Studio 2017 version 15.2 or later +# Microsoft Visual Studio 2017 version 15.2 (15.4 for ARM64) or later # Optional: # Required to build EBC drivers: # Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler) @@ -337,7 +338,7 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc # Intel(r) ACPI Compiler (iasl.exe) from # https://acpica.org/downloads # Note: -# Building of XIP firmware images for ARM is not currently supported (only applications). +# Building of XIP firmware images for ARM/ARM64 is not currently supported (only applications). # /FILEALIGN:4096 and other changes are needed for ARM firmware builds. # DDK3790 -win32- Requires: # Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830 @@ -4200,6 +4201,33 @@ NOOPT_VS2017_ARM_ASM_FLAGS = /nologo RELEASE_VS2017_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data NOOPT_VS2017_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG +##################### +# AARCH64 definitions +##################### +*_VS2017_AARCH64_CC_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe +*_VS2017_AARCH64_VFRPP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe +*_VS2017_AARCH64_SLINK_PATH = DEF(VS2017_BIN_AARCH64)\lib.exe +*_VS2017_AARCH64_DLINK_PATH = DEF(VS2017_BIN_AARCH64)\link.exe +*_VS2017_AARCH64_APP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe +*_VS2017_AARCH64_PP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe +*_VS2017_AARCH64_ASM_PATH = DEF(VS2017_BIN_AARCH64)\armasm64.exe +*_VS2017_AARCH64_ASLCC_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe +*_VS2017_AARCH64_ASLPP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe +*_VS2017_AARCH64_ASLDLINK_PATH = DEF(VS2017_BIN_AARCH64)\link.exe + + *_VS2017_AARCH64_MAKE_FLAGS = /nologo + DEBUG_VS2017_AARCH64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Gw /Oi- +RELEASE_VS2017_AARCH64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi- +NOOPT_VS2017_AARCH64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od /Oi- + + DEBUG_VS2017_AARCH64_ASM_FLAGS = /nologo /g +RELEASE_VS2017_AARCH64_ASM_FLAGS = /nologo +NOOPT_VS2017_AARCH64_ASM_FLAGS = /nologo + + DEBUG_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /DRIVER /DEBUG +RELEASE_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /DRIVER /MERGE:.rdata=.data +NOOPT_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /DRIVER /DEBUG + ################## # EBC definitions ################## -- 2.9.3.windows.2