]> gcc.gnu.org Git - gcc.git/commit
LoongArch: Don't default to -mno-explicit-relocs if -mno-relax
authorXi Ruoyao <xry111@xry111.site>
Thu, 22 Feb 2024 09:58:45 +0000 (17:58 +0800)
committerXi Ruoyao <xry111@xry111.site>
Fri, 23 Feb 2024 10:11:49 +0000 (18:11 +0800)
commitbefe440b8d7d49461a2746cdd0fb2c7ab2acb76b
tree2c497444d04baa680102c4df339d081f78b12f84
parente0dabc83e625c500aa215f72c6a8b52dbdd63d0c
LoongArch: Don't default to -mno-explicit-relocs if -mno-relax

To improve Binutils compatibility we've had to backport relaxation
support.  But if a user just updates to GCC 13.3 and sticks with
Binutils 2.41, there is no reason to use -mno-explicit-relocs as the
default because we are turning off relaxation for Binutils 2.41 (it
lacks conditional branch relaxation support) anyway.

So like GCC 14, make the default of -m[no-]explicit-relocs depend on
-m[no-]relax instead of HAVE_AS_MRELAX_OPTION.  Also update the doc to
reflect the behavior change.

gcc/ChangeLog:

* config/loongarch/genopts/loongarch.opt.in
(TARGET_EXPLICIT_RELOCS): Init to M_OPTION_NOT_SEEN.
* config/loongarch/loongarch.opt: Regenerate.
* config/loongarch/loongarch.cc
(loongarch_option_override_internal): Set the default of
TARGET_EXPLICIT_RELOCS to HAVE_AS_EXPLICIT_RELOCS
&& !loongarch_mrelax.
* doc/invoke.texi (-m[no-]explicit-relocs): Update for
LoongArch.
gcc/config/loongarch/genopts/loongarch.opt.in
gcc/config/loongarch/loongarch.cc
gcc/config/loongarch/loongarch.opt
gcc/doc/invoke.texi
This page took 0.208096 seconds and 5 git commands to generate.