From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7877) id B2EA3385840C; Fri, 23 Feb 2024 03:19:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2EA3385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708658350; bh=zXFfSc8hk+SLm4fSIk8OT8uajHcOLG8n1/b1DSlEaz8=; h=From:To:Subject:Date:From; b=W5AOcL4SMpOZAyN1BnCcp9GEI56Zs76DzPMqjm0wJgGviodc4HB8BZN4qzx16hy0j 5Syx7aJrOxjE6dqkr6s53o9TRkx3KpQLPa4lZdDb1YH3nSU+PsZ+ji5udSooap5ykD NLilEHW6YTybUwPuf1fLDAb4i6HTqIfA/veuakoE= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: LuluCheng To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-9142] LoongArch: When checking whether the assembler supports conditional branch relaxation, add compilati X-Act-Checkin: gcc X-Git-Author: Lulu Cheng X-Git-Refname: refs/heads/master X-Git-Oldrev: 77de8b722db811e0d95af503552cd2acad8deaad X-Git-Newrev: 33abf74108f37fb7792572e538617fd15c8ade29 Message-Id: <20240223031910.B2EA3385840C@sourceware.org> Date: Fri, 23 Feb 2024 03:19:10 +0000 (GMT) List-Id: https://gcc.gnu.org/g:33abf74108f37fb7792572e538617fd15c8ade29 commit r14-9142-g33abf74108f37fb7792572e538617fd15c8ade29 Author: Lulu Cheng Date: Wed Feb 21 11:17:14 2024 +0800 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. Diff: --- gcc/configure | 2 +- gcc/configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/configure b/gcc/configure index 41b978b0380b..f1d434fede0f 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 72012d61e671..9ebc578e4cc2 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