gcc/0137-LoongArch-When-checking-whether-the-assembler-suppor.patch

55 lines
1.8 KiB
Diff
Raw Permalink Normal View History

From 3580ce2b8c57967117e55af48beba0aaa6257e8b Mon Sep 17 00:00:00 2001
From: Lulu Cheng <chenglulu@loongson.cn>
Date: Wed, 21 Feb 2024 11:17:14 +0800
Subject: [PATCH 137/188] LoongArch: When checking whether the assembler
supports conditional branch relaxation, add compilation parameter
"--fatal-warnings" to the assembler.
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 | 2 +-
gcc/configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/configure b/gcc/configure
index eecfe60d6..f31395017 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -28947,7 +28947,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=$?
diff --git a/gcc/configure.ac b/gcc/configure.ac
index d1032440d..35f2c657f 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5349,7 +5349,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
--
2.43.0