aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNick Clifton <nickc@cygnus.com>1998-10-17 11:04:29 +0000
committerNick Clifton <nickc@gcc.gnu.org>1998-10-17 11:04:29 +0000
commit1f50b02979fc7b74f6e730f7b247468b29f4f9a9 (patch)
treee8428824de9f9b600967e90f6f7208099cd4c51f /gcc
parent13c8e8e30ed7ac79c324f2bf7c7a44033ded72a0 (diff)
downloadgcc-1f50b02979fc7b74f6e730f7b247468b29f4f9a9.zip
gcc-1f50b02979fc7b74f6e730f7b247468b29f4f9a9.tar.gz
gcc-1f50b02979fc7b74f6e730f7b247468b29f4f9a9.tar.bz2
Prepend '-m' to --hrlp output of target specific options.
Ignore text after end of first word of a language specific option. From-SVN: r23151
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/toplev.c32
2 files changed, 25 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ca7e470..dfdf0cb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Sat Oct 17 11:02:47 1998 Nick Clifton <nickc@cygnus.com>
+
+ * toplev.c (display_help): Prepend '-m' to target specific
+ options.
+ (check_lang_option): Ignore text after end of first word of a
+ language specific option.
+
Sat Oct 17 02:26:03 1998 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* reload1.c (reg_used_by_pseudo): New static variable.
diff --git a/gcc/toplev.c b/gcc/toplev.c
index b329ccc..7d866d6 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -4120,7 +4120,7 @@ display_help ()
else if (description == NULL)
undoc = 1;
else if (* description != 0)
- doc += printf (" %-23.23s %s\n", option, description);
+ doc += printf (" -m%-21.21s %s\n", option, description);
}
#ifdef TARGET_OPTIONS
@@ -4134,7 +4134,7 @@ display_help ()
else if (description == NULL)
undoc = 1;
else if (* description != 0)
- doc += printf (" %-23.23s %s\n", option, description);
+ doc += printf (" -m%-21.21s %s\n", option, description);
}
#endif
if (undoc)
@@ -4159,55 +4159,59 @@ check_lang_option (option, lang_option)
lang_independent_options * indep_options;
int len;
long k;
-
+ char * space;
+
/* Ignore NULL entries. */
if (option == NULL || lang_option == NULL)
return 0;
- len = strlen (lang_option);
-
+ if ((space = strchr (lang_option, ' ')) != NULL)
+ len = space - lang_option;
+ else
+ len = strlen (lang_option);
+
/* If they do not match to the first n characters then fail. */
if (strncmp (option, lang_option, len) != 0)
return 0;
-
+
/* Do not accept a lang option, if it matches a normal -f or -W
option. Chill defines a -fpack, but we want to support
-fpack-struct. */
-
+
/* An exact match is OK */
if (strlen (option) == len)
return 1;
-
+
/* If it is not an -f or -W option allow the match */
if (option[0] != '-')
return 1;
-
+
switch (option[1])
{
case 'f': indep_options = f_options; break;
case 'W': indep_options = W_options; break;
default: return 1;
}
-
+
/* The option is a -f or -W option.
Skip past the prefix and search for the remainder in the
appropriate table of options. */
option += 2;
-
+
if (option[0] == 'n' && option[1] == 'o' && option[2] == '-')
option += 3;
-
+
for (k = NUM_ELEM (indep_options); k--;)
{
if (!strcmp (option, indep_options[k].string))
{
/* The option matched a language independent option,
do not allow the language specific match. */
-
+
return 0;
}
}
-
+
/* The option matches the start of the langauge specific option
and it is not an exact match for a language independent option. */
return 1;