www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/11/07:36:29

Message-ID: <B0000029853@stargate.astr.lu.lv>
From: "Andris Pavenis" <pavenis AT lanet DOT lv>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Date: Mon, 11 May 1998 14:35:55 +0300
MIME-Version: 1.0
Subject: Re: / and \ in gcc2.8.1
CC: "Gurunandan R. Bhat" <grbhat AT unigoa DOT ernet DOT in>, djgpp AT delorie DOT com
References: <Pine DOT LNX DOT 3 DOT 91 DOT 980510141632 DOT 1510B-100000 AT aditya DOT unigoa DOT ernet DOT in>
In-reply-to: <Pine.SUN.3.91.980511122108.19471K-100000@is>

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 -


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