summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorSunil V L <sunilvl@ventanamicro.com>2023-06-02 10:34:20 +0530
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-06-27 18:20:06 +0000
commit1a39bdf2c53858ebb39e6de1362203c65c163c63 (patch)
treeed359cbf0d229daa4fe234b5fc2123913662181e /BaseTools
parentea7a3015a2404e1358218463dd25df5ae7615352 (diff)
downloadedk2-1a39bdf2c53858ebb39e6de1362203c65c163c63.tar.gz
edk2-1a39bdf2c53858ebb39e6de1362203c65c163c63.tar.bz2
edk2-1a39bdf2c53858ebb39e6de1362203c65c163c63.zip
BaseTools/tools_def: Add "-fno-unwind-tables" to GCC5_RISCV64_CC_FLAGS
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 <sunilvl@ventanamicro.com> Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Andrei Warkentin <andrei.warkentin@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
Diffstat (limited to 'BaseTools')
-rwxr-xr-xBaseTools/Conf/tools_def.template2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 92421e3d01..90f4105506 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