Ensure that last optimisation level set overrides any previous levels.
From-SVN: r24347
This commit is contained in:
parent
f868ca8f89
commit
16b6e12048
|
@ -1,3 +1,9 @@
|
|||
Wed Dec 16 17:30:35 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* toplev.c (main): Disable optimize_size if a specific
|
||||
optimization level is requested. Always set optimization
|
||||
level to 2 if -Os is specified.
|
||||
|
||||
Wed Dec 16 16:33:04 1998 Dave Brolley <brolley@cygnus.com>
|
||||
|
||||
* objc/lang-specs.h: Pass -MD, -MMD and -MG to cc1obj if configured with
|
||||
|
|
13
gcc/toplev.c
13
gcc/toplev.c
|
@ -4556,6 +4556,7 @@ main (argc, argv)
|
|||
if (!strcmp (argv[i], "-O"))
|
||||
{
|
||||
optimize = 1;
|
||||
optimize_size = 0;
|
||||
}
|
||||
else if (argv[i][0] == '-' && argv[i][1] == 'O')
|
||||
{
|
||||
|
@ -4564,21 +4565,25 @@ main (argc, argv)
|
|||
int c;
|
||||
|
||||
if ((p[0] == 's') && (p[1] == 0))
|
||||
{
|
||||
optimize_size = 1;
|
||||
|
||||
/* Optimizing for size forces optimize to be 2. */
|
||||
optimize = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
while ((c = *p++))
|
||||
if (! (c >= '0' && c <= '9'))
|
||||
break;
|
||||
if (c == 0)
|
||||
{
|
||||
optimize = atoi (&argv[i][2]);
|
||||
optimize_size = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Optimizing for size forces optimize to be no less than 2. */
|
||||
if (optimize_size && (optimize < 2))
|
||||
optimize = 2;
|
||||
|
||||
obey_regdecls = (optimize == 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue