aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/gcc/ortho-lang-49.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ortho/gcc/ortho-lang-49.c')
-rw-r--r--src/ortho/gcc/ortho-lang-49.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ortho/gcc/ortho-lang-49.c b/src/ortho/gcc/ortho-lang-49.c
index e8b4f5643..f5586bf41 100644
--- a/src/ortho/gcc/ortho-lang-49.c
+++ b/src/ortho/gcc/ortho-lang-49.c
@@ -420,6 +420,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);