]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
LoongArch: When checking whether the assembler supports conditional branch relaxation...
authorLulu Cheng <chenglulu@loongson.cn>
Wed, 21 Feb 2024 03:17:14 +0000 (11:17 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Fri, 23 Feb 2024 03:18:40 +0000 (11:18 +0800)
In binutils 2.40 and earlier versions, only a warning will be reported
when a relocation immediate value is out of bounds. As a result,
the value of the macro HAVE_AS_COND_BRANCH_RELAXATION will also be
defined as 1 when the assembler does not support conditional branch
relaxation. Therefore, add the compilation option "--fatal-warnings"
to avoid this problem.

gcc/ChangeLog:

* configure: Regenerate.
* configure.ac: Add parameter "--fatal-warnings" to assemble
when checking whether the assemble support conditional branch
relaxation.

gcc/configure
gcc/configure.ac

index 41b978b0380b2d3f05a4ede08e40e878e4b34a56..f1d434fede0f6315ba8235c6189c87896d2cf498 100755 (executable)
@@ -31136,7 +31136,7 @@ else
        nop
        .endr
        beq $a0,$a1,a' > conftest.s
-    if { ac_try='$gcc_cv_as $gcc_cv_as_flags  -o conftest.o conftest.s >&5'
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
index 72012d61e67196f4cf35c9d0ef23943cc3cfcbf7..9ebc578e4cc200942de3777d5c183d11a84da899 100644 (file)
@@ -5486,7 +5486,7 @@ x:
                [Define if your assembler supports -mrelax option.])])
     gcc_GAS_CHECK_FEATURE([conditional branch relaxation support],
       gcc_cv_as_loongarch_cond_branch_relax,
-      [],
+      [--fatal-warnings],
       [a:
        .rept 32769
        nop