diff options
Diffstat (limited to 'src/ortho/gcc/ortho-lang-8.c')
-rw-r--r-- | src/ortho/gcc/ortho-lang-8.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ortho/gcc/ortho-lang-8.c b/src/ortho/gcc/ortho-lang-8.c index f88cea0c1..d710c8b99 100644 --- a/src/ortho/gcc/ortho-lang-8.c +++ b/src/ortho/gcc/ortho-lang-8.c @@ -407,6 +407,22 @@ ortho_post_options (const char **pfilename) { if (*pfilename == NULL || strcmp (*pfilename, "-") == 0) *pfilename = "*stdin*"; + else if (aux_base_name == NULL) + { + /* Define auxbase. The default mechanism in toplev.c doesn't + handle extensions longer than 3 characters. */ + char *name = xstrdup (lbasename (*pfilename)); + int len; + + /* Remove extension. */ + for (len = strlen (name) - 1; len > 1; len--) + if (name[len] == '.') + { + name[len] = 0; + break; + } + aux_base_name = name; + } /* Default hook. */ lhd_post_options (pfilename); |