From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 01B46D8067E for ; Fri, 3 Nov 2023 16:59:17 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LQDdCEDCyjyHaurIJeVwkU0FuMDp8ZgakmWW5xwpKN0=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1699030756; v=1; b=iYcrOVkKFr9wX+K3GVhT86JDg351v5ZQuGh9ItAxXXF2ZL8p1YCXIA3LxaW33syKBq70oI+3 zl+VS8/ZybSGZnQFSONqEEmjaWL67xNS9Ao4qZx2rKvi4EHcelXc4DymN7g2ZADlkoJNifpdZQL w2+FJw6qb1O+W1ikTL7ifO/4= X-Received: by 127.0.0.2 with SMTP id wTs8YY7687511x8u5aOYxYg2; Fri, 03 Nov 2023 09:59:16 -0700 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web10.58620.1699029480684091231 for ; Fri, 03 Nov 2023 09:38:00 -0700 X-Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A3C0mqr008931; Fri, 3 Nov 2023 16:37:48 GMT X-Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3u4ss99e0s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Nov 2023 16:37:47 +0000 X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3A3Gblnf022641 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 3 Nov 2023 16:37:47 GMT X-Received: from hu-yepings-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Fri, 3 Nov 2023 09:37:46 -0700 From: "Yeping Song" To: CC: Yeping Song , Rebecca Cran , Liming Gao , Bob Feng , "Yuwei Chen" , Ard Biesheuvel , "Leif Lindholm" , Sami Mujawar Subject: [edk2-devel] [PATCH 1/1] BaseTools/tools_def: drop -mgeneral-regs-only for AArch64 CLANGDWARF Date: Fri, 3 Nov 2023 09:37:39 -0700 Message-ID: <20231103163739.68644-1-quic_yepings@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-ORIG-GUID: kUSIeVOIy_2KZnJ1gZVVNFIzjth66zIc X-Proofpoint-GUID: kUSIeVOIy_2KZnJ1gZVVNFIzjth66zIc Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,quic_yepings@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: whDHd6rTXQCcIEONby4YR01Ux7686176AA= Content-Transfer-Encoding: 8bit Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=iYcrOVkK; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=quicinc.com (policy=none) Commit 0df6c8c157af9 ("BaseTools/tools_def AARCH64: avoid SIMD registers in XIP code") adds -mgeneral-regs-only to GCC_AARCH64_CC_XIPFLAGS, in order to avoid a bug present in certain versions of GCC. This was never a problem for clang. That's given the history of what the problem is. Then we can describe how we fix it: Change *_CLANGDWARF_AARCH64_CC_XIPFLAGS to set the required -mstrict-align option instead of importing the whole GCC variable. Signed-off-by: Yeping Song Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar --- BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 5bd5283655ea..c34ecfd557c5 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -2015,7 +2015,7 @@ DEFINE CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_ *_CLANGDWARF_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS) DEF(GCC_AARCH64_RC_BTI_FLAGS) *_CLANGDWARF_AARCH64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGDWARF_AARCH64_TARGET) $(PLATFORM_FLAGS) *_CLANGDWARF_AARCH64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGDWARF_AARCH64_TARGET) -*_CLANGDWARF_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS) +*_CLANGDWARF_AARCH64_CC_XIPFLAGS = -mstrict-align DEBUG_CLANGDWARF_AARCH64_CC_FLAGS = DEF(CLANGDWARF_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O1 DEBUG_CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_DLINK_FLAGS) -flto -Wl,-O1 -fuse-ld=lld -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wl,--no-pie,--no-relax -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110647): https://edk2.groups.io/g/devel/message/110647 Mute This Topic: https://groups.io/mt/102368361/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-