* [PATCH v1] LoongArch: When checking whether the assembler supports conditional branch relaxation, add compilation parameter "--fatal-warnings" to the assembler.
@ 2024-02-21 3:30 Lulu Cheng
2024-02-23 3:19 ` [pushed][PATCH " chenglulu
0 siblings, 1 reply; 2+ messages in thread
From: Lulu Cheng @ 2024-02-21 3:30 UTC (permalink / raw)
To: gcc-patches; +Cc: xry111, i, xuchenghua, chenglulu
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 41b978b0380..f1d434fede0 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -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=$?
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 72012d61e67..9ebc578e4cc 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -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
--
2.39.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [pushed][PATCH v1] LoongArch: When checking whether the assembler supports conditional branch relaxation, add compilation parameter "--fatal-warnings" to the assembler.
2024-02-21 3:30 [PATCH v1] LoongArch: When checking whether the assembler supports conditional branch relaxation, add compilation parameter "--fatal-warnings" to the assembler Lulu Cheng
@ 2024-02-23 3:19 ` chenglulu
0 siblings, 0 replies; 2+ messages in thread
From: chenglulu @ 2024-02-23 3:19 UTC (permalink / raw)
To: gcc-patches; +Cc: xry111, i, xuchenghua
Pushed to r14-9142.
在 2024/2/21 上午11:30, Lulu Cheng 写道:
> 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 41b978b0380..f1d434fede0 100755
> --- a/gcc/configure
> +++ b/gcc/configure
> @@ -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=$?
> diff --git a/gcc/configure.ac b/gcc/configure.ac
> index 72012d61e67..9ebc578e4cc 100644
> --- a/gcc/configure.ac
> +++ b/gcc/configure.ac
> @@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-23 3:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-21 3:30 [PATCH v1] LoongArch: When checking whether the assembler supports conditional branch relaxation, add compilation parameter "--fatal-warnings" to the assembler Lulu Cheng
2024-02-23 3:19 ` [pushed][PATCH " chenglulu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).