Mail Archives: djgpp/1998/05/11/07:36:29
Date sent: Mon, 11 May 1998 12:23:44 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Subject: Re: / and \ in gcc2.8.1
>
> On Sun, 10 May 1998, Gurunandan R. Bhat wrote:
>
> > I find that a TMPDIR variable set to (a ramdisk) d:\ causes gcc
> > to Abort! without any further messages (even with -v). Changing it to d:/
> > removes this problem. gcc2.7.2.1 worked with d:\
>
> Andris, it seems like GCC 2.8.1 doesn't support backslashes as well as
> forward slashes, at least in TMPDIR. IMHO this problem should be
> corrected ASAP. A lot of people have TMPDIR defined with backslashes.
There were some problems when I defined DIR_SEPARATOR in gcc configuration
as many programs expect to get '/' in dependencies (for example RHIDE).
Therefore I removed this definition in final version. I didn't notice problems,
so I released it.
The current problem is that modified version of mktemp() I used fails when TMPDIR
ends with backslash.
For TMPDIR=D:/ choose_temp_base() removes trailing slash so all works Ok
For TMPDIR=D:\ choose_temp_base() does not do this so we have the problem
Unfortunatelly looks that the only correct way is to define DIR_SEPARATOR
in config/xm-go32.h. I hoped to avoid this.
There is more problems:
'gcc -M -c foo/bar.c' outputs 'bar.o: foo/bar.c ...'
'gcc -M -c foo\bar.c' outputs 'foo\bar.o: foo\bar.c ...'
There is still one question whether there is possible to get backslashes
converted to normal slashes when outputing dependencies (for modified
version of mktemp there is no problem to do this) to have for example
c:/djgpp/include/stdio.h in dependencies instead of c:\djgpp\include\stdio.h
Otherwise these would be urgent need for patched version of RHIDE and
perhaps something else
>
> (Btw, does GCC look at TMP and TEMP as well as TMPDIR?)
>
Yes it looks for TMP and TEMP if previous ones is not found.
Andris
- Raw text -