aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-07-18 19:05:10 -0700
committerJim Wilson <wilson@gcc.gnu.org>1994-07-18 19:05:10 -0700
commite21c472a1fbe6adb506a343b68fa9bf605f79c9f (patch)
tree4e7452c68f39cdd5cee686deb2a94088cc8af2d3
parent7a17c5881cd885f908f97bab9b8032f554073071 (diff)
downloadgcc-e21c472a1fbe6adb506a343b68fa9bf605f79c9f.zip
gcc-e21c472a1fbe6adb506a343b68fa9bf605f79c9f.tar.gz
gcc-e21c472a1fbe6adb506a343b68fa9bf605f79c9f.tar.bz2
(process_command): When have -BstageN option, pass include
not stageN/../include to preprocessor. From-SVN: r7779
-rw-r--r--gcc/gcc.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 4f877ec..1568935 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -2507,15 +2507,24 @@ process_command (argc, argv)
1, 0, 0);
/* As a kludge, if the arg is "[foo/]stageN/", just add
- "[foo/]stageN/../include" to the include prefix. */
+ "[foo/]include" to the include prefix. */
{
int len = strlen (value);
if ((len == 7 || (len > 7 && value[len - 8] == '/'))
&& strncmp (value + len - 7, "stage", 5) == 0
&& isdigit (value[len - 2])
&& value[len - 1] == '/')
- add_prefix (&include_prefix,
- concat (value, "../include", ""), 1, 0, 0);
+ {
+ if (len == 7)
+ add_prefix (&include_prefix, "include", 1, 0, 0);
+ else
+ {
+ char *string = xmalloc (len + 1);
+ strncpy (string, value, len-7);
+ strcat (string, "include");
+ add_prefix (&include_prefix, string, 1, 0, 0);
+ }
+ }
}
}
break;