From: Alan Modra Date: Tue, 7 May 2019 23:56:36 +0000 (+0930) Subject: xtensa ignores option --no-link-relax X-Git-Tag: binutils-2_33~1352 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9632a526cae4cb10276e39d8c4bd1f649d13f8e8;p=external%2Fbinutils.git xtensa ignores option --no-link-relax md_begin happens after md_parse_option. * config/tc-xtensa.c (opt_linkrelax): New variable. (md_parse_option): Set it here. (md_begin): Copy opt_linkrelax to linkrelax. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 9ba8918..7234605 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2019-05-08 Alan Modra + + * config/tc-xtensa.c (opt_linkrelax): New variable. + (md_parse_option): Set it here. + (md_begin): Copy opt_linkrelax to linkrelax. + 2019-05-07 Alexandre Oliva * testsuite/gas/elf/dwarf2-18.d: Xfail mep-*. diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index 9350beb..320e7af 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -628,6 +628,7 @@ static bfd_boolean maybe_has_short_loop = FALSE; static bfd_boolean workaround_close_loop_end = FALSE; static bfd_boolean maybe_has_close_loop_end = FALSE; static bfd_boolean enforce_three_byte_loop_align = FALSE; +static bfd_boolean opt_linkrelax = TRUE; /* When workaround_short_loops is TRUE, all loops with early exits must have at least 3 instructions. workaround_all_short_loops is a modifier @@ -827,10 +828,10 @@ md_parse_option (int c, const char *arg) as_warn (_("--no-density option is ignored")); return 1; case option_link_relax: - linkrelax = 1; + opt_linkrelax = TRUE; return 1; case option_no_link_relax: - linkrelax = 0; + opt_linkrelax = FALSE; return 1; case option_flix: produce_flix = FLIX_ALL; @@ -5258,7 +5259,7 @@ md_begin (void) xtensa_default_isa = xtensa_isa_init (0, 0); isa = xtensa_default_isa; - linkrelax = 1; + linkrelax = opt_linkrelax; /* Set up the literal sections. */ memset (&default_lit_sections, 0, sizeof (default_lit_sections));