re PR target/37283 (Cannot build crtbegin.o for ARM)
PR target/37283 * opts.c (decode_options): Handle more relationships among unit-at-a-time, toplevel-reorder, and section-anchors. Co-Authored-By: Samuel Tardieu <sam@rfc1149.net> From-SVN: r140040
This commit is contained in:
parent
57f59a4580
commit
93a4f5e06e
2 changed files with 29 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-09-05 Janis Johnson <janis187@us.ibm.com>
|
||||
Samuel Tardieu <sam@rfc1149.net>
|
||||
|
||||
PR target/37283
|
||||
* opts.c (decode_options): Handle more relationships among
|
||||
unit-at-a-time, toplevel-reorder, and section-anchors.
|
||||
|
||||
2008-09-05 David Daney <ddaney@avtrex.com>
|
||||
|
||||
* doc/install.texi (--enable-reduced-reflection): Document new option.
|
||||
|
|
30
gcc/opts.c
30
gcc/opts.c
|
@ -1008,21 +1008,35 @@ decode_options (unsigned int argc, const char **argv)
|
|||
|
||||
handle_options (argc, argv, lang_mask);
|
||||
|
||||
/* -fno-unit-at-a-time and -fno-toplevel-reorder handling. */
|
||||
/* Handle related options for unit-at-a-time, toplevel-reorder, and
|
||||
section-anchors. */
|
||||
if (!flag_unit_at_a_time)
|
||||
{
|
||||
if (flag_section_anchors == 1)
|
||||
error ("Section anchors must be disabled when unit-at-a-time "
|
||||
"is disabled.");
|
||||
flag_section_anchors = 0;
|
||||
if (flag_toplevel_reorder == 1)
|
||||
error ("Toplevel reorder must be disabled when unit-at-a-time "
|
||||
"is disabled.");
|
||||
flag_toplevel_reorder = 0;
|
||||
}
|
||||
else if (!optimize && flag_toplevel_reorder == 2)
|
||||
/* We disable toplevel reordering at -O0 to disable transformations that
|
||||
might be surprising to end users and to get -fno-toplevel-reorder
|
||||
tested, but we keep section anchors. */
|
||||
flag_toplevel_reorder = 0;
|
||||
else if (!flag_toplevel_reorder)
|
||||
if (!optimize)
|
||||
{
|
||||
/* Unless the user has asked for section anchors, we disable toplevel
|
||||
reordering at -O0 to disable transformations that might be surprising
|
||||
to end users and to get -fno-toplevel-reorder tested. */
|
||||
if (flag_toplevel_reorder == 2 && flag_section_anchors != 1)
|
||||
{
|
||||
flag_toplevel_reorder = 0;
|
||||
flag_section_anchors = 0;
|
||||
}
|
||||
}
|
||||
if (!flag_toplevel_reorder)
|
||||
{
|
||||
if (flag_section_anchors == 1)
|
||||
error ("section anchors must be disabled when toplevel reorder is disabled");
|
||||
error ("section anchors must be disabled when toplevel reorder"
|
||||
" is disabled");
|
||||
flag_section_anchors = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue