From: H.J. Lu Date: Thu, 24 Jan 2008 18:57:12 +0000 (+0000) Subject: re PR driver/34904 (-march=native doesn't work with multiple input files) X-Git-Tag: releases/gcc-4.3.0~422 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3371362cb0da76cbc80c8b96a9fb08ed7da34dbf;p=thirdparty%2Fgcc.git re PR driver/34904 (-march=native doesn't work with multiple input files) 2008-01-24 H.J. Lu PR driver/34904 * gcc.c (SWITCH_OK): Removed. (SWITCH_LIVE): Changed to bit. (SWITCH_FALSE): Likewise. (SWITCH_IGNORE): Likewise. (switchstr): Change live_cond to unsigned int. (process_command): Replace SWITCH_OK with 0. (do_self_spec): Likewise. (set_collect_gcc_options): Check the SWITCH_IGNORE bit. (give_switch): Likewise. (used_arg): Likewise. (do_spec_1): Set the SWITCH_IGNORE bit. (check_live_switch): Check both SWITCH_LIVE and SWITCH_FALSE bits. Set the SWITCH_LIVE bit. From-SVN: r131802 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4047d8612166..40a5823dd7dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2008-01-24 H.J. Lu + + PR driver/34904 + * gcc.c (SWITCH_OK): Removed. + (SWITCH_LIVE): Changed to bit. + (SWITCH_FALSE): Likewise. + (SWITCH_IGNORE): Likewise. + (switchstr): Change live_cond to unsigned int. + (process_command): Replace SWITCH_OK with 0. + (do_self_spec): Likewise. + (set_collect_gcc_options): Check the SWITCH_IGNORE bit. + (give_switch): Likewise. + (used_arg): Likewise. + (do_spec_1): Set the SWITCH_IGNORE bit. + (check_live_switch): Check both SWITCH_LIVE and SWITCH_FALSE + bits. Set the SWITCH_LIVE bit. + 2008-01-24 Andreas Krebbel * config/s390/s390.h (MOVE_RATIO): Define new target macro. diff --git a/gcc/gcc.c b/gcc/gcc.c index b03e510bf5b3..b63c0da1d1aa 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3082,24 +3082,22 @@ See %s for instructions.", If a switch uses following arguments, then the `part1' field is the switch itself and the `args' field is a null-terminated vector containing the following arguments. - The `live_cond' field is: - 0 when initialized - 1 if the switch is true in a conditional spec, - -1 if false (overridden by a later switch) - -2 if this switch should be ignored (used in %part1 = &argbuf[i][1]; sw->args = 0; - sw->live_cond = SWITCH_OK; + sw->live_cond = 0; sw->validated = 0; sw->ordering = 0; } @@ -5289,7 +5287,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) if (!strncmp (switches[i].part1, p, len - have_wildcard) && (have_wildcard || switches[i].part1[len] == '\0')) { - switches[i].live_cond = SWITCH_IGNORE; + switches[i].live_cond |= SWITCH_IGNORE; switches[i].validated = 1; } @@ -5907,7 +5905,8 @@ check_live_switch (int switchnum, int prefix_length) /* If we already processed this switch and determined if it was live or not, return our past determination. */ if (switches[switchnum].live_cond != 0) - return switches[switchnum].live_cond > 0; + return ((switches[switchnum].live_cond & SWITCH_LIVE) != 0 + && (switches[switchnum].live_cond & SWITCH_FALSE) == 0); /* Now search for duplicate in a manner that depends on the name. */ switch (*name) @@ -5954,7 +5953,7 @@ check_live_switch (int switchnum, int prefix_length) } /* Otherwise the switch is live. */ - switches[switchnum].live_cond = SWITCH_LIVE; + switches[switchnum].live_cond |= SWITCH_LIVE; return 1; } @@ -5969,7 +5968,7 @@ check_live_switch (int switchnum, int prefix_length) static void give_switch (int switchnum, int omit_first_word) { - if (switches[switchnum].live_cond == SWITCH_IGNORE) + if ((switches[switchnum].live_cond & SWITCH_IGNORE) != 0) return; if (!omit_first_word) @@ -7135,7 +7134,7 @@ used_arg (const char *p, int len) mswitches = XNEWVEC (struct mswitchstr, n_mdswitches + (n_switches ? n_switches : 1)); for (i = 0; i < n_switches; i++) - if (switches[i].live_cond != SWITCH_IGNORE) + if ((switches[i].live_cond & SWITCH_IGNORE) == 0) { int xlen = strlen (switches[i].part1); for (j = 0; j < cnt; j++)