summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorLulu Cheng <chenglulu@loongson.cn>2022-07-29 09:44:52 +0800
committerLulu Cheng <chenglulu@loongson.cn>2022-07-29 14:58:39 +0800
commit201e8d9f82444403682cd583ce0a03e3e3dd2b73 (patch)
tree7821cdc35f8f9f3528c75062fe25b34cf4eb5d49 /gcc/configure.ac
parent0c0feae60aa2f1a29d2624399cbcc6b1a52cc07c (diff)
downloadgcc-201e8d9f82444403682cd583ce0a03e3e3dd2b73.tar.gz
LoongArch: Define the macro ASM_PREFERRED_EH_DATA_FORMAT by checking the assembler's support for eh_frame encoding.
.eh_frame DW_EH_PE_pcrel encoding format is not supported by gas <= 2.39. Check if the assembler support DW_EH_PE_PCREL encoding and define .eh_frame encoding type. gcc/ChangeLog: * config.in: Regenerate. * config/loongarch/loongarch.h (ASM_PREFERRED_EH_DATA_FORMAT): Select the value of the macro definition according to whether HAVE_AS_EH_FRAME_PCREL_ENCODING_SUPPORT is defined. * configure: Regenerate. * configure.ac: Reinstate HAVE_AS_EH_FRAME_PCREL_ENCODING_SUPPORT test.
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index e5f708c6b38..f70b6c24fda 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5302,6 +5302,14 @@ x:
[a:pcalau12i $t0,%pc_hi20(a)],,
[AC_DEFINE(HAVE_AS_EXPLICIT_RELOCS, 1,
[Define if your assembler supports explicit relocation.])])
+ gcc_GAS_CHECK_FEATURE([eh_frame pcrel encoding support],
+ gcc_cv_as_loongarch_eh_frame_pcrel_encoding_support,,
+ [.cfi_startproc
+ .cfi_personality 0x9b,a
+ .cfi_lsda 0x1b,b
+ .cfi_endproc],,
+ [AC_DEFINE(HAVE_AS_EH_FRAME_PCREL_ENCODING_SUPPORT, 1,
+ [Define if your assembler supports eh_frame pcrel encoding.])])
;;
s390*-*-*)
gcc_GAS_CHECK_FEATURE([.gnu_attribute support],