From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mx.groups.io with SMTP id smtpd.web10.1017.1685725382378714397 for ; Fri, 02 Jun 2023 10:03:02 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=XAXapkXK; spf=pass (domain: ventanamicro.com, ip: 209.85.216.44, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-2568fc3d8a9so1072721a91.2 for ; Fri, 02 Jun 2023 10:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1685725381; x=1688317381; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=O+UTdRcl90LTR0M3F6M5tQzCEgv7N3tGBkBBw1NlTIU=; b=XAXapkXKqno8T2j4+uHK8Wv0iQTqq8VN6219xJF4GBcHu9dm9fb8RJRsJMRaHBoBrK suiHF/TCPYesgRpy59a+4qeL//sjM8ecfoc3zp+sL4BZrJ/N/ODYoXoqew+zVMi0z0OP 0MtzO1svqE8YHE+ZeBwob8cyjXK4oYIbNIbHJDzdMfncqqJR9fV2ZwV3/xwJRsSc7eBk 32K/is/joXGvXr8wnQKxxlb2nTOWnnFWXcGr6vmtngnnpeCT+0gmBCxNXnt6qdsWB6n1 rAOtMDNY+hZVaYQe2qTRkORWDstFJyUVMgxmue7d+65qlXxx2/s+tcu13uvQhiJD+uUn 8GjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685725381; x=1688317381; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=O+UTdRcl90LTR0M3F6M5tQzCEgv7N3tGBkBBw1NlTIU=; b=fC9I/T7GxKJ3m2Gj0X+hMuzfewxo80KXSAo4POMbqVX7iOf84SIiwZ3/ReE1wJmbkr ITWdkIFIc0/BalzthWM/piUJtLTAYPWoneVPWktzKpO7hrUrlRXz97eXs5Ylp1X2MImG gmQ7o9leXuZxUs9h01DKnGI7LizfFq5hpHAA5UesUx6x7VQhfhE5ur5EwSzAuK0M0Lkc zJNeJOAfZXhrpgHkqsaeZRxX/ucLiMdeNglRVan7s0M9EU+dJaagjekTxxZiaQMuijnN SQGw9efE5qympe4ElP0EoKf/mellurCil2Q47x+c4jrLf/s/JAnayC9wGysz5MYyP8g1 kNTw== X-Gm-Message-State: AC+VfDwdl/NPAbrTTThYkSqFW0Lm2BDfVHN9nQOQyuWi4jc6U489OSWI voCGRDT9inrGDsCS/O88ajiDyoVzj4QLPEs9qOo= X-Google-Smtp-Source: ACHHUZ44kOFCJ4xpVG0yMjF0Wa9usa4SoLiS1q0Zt6pf/gQgpL3PGlDq8hApoaTzbtBInwtvQkfaxQ== X-Received: by 2002:a17:90a:1a12:b0:255:ab1c:e36 with SMTP id 18-20020a17090a1a1200b00255ab1c0e36mr519138pjk.2.1685725381646; Fri, 02 Jun 2023 10:03:01 -0700 (PDT) Return-Path: Received: from kerodi.Dlink ([106.51.186.3]) by smtp.gmail.com with ESMTPSA id cl9-20020a17090af68900b0025643e5da99sm3341019pjb.37.2023.06.02.10.02.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 10:03:01 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Sunil V L , Rebecca Cran , Liming Gao , Bob Feng , Yuwei Chen , Andrei Warkentin Subject: [PATCH 1/1] BaseTools/tools_def: Add "-fno-unwind-tables" to GCC5_RISCV64_CC_FLAGS Date: Fri, 2 Jun 2023 22:32:54 +0530 Message-Id: <20230602170254.394449-1-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit gcc-13 for RISC-V enables unwind tables by default similar to ARM64. This generates .eh_frame_hdr section which is not handled well by GenFw causing failures. Disable the unwind tables by adding -fno-unwind-tables flag similar to [1]. [1] - https://github.com/tianocore/edk2/commit/cbf00651eda6 Signed-off-by: Sunil V L Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Cc: Andrei Warkentin --- 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 92421e3d0118..90f4105506e5 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -858,7 +858,7 @@ DEFINE GCC5_RISCV_OPENSBI_TYPES = -DOPENSBI_EXTERNAL_SBI_TYPES DEFINE GCC5_RISCV64_ARCH = rv64gc DEFINE GCC5_RISCV32_RISCV64_ASLDLINK_FLAGS = DEF(GCC5_RISCV_ALL_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable -DEFINE GCC5_RISCV64_CC_FLAGS = DEF(GCC5_RISCV_ALL_CC_FLAGS) DEF(GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE) DEF(GCC5_RISCV_OPENSBI_TYPES) -march=DEF(GCC5_RISCV64_ARCH) -fno-builtin -fno-builtin-memcpy -fno-stack-protector -Wno-address -fno-asynchronous-unwind-tables -Wno-unused-but-set-variable -fpack-struct=8 -mcmodel=medany -mabi=lp64 -mno-relax +DEFINE GCC5_RISCV64_CC_FLAGS = DEF(GCC5_RISCV_ALL_CC_FLAGS) DEF(GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE) DEF(GCC5_RISCV_OPENSBI_TYPES) -march=DEF(GCC5_RISCV64_ARCH) -fno-builtin -fno-builtin-memcpy -fno-stack-protector -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -Wno-unused-but-set-variable -fpack-struct=8 -mcmodel=medany -mabi=lp64 -mno-relax DEFINE GCC5_RISCV64_DLINK_FLAGS = DEF(GCC5_RISCV_ALL_DLINK_FLAGS) -Wl,-melf64lriscv,--oformat=elf64-littleriscv,--no-relax DEFINE GCC5_RISCV64_DLINK2_FLAGS = DEF(GCC5_RISCV_ALL_DLINK2_FLAGS) DEFINE GCC5_RISCV64_ASM_FLAGS = DEF(GCC5_RISCV_ALL_ASM_FLAGS) -march=DEF(GCC5_RISCV64_ARCH) -mcmodel=medany -mabi=lp64 -- 2.34.1