Skip to content
Snippets Groups Projects
Commit 58af788d authored by YunQiang Su's avatar YunQiang Su
Browse files

MIPS: Accept arguments for -mexplicit-relocs

GAS introduced explicit relocs since 2001, and %pcrel_hi/low were
introduced in 2014.  In future, we may introduce more.

Let's convert -mexplicit-relocs option, and accpet options:
    none, base, pcrel.

We also update gcc/configure.ac to set the value to option
the gas support when GCC itself is built.

gcc
	* configure.ac: Detect the explicit relocs support for
	mips, and define C macro MIPS_EXPLICIT_RELOCS.
	* config.in: Regenerated.
	* configure: Regenerated.
	* doc/invoke.texi(MIPS Options): Add -mexplicit-relocs.
	* config/mips/mips-opts.h: Define enum mips_explicit_relocs.
	* config/mips/mips.cc(mips_set_compression_mode): Sorry if
	!TARGET_EXPLICIT_RELOCS instead of just set it.
	* config/mips/mips.h: Define TARGET_EXPLICIT_RELOCS and
	TARGET_EXPLICIT_RELOCS_PCREL with mips_opt_explicit_relocs.
	* config/mips/mips.opt: Introduce -mexplicit-relocs= option
	and define -m(no-)explicit-relocs as aliases.
parent 7fcdb501
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment