delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/14/01:39:57

Date: Thu, 13 Nov 1997 22:37:47 -0800 (PST)
Message-Id: <199711140637.WAA20714@adit.ap.net>
Mime-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>,
Soeren Sandmann <sandmann AT daimi DOT aau DOT dk>
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: GCC -dr?
Cc: djgpp AT delorie DOT com

At 12:30  11/13/1997 +0200, Eli Zaretskii wrote:
>
>On 12 Nov 1997, Soeren Sandmann wrote:
>
>> I realize that the problem probably stems from the fact that DOS' filenames
>> can be no longer than eight characters. Is a workaround available? 
>
>The workaround is to tell the parser explicitly to use a diffent
>basename for the files it creates.  The following works for me:
>
>	  gcc -save-temps -c foo.c
>	  cc1 -dumpbase foo -quiet -dr -o foo.o foo.i
>
>The first line tells gcc to not delete the intermediate files it
>creates when compiling the source.  The second line then invokes cc1
>directly on the output of the preprocessor.
Unfortunately, that doesn't work all the time. It's fine for the RTL dump,
yes, but there are other dumps whose extensions are not different until
after the first three characters. For example, the common subexpression
elimination pass (CSE) is run twice when optimizing. These dumps are named
`FILE.cse' and `FILE.cse2'. This obviously won't work on DOS, since the
second dump will overwrite the first.
>
>You need these two steps because there's no easy way of passing the
>`-dumpbase' option to cc1.
>
>> Or is it something I can change in the DJGPP sources? Or is it something
>> that will be fixed in a later version of DJGPP?
>
>Unless somebody makes the change in the GCC sources and submits them
>to the GCC maintainers, it won't be fixed.  The change is simple: if
>LFN is not supported, remove the extension (.c, .cc etc.) from the
>basename before appending the .rtl and the other extensions used for
>the other -dX options.
That, and it'll also involve changing the dump extensions under MSDOS. The
easy way to do this is to invent some shortened forms and put them inside
`#ifdef MSDOS', but that's not very clean. IMHO, the Right Thing would be to
make it an option in the configuration header files to name the dumps
whatever a particular system wants, but that would involve some considerable
work with all the configurations. So maybe the dirty way is better?

I'm willing to make the easy changes, but I really don't want to go
groveling through all of GCC's sources.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019