Thank you very much, we will send a new patch use this.
在 2023/9/14 下午8:09, Xi Ruoyao 写道:
On Thu, 2023-09-14 at 19:54 +0800, chenglulu wrote:
Sorry, it's my problem. We will modify it as soon as possible.
Try this:
diff --git a/gcc/configure.ac b/gcc/configure.ac
index cb4be11facd..10027a4aaaa 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3229,10 +3229,18 @@ AC_MSG_RESULT($gcc_cv_ld_ro_rw_mix)
gcc_AC_INITFINI_ARRAY
+# Some assemblers (GNU as for LoongArch) generates relocations for
+# leb128 symbol arithmetic for relaxation, we need to disable relaxation
+# probing leb128 support then.
+gcc_GAS_CHECK_FEATURE([-mno-relax support],
+ gcc_cv_as_mno_relax,[-mno-relax],[.text],,
+ [check_leb128_asflags=-mno-relax])
+
# Check if we have .[us]leb128, and support symbol arithmetic with it.
# Older versions of GAS and some non-GNU assemblers, have a bugs handling
# these directives, even when they appear to accept them.
-gcc_GAS_CHECK_FEATURE([.sleb128 and .uleb128], gcc_cv_as_leb128,,
+gcc_GAS_CHECK_FEATURE([.sleb128 and .uleb128], gcc_cv_as_leb128,
+[$check_leb128_asflags],
[ .data
.uleb128 L2 - L1
L1: