From nobody Sat Dec 28 10:56:54 2024 Delivered-To: importer@patchew.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; Authentication-Results: mx.zoho.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 149914632864239.10395596863464; Mon, 3 Jul 2017 22:32:08 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4ABE021CB74A4; Mon, 3 Jul 2017 22:30:27 -0700 (PDT) Received: from g2t4622.austin.hp.com (g2t4622.austin.hp.com [15.73.212.79]) (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 D938621CAD99F for ; Mon, 3 Jul 2017 22:30:25 -0700 (PDT) Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.158.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by g2t4622.austin.hp.com (Postfix) with ESMTPS id 61920379; Tue, 4 Jul 2017 05:32:02 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org From: Abner Chang To: edk2-devel@lists.01.org Date: Tue, 4 Jul 2017 13:29:22 +0800 Message-Id: <1499146164-26231-3-git-send-email-abner.chang@hpe.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499146164-26231-1-git-send-email-abner.chang@hpe.com> References: <1499146164-26231-1-git-send-email-abner.chang@hpe.com> Subject: [edk2] [staging/branch RISC-V PATCH 2/4] BaseTools: Support RISC-V GCC 7.1.1. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 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" Add build tool definition for RISC-V GCC 7.1.1. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Abner Chang --- BaseTools/Conf/tools_def.template | 85 +++++++++++++++++++++++++++++++++++= +++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.t= emplate index 2ae009e..682d8b3 100644 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -3,7 +3,7 @@ # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
# Portions copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
# Copyright (c) 2015, Hewlett-Packard Development Company, L.P.
-# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
+# (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -204,6 +204,8 @@ DEFINE GCC49_X64_PREFIX =3D ENV(GCC49_BIN) # DEFINE GCC53RISCV_RISCV32_PREFIX =3D ~/riscv/bin/ DEFINE GCC53RISCV_RISCV64_PREFIX =3D ~/riscv/bin/ +DEFINE GCC711RISCV_RISCV32_PREFIX =3D ~/riscv/bin/ +DEFINE GCC711RISCV_RISCV64_PREFIX =3D ~/riscv/bin/ =20 DEFINE UNIX_IASL_BIN =3D ENV(IASL_PREFIX)iasl DEFINE WIN_ASL_BIN_DIR =3D C:\ASL @@ -4468,6 +4470,19 @@ DEFINE GCC53RISCV_RISCV64_DLINK_FLAGS =3D DEF(= GCC53RISCV_RISCV32_RISCV64_DLI DEFINE GCC53RISCV_RISCV64_DLINK2_FLAGS =3D DEF(GCC49_X64_DLINK2_FLAGS) DEFINE GCC53RISCV_ASM_FLAGS =3D DEF(GCC49_ASM_FLAGS) =20 +DEFINE GCC711RISCV_RISCV32_ARCH =3D rv32imafd +DEFINE GCC711RISCV_RISCV64_ARCH =3D rv64imafd +DEFINE GCC711RISCV_CC_FLAGS_WARNING_DISABLE =3D -Wno-tautological-compare = -Wno-pointer-compare +DEFINE GCC711RISCV_RISCV32_CC_FLAGS =3D DEF(GCC44_ALL_CC_FLAGS) DEF(GCC7= 11RISCV_CC_FLAGS_WARNING_DISABLE) -march=3DDEF(GCC711RISCV_RISCV32_ARCH) -m= align-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables = -Wno-address -Wno-unused-but-set-variable -fpack-struct=3D8 +DEFINE GCC711RISCV_RISCV64_CC_FLAGS =3D DEF(GCC44_ALL_CC_FLAGS) DEF(GCC7= 11RISCV_CC_FLAGS_WARNING_DISABLE) -march=3DDEF(GCC711RISCV_RISCV64_ARCH) -f= no-builtin -fno-builtin-memcpy -fno-stack-protector -Wno-address -fno-async= hronous-unwind-tables -Wno-unused-but-set-variable -fpack-struct=3D8 +DEFINE GCC711RISCV_RISCV32_RISCV64_DLINK_COMMON =3D -nostdlib -n -q --gc= -sections -z common-page-size=3D0x40 +DEFINE GCC711RISCV_RISCV32_RISCV64_ASLDLINK_FLAGS =3D DEF(GCC53RISCV_RISCV= 32_RISCV64_DLINK_COMMON) --entry ReferenceAcpiTable -u ReferenceAcpiTable +DEFINE GCC711RISCV_RISCV32_RISCV64_DLINK_FLAGS =3D DEF(GCC53RISCV_RISCV= 32_RISCV64_DLINK_COMMON) --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POIN= T) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map +DEFINE GCC711RISCV_RISCV32_DLINK2_FLAGS =3D DEF(GCC49_IA32_DLINK2_FLA= GS) +DEFINE GCC711RISCV_RISCV64_DLINK_FLAGS =3D DEF(GCC53RISCV_RISCV32_RI= SCV64_DLINK_FLAGS) -melf64lriscv --oformat=3Delf64-littleriscv --no-relax +DEFINE GCC711RISCV_RISCV64_DLINK2_FLAGS =3D DEF(GCC49_X64_DLINK2_FLAGS) +DEFINE GCC711RISCV_ASM_FLAGS =3D DEF(GCC49_ASM_FLAGS) + ##########################################################################= ########## # # Unix GCC And Intel Linux ACPI Compiler @@ -5269,6 +5284,74 @@ RELEASE_GCC49_AARCH64_DLINK_FLAGS =3D DEF(GCC49_AAR= CH64_DLINK_FLAGS) =20 ##########################################################################= ########## # +# GCC 7.1.1 RISC-V This configuration is used to compile under Linux to pr= oduce +# PE/COFF binaries using GCC 7.1.1. +# +##########################################################################= ########## + +*_GCC711RISCV_*_*_FAMILY =3D GCC + +*_GCC711RISCV_*_MAKE_PATH =3D DEF(GCC49_IA32_PREFIX)make +*_GCC711RISCV_*_PP_FLAGS =3D DEF(GCC_PP_FLAGS) +*_GCC711RISCV_*_ASLPP_FLAGS =3D DEF(GCC_ASLPP_FLAGS) +*_GCC711RISCV_*_ASLCC_FLAGS =3D DEF(GCC_ASLCC_FLAGS) +*_GCC711RISCV_*_VFRPP_FLAGS =3D DEF(GCC_VFRPP_FLAGS) +*_GCC711RISCV_*_APP_FLAGS =3D +*_GCC711RISCV_*_ASL_FLAGS =3D DEF(IASL_FLAGS) +*_GCC711RISCV_*_ASL_OUTFLAGS =3D DEF(IASL_OUTFLAGS) + +################## +# GCC711RISCV RISCV32 definitions +################## + +*_GCC711RISCV_RISCV32_OBJCOPY_PATH =3D ENV(GCC711RISCV_RISCV32_PRE= FIX)riscv64-unknown-elf-objcopy +*_GCC711RISCV_RISCV32_SLINK_PATH =3D ENV(GCC711RISCV_RISCV32_PRE= FIX)riscv64-unknown-elf-gcc-ar +*_GCC711RISCV_RISCV32_DLINK_PATH =3D ENV(GCC711RISCV_RISCV32_PRE= FIX)riscv64-unknown-elf-ld +*_GCC711RISCV_RISCV32_ASLDLINK_PATH =3D ENV(GCC711RISCV_RISCV32_PRE= FIX)riscv64-unknown-elf-ld +*_GCC711RISCV_RISCV32_ASM_PATH =3D ENV(GCC711RISCV_RISCV32_PRE= FIX)riscv64-unknown-elf-gcc +*_GCC711RISCV_RISCV32_PP_PATH =3D ENV(GCC711RISCV_RISCV32_PRE= FIX)riscv64-unknown-elf-gcc +*_GCC711RISCV_RISCV32_VFRPP_PATH =3D ENV(GCC711RISCV_RISCV32_PRE= FIX)riscv64-unknown-elf-gcc +*_GCC711RISCV_RISCV32_ASLCC_PATH =3D ENV(GCC711RISCV_RISCV32_PRE= FIX)riscv64-unknown-elf-gcc +*_GCC711RISCV_RISCV32_ASLPP_PATH =3D ENV(GCC711RISCV_RISCV32_PRE= FIX)riscv64-unknown-elf-gcc +*_GCC711RISCV_RISCV32_RC_PATH =3D ENV(GCC711RISCV_RISCV32_PRE= FIX)riscv64-unknown-elf-objcopy + +*_GCC711RISCV_RISCV32_ASLCC_FLAGS =3D DEF(GCC_ASLCC_FLAGS) -m32 +*_GCC711RISCV_RISCV32_ASLDLINK_FLAGS =3D DEF(GCC711RISCV_RISCV32_RIS= CV64_ASLDLINK_FLAGS) -m elf_i386 +*_GCC711RISCV_RISCV32_ASM_FLAGS =3D DEF(GCC711RISCV_ASM_FLAGS) = -m32 -march=3Di386 +*_GCC711RISCV_RISCV32_CC_FLAGS =3D DEF(GCC711RISCV_RISCV32_CC_= FLAGS) -Os +*_GCC711RISCV_RISCV32_DLINK_FLAGS =3D DEF(GCC711RISCV_RISCV32_RIS= CV64_DLINK_FLAGS) -m elf_i386 --oformat=3Delf32-i386 +*_GCC711RISCV_RISCV32_DLINK2_FLAGS =3D DEF(GCC711RISCV_RISCV32_DLI= NK2_FLAGS) +*_GCC711RISCV_RISCV32_RC_FLAGS =3D DEF(GCC_IA32_RC_FLAGS) +*_GCC711RISCV_RISCV32_OBJCOPY_FLAGS =3D +*_GCC711RISCV_RISCV32_NASM_FLAGS =3D -f elf32 + +################## +# GCC711RISCV RISCV64 definitions +################## +*_GCC711RISCV_RISCV64_OBJCOPY_PATH =3D ENV(GCC711RISCV_RISCV64_PRE= FIX)riscv64-unknown-elf-objcopy +*_GCC711RISCV_RISCV64_CC_PATH =3D ENV(GCC711RISCV_RISCV64_PRE= FIX)riscv64-unknown-elf-gcc +*_GCC711RISCV_RISCV64_SLINK_PATH =3D ENV(GCC711RISCV_RISCV64_PRE= FIX)riscv64-unknown-elf-gcc-ar +*_GCC711RISCV_RISCV64_DLINK_PATH =3D ENV(GCC711RISCV_RISCV64_PRE= FIX)riscv64-unknown-elf-ld +*_GCC711RISCV_RISCV64_ASLDLINK_PATH =3D ENV(GCC711RISCV_RISCV64_PRE= FIX)riscv64-unknown-elf-ld +*_GCC711RISCV_RISCV64_ASM_PATH =3D ENV(GCC711RISCV_RISCV64_PRE= FIX)riscv64-unknown-elf-gcc +*_GCC711RISCV_RISCV64_PP_PATH =3D ENV(GCC711RISCV_RISCV64_PRE= FIX)riscv64-unknown-elf-gcc +*_GCC711RISCV_RISCV64_VFRPP_PATH =3D ENV(GCC711RISCV_RISCV64_PRE= FIX)riscv64-unknown-elf-gcc +*_GCC711RISCV_RISCV64_ASLCC_PATH =3D ENV(GCC711RISCV_RISCV64_PRE= FIX)riscv64-unknown-elf-gcc +*_GCC711RISCV_RISCV64_ASLPP_PATH =3D ENV(GCC711RISCV_RISCV64_PRE= FIX)riscv64-unknown-elf-gcc +*_GCC711RISCV_RISCV64_RC_PATH =3D ENV(GCC711RISCV_RISCV64_PRE= FIX)riscv64-unknown-elf-objcopy + +*_GCC711RISCV_RISCV64_ASLCC_FLAGS =3D DEF(GCC_ASLCC_FLAGS) -m64 +*_GCC711RISCV_RISCV64_ASLDLINK_FLAGS =3D DEF(GCC711RISCV_RISCV32_RIS= CV64_ASLDLINK_FLAGS) -m elf_x86_64 +*_GCC711RISCV_RISCV64_ASM_FLAGS =3D DEF(GCC711RISCV_ASM_FLAGS)=20 +*_GCC711RISCV_RISCV64_CC_FLAGS =3D DEF(GCC711RISCV_RISCV64_CC_= FLAGS) -save-temps +*_GCC711RISCV_RISCV64_DLINK_FLAGS =3D DEF(GCC711RISCV_RISCV64_DLI= NK_FLAGS) +*_GCC711RISCV_RISCV64_DLINK2_FLAGS =3D DEF(GCC711RISCV_RISCV64_DLI= NK2_FLAGS) +*_GCC711RISCV_RISCV64_RC_FLAGS =3D DEF(GCC_IA32_RC_FLAGS) +*_GCC711RISCV_RISCV64_OBJCOPY_FLAGS =3D +*_GCC711RISCV_RISCV64_NASM_FLAGS =3D -f elf64 + +##########################################################################= ########## +# # CLANG35 - This configuration is used to compile under Linux to produce # PE/COFF binaries using the clang compiler and assembler (v3.= 5 and up) # and GNU linker --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel