From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.3403.1587446895457495726 for ; Mon, 20 Apr 2020 22:28:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=HShv5ayB; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: zhiguang.liu@intel.com) IronPort-SDR: Vpm+Wdtwq2r7svu//egVd5r0wjCg6obWAFeReAAnL0dpwIFWyQ/LG1xiv4RS3uTEzzmr02s3pY 6YJwDEFuqB+w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2020 22:28:13 -0700 IronPort-SDR: ks8ZoXP+IF4Ph3TQg8O3wS7zx4m59qYLItiZrhdu+JFLsmh2lsilEM+uJPwQ8MqGqj0bNJcQpY N6EUT98EtCVw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,409,1580803200"; d="scan'208";a="291490148" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by orsmga008.jf.intel.com with ESMTP; 20 Apr 2020 22:28:13 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 20 Apr 2020 22:28:12 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 20 Apr 2020 22:28:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RyIh3EZA/CHxx+YyYFBYj/wl62vSQJwqHJ0THnpn+Js4yNYEB0WoD1K0BWwKQVeDyiy6zqElECWol1KRIrWGBEMcFWL01/MXU5jABWGcGyk63fZXTWFhecJ+AeaVn2TMsAsh9IgZbCA6cFTh2rwiZBZT/F7V4LAfuyCGuZyO0sOGURzaRey0uR0/FETxNpV9hAXJMUGlSJhPn49KhLrF9dzKQk/Et9HP/tpZUFL3cXtM/RcP0b9BvVbVzewKf59yXufR/Q6uxJSvV1Xdu1M8kcOnKhNKBB0E5N/NoORg3hki3ZR31HQRdrKed0PIfapERuhlnqujxlovCoR6SqDp6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3UnhIGs2PaUuF36qkzVFDbbwCZla0fPAh3XF48LvhqA=; b=T2zUDFMxk8MBy6ytlwD9Ek/l3cj12Fd3sqieKFMEGx3FjP4BCklIs5LBJY2GfPTK5PiYwFfXs407ztHtEyrFTYqr/myaoctxE/+0u2gezdOtsAafG9xAJfRU73i77p1x3f4BnwRCYBjb2yvVdTTlzYn08c7/JB3kRPCwuRh394FMdqcOaiKaiD65C7z56n0lz6Yv5vWEodaAZL/GrVrOSCNfn6rmz0BwBLLpmDx3kS0pOPv6Mf/lojLUm67W+rWSJADbdmbyR8TSr7M+fYPr5Zdgvfgjvr/PeqCz2Tj/GNspcTIpUXVgPZk5C6ceIYi2QWis5oevTEnWWYpxu6RrZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3UnhIGs2PaUuF36qkzVFDbbwCZla0fPAh3XF48LvhqA=; b=HShv5ayB4eHzbd27OqVHnODhrhB4fASJjFKFt2VzFiuQJW3QQglS//bhHTUcWqy2axTw4W0vw0aIPucDH0catDFwoXGfMgshUyUUwM7APx+Wib3zkwP6PArrqsadzCs9EyVM0QXgJJ4EGnVu7WrvhEQOBXcGJhNd6wdXVCCvcGU= Received: from BN7PR11MB2804.namprd11.prod.outlook.com (2603:10b6:406:ac::12) by BN7PR11MB2593.namprd11.prod.outlook.com (2603:10b6:406:ab::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Tue, 21 Apr 2020 05:28:11 +0000 Received: from BN7PR11MB2804.namprd11.prod.outlook.com ([fe80::79e2:ed1f:4d6b:532c]) by BN7PR11MB2804.namprd11.prod.outlook.com ([fe80::79e2:ed1f:4d6b:532c%7]) with mapi id 15.20.2921.030; Tue, 21 Apr 2020 05:28:11 +0000 From: "Zhiguang Liu" To: "devel@edk2.groups.io" , "abner.chang@hpe.com" CC: Gilbert Chen , Daniel Helmut Schaefer , Leif Lindholm , "Feng, Bob C" , "Gao, Liming" Subject: Re: [edk2-devel] [PATCH v3 3/3] BaseTools: BaseTools changes for RISC-V platform. Thread-Topic: [edk2-devel] [PATCH v3 3/3] BaseTools: BaseTools changes for RISC-V platform. Thread-Index: AQHWF4YVkSU2QTKkcku5N8IHEF/JEKiDC/tw Date: Tue, 21 Apr 2020 05:28:11 +0000 Message-ID: References: <20200421020017.16072-1-abner.chang@hpe.com> <20200421020017.16072-4-abner.chang@hpe.com> In-Reply-To: <20200421020017.16072-4-abner.chang@hpe.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiguang.liu@intel.com; x-originating-ip: [192.102.204.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c2b566ca-bc16-4ba5-2784-08d7e5b4c882 x-ms-traffictypediagnostic: BN7PR11MB2593: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1824; x-forefront-prvs: 038002787A x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN7PR11MB2804.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(366004)(346002)(376002)(136003)(39860400002)(396003)(8676002)(107886003)(478600001)(45080400002)(81156014)(71200400001)(52536014)(86362001)(8936002)(55016002)(186003)(4326008)(9686003)(33656002)(2906002)(66476007)(316002)(66446008)(64756008)(66556008)(26005)(110136005)(7696005)(6506007)(54906003)(5660300002)(66946007)(76116006)(53546011)(966005);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rFbDmvTt0y/g1wBKBAmZM1vTp0yih1atso+Dn2fE5lc3/T3BH1g1G+ziAfmcwxGMnQk2GSnRfHHji+5CZnKJDHz3XleNpRVLOvA4gWYTt7HVUYC+G/Bc16IVsw0XPcVtQfon9WWUM4qg9v91opbcuyeua7ajfU6Q1ZSsLsh1R+7duPJxh7O6LeUbefKmjmMLvJCEkIlcmNLcIzgA29pl/Dc5IPt0XE3cm2RP1+Q79LzQD+B8Ilka19mPEsyDkq3+sggd1xQ8sy45YnJfk8rNznjMIYuuve5DP3qMg9oQmrOKVCh8PiXgki3TEThxbWDVJMmqjoGEBn5KAcAw2K/a5jQnVjfNMlzBKX0Wazt6OqWEM390IsWFAXAwA2d2s8wIfpXH/o76eGatT8R4X84bh1vvYlZiC2nu0QOcFrcM5Ld9uoC+cxlfGJaFXKikwNXtxYVWPguZJZ2zq4GAhM60oKFag9TOSUb40IkgjL8KepRKROHINnGikjSXSdFdx2X8e2JPedn7IftVwYgiJu/99w== x-ms-exchange-antispam-messagedata: K7cNCJNP27K2OMYxoMHdk4RtmdtnnKXaSlt5+H+WWqhKeHWQ0DG4Hv3oW0xR1MzsvOJGzZ+Q7y+oe4bGPCf7rDJqWvnPfup+PYXxT8YZiSi3I9zwd0G+mWITg8xLnLwH7AjH36SFXXokjOLDDyJIwQ== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c2b566ca-bc16-4ba5-2784-08d7e5b4c882 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2020 05:28:11.6072 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: BeZoEZCk1PccfQKL3JnhcmayfF5jPGBuyW0gAPN/MQAdpaCtXbcwE/8I6rAknKI+xEpehltItRBh8PR3LqYtCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2593 Return-Path: zhiguang.liu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Abner Why this line doesn't specify the architect? +DEFINE GCC5_ASM_FLAGS =3D DEF(GCC5_RISCV_ALL_ASM_FLAG= S) -march=3DDEF(GCC5_RISCV64_ARCH) -mcmodel=3Dmedany -mabi=3Dlp64 I think it should be GCC5_ RISCV_ASM_FLAGS, or it may affect other architec= t. Thanks Zhiguang -----Original Message----- From: devel@edk2.groups.io On Behalf Of Abner Chang Sent: Tuesday, April 21, 2020 10:00 AM To: devel@edk2.groups.io Cc: abner.chang@hpe.com; Gilbert Chen ; Daniel Helmut= Schaefer ; Leif Lindholm ; Feng, Bob C ; Gao, Liming Subject: [edk2-devel] [PATCH v3 3/3] BaseTools: BaseTools changes for RISC-= V platform. Tools definitions template file changes for building EDK2 RISC-V platform. Signed-off-by: Abner Chang Co-authored-by: Gilbert Chen Co-authored-by: Daniel Helmut Schaefer Reviewed-by: Leif Lindholm Cc: Bob Feng Cc: Liming Gao Cc: Leif Lindholm Cc: Gilbert Chen --- BaseTools/Conf/tools_def.template | 53 +++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.t= emplate index 88d7ab8cab..be09a2a8f7 100755 --- 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 2020, Hewlett Packard Enterprise Development LP
# Copyright (c) Microsoft Corporation # # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -267,11 +267,12 @@ DEFINE DTC_BIN =3D ENV(DTC_PREFIX)dtc # Intel(r) ACPI Compiler from # https://acpica.org/downloads # GCC5 -Linux,Windows- Requires: -# GCC 5 with LTO support, targeting x86_64-lin= ux-gnu, aarch64-linux-gnu, or arm-linux-gnueabi +# GCC 5 with LTO support, targeting x86_64-lin= ux-gnu, aarch64-linux-gnu, arm-linux-gnueabi or riscv64-linux-gnu # Optional: # Required to build platforms or ACPI tables: # Intel(r) ACPI Compiler from # https://acpica.org/downloads +# # CLANG35 -Linux,Windows- Requires: # Clang v3.5 or later, and GNU binutils target= ing aarch64-linux-gnu or arm-linux-gnueabi # Optional: @@ -1946,6 +1947,7 @@ DEFINE GCC_IA32_RC_FLAGS =3D -I binary -O e= lf32-i386 -B i386 DEFINE GCC_X64_RC_FLAGS =3D -I binary -O elf64-x86-64 -B= i386 --rename-section .data=3D.hii DEFINE GCC_ARM_RC_FLAGS =3D -I binary -O elf32-littlearm -B= arm --rename-section .data=3D.hii DEFINE GCC_AARCH64_RC_FLAGS =3D -I binary -O elf64-littleaarch64 -B= aarch64 --rename-section .data=3D.hii +DEFINE GCC_RISCV64_RC_FLAGS =3D -I binary -O elf64-littleriscv -B= riscv --rename-section .data=3D.hii =20 # GCC Build Flag for included header file list generation DEFINE GCC_DEPS_FLAGS =3D -MMD -MF $@.deps @@ -2020,6 +2022,22 @@ DEFINE GCC5_ARM_ASLDLINK_FLAGS =3D DEF(GCC49_A= RM_ASLDLINK_FLAGS) DEFINE GCC5_AARCH64_ASLDLINK_FLAGS =3D DEF(GCC49_AARCH64_ASLDLINK_FLAGS) DEFINE GCC5_ASLCC_FLAGS =3D DEF(GCC49_ASLCC_FLAGS) -fno-lto =20 +DEFINE GCC5_RISCV_ALL_CC_FLAGS =3D -g -fshort-wchar -fn= o-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdat= a-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=3D$(BASE_NAME= )Strings -msmall-data-limit=3D0 +DEFINE GCC5_RISCV_ALL_DLINK_COMMON =3D -nostdlib -Wl,-n,-q,= --gc-sections -z common-page-size=3D0x40 +DEFINE GCC5_RISCV_ALL_DLINK_FLAGS =3D DEF(GCC5_RISCV_ALL_D= LINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-= Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map +DEFINE GCC5_RISCV_ALL_DLINK2_FLAGS =3D -Wl,--defsym=3DPECOF= F_HEADER_SIZE=3D0x220,--script=3D$(EDK_TOOLS_PATH)/Scripts/GccBase.lds +DEFINE GCC5_RISCV_ALL_ASM_FLAGS =3D -c -x assembler -ima= cros $(DEST_DIR_DEBUG)/AutoGen.h +DEFINE GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE =3D -Wno-tautological-co= mpare -Wno-pointer-compare + +DEFINE GCC5_RISCV_OPENSBI_TYPES =3D -DOPENSBI_EXTERNAL_S= BI_TYPES=3DOpensbiTypes.h + +DEFINE GCC5_RISCV64_ARCH =3D rv64imafdc +DEFINE GCC5_RISCV32_RISCV64_ASLDLINK_FLAGS =3D DEF(GCC5_RISCV_ALL_DLINK_CO= MMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable +DEFINE GCC5_RISCV64_CC_FLAGS =3D DEF(GCC5_RISCV_ALL_CC_FLAGS= ) DEF(GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE) DEF(GCC5_RISCV_OPENSBI_TYPES= ) -march=3DDEF(GCC5_RISCV64_ARCH) -fno-builtin -fno-builtin-memcpy -fno-sta= ck-protector -Wno-address -fno-asynchronous-unwind-tables -Wno-unused-but-s= et-variable -fpack-struct=3D8 -mcmodel=3Dmedany -mabi=3Dlp64 -mno-relax +DEFINE GCC5_RISCV64_DLINK_FLAGS =3D DEF(GCC5_RISCV_ALL_DLINK_FL= AGS) -Wl,-melf64lriscv,--oformat=3Delf64-littleriscv,--no-relax +DEFINE GCC5_RISCV64_DLINK2_FLAGS =3D DEF(GCC5_RISCV_ALL_DLINK2_F= LAGS) +DEFINE GCC5_ASM_FLAGS =3D DEF(GCC5_RISCV_ALL_ASM_FLAG= S) -march=3DDEF(GCC5_RISCV64_ARCH) -mcmodel=3Dmedany -mabi=3Dlp64 + ##########################################################################= ########## # # GCC 4.8 - This configuration is used to compile under Linux to produce @@ -2464,6 +2482,37 @@ RELEASE_GCC5_AARCH64_DLINK_XIPFLAGS =3D -z common-pa= ge-size=3D0x20 NOOPT_GCC5_AARCH64_DLINK_FLAGS =3D DEF(GCC5_AARCH64_DLINK_FLAGS) -O0 NOOPT_GCC5_AARCH64_DLINK_XIPFLAGS =3D -z common-page-size=3D0x20 -O0 =20 +##########################################################################= ########## +# +# GCC RISC-V This configuration is used to compile under Linux to produce +# PE/COFF binaries using GCC RISC-V tool chain +# +##########################################################################= ########## + +################## +# GCC5 RISCV64 definitions +################## +*_GCC5_RISCV64_OBJCOPY_PATH =3D ENV(GCC5_RISCV64_PREFIX)objcopy +*_GCC5_RISCV64_CC_PATH =3D ENV(GCC5_RISCV64_PREFIX)gcc +*_GCC5_RISCV64_SLINK_PATH =3D ENV(GCC5_RISCV64_PREFIX)gcc-ar +*_GCC5_RISCV64_DLINK_PATH =3D ENV(GCC5_RISCV64_PREFIX)gcc +*_GCC5_RISCV64_ASLDLINK_PATH =3D ENV(GCC5_RISCV64_PREFIX)gcc +*_GCC5_RISCV64_ASM_PATH =3D ENV(GCC5_RISCV64_PREFIX)gcc +*_GCC5_RISCV64_PP_PATH =3D ENV(GCC5_RISCV64_PREFIX)gcc +*_GCC5_RISCV64_VFRPP_PATH =3D ENV(GCC5_RISCV64_PREFIX)gcc +*_GCC5_RISCV64_ASLCC_PATH =3D ENV(GCC5_RISCV64_PREFIX)gcc +*_GCC5_RISCV64_ASLPP_PATH =3D ENV(GCC5_RISCV64_PREFIX)gcc +*_GCC5_RISCV64_RC_PATH =3D ENV(GCC5_RISCV64_PREFIX)objcopy + +*_GCC5_RISCV64_ASLCC_FLAGS =3D DEF(GCC_ASLCC_FLAGS) +*_GCC5_RISCV64_ASLDLINK_FLAGS =3D DEF(GCC5_RISCV32_RISCV64_ASLDLINK_= FLAGS) +*_GCC5_RISCV64_ASM_FLAGS =3D DEF(GCC5_ASM_FLAGS) +*_GCC5_RISCV64_CC_FLAGS =3D DEF(GCC5_RISCV64_CC_FLAGS) -save-t= emps +*_GCC5_RISCV64_DLINK_FLAGS =3D DEF(GCC5_RISCV64_DLINK_FLAGS) +*_GCC5_RISCV64_DLINK2_FLAGS =3D DEF(GCC5_RISCV64_DLINK2_FLAGS) +*_GCC5_RISCV64_RC_FLAGS =3D DEF(GCC_RISCV64_RC_FLAGS) +*_GCC5_RISCV64_OBJCOPY_FLAGS =3D + ##########################################################################= ########## # # CLANG35 - This configuration is used to compile under Linux to produce --=20 2.25.0 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#57686): https://edk2.groups.io/g/devel/message/57686 Mute This Topic: https://groups.io/mt/73164986/1779286 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [zhiguang.liu@intel.com] -=3D-=3D-=3D-=3D-=3D-=3D