delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/06/03:32:31

Date: Wed, 6 Jun 2001 10:17:58 +0300 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: Alex Oleynikov <alex AT compuweigh DOT com>, djgpp AT delorie DOT com
Subject: Re: DJGPP on PTS-DOS run problem
In-Reply-To: <Pine.SUN.3.91.1010606085355.14278A-100000@is>
Message-ID: <Pine.A41.4.05.10106061010580.95366-100000@ieva06.lanet.lv>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Wed, 6 Jun 2001, Eli Zaretskii wrote:

> [Please don't post in HTML.]
> 
> On Tue, 5 Jun 2001, Alex Oleynikov wrote:
> 
> > It looks like under PTS-DOS the CPP cannot find this version.h file for
> > some reason.
> 
> Here's why: on MS-DOS, GCC invokes the preprocessor like this:
> 
> >  d:/djgpp/lib/gcc-lib/djgpp/2.952/cpp.exe -lang-c -v -Id:/djgpp/include
> > -Id:/grx/include -Id:/djgpp/contrib/pmcom11 -D__GNUC__=2
> > -D__GNUC_MINOR__=95 -Dunix -Di386 -DGO32 -DDJGPP=2 -DMSDOS
> > -D__unix__ -D__i386__ -D__GO32__ -D__DJGPP__=2 -D__MSDOS__ -D__unix
> > -D__i386 -D__GO32 -D__DJGPP=2 -D__MSDOS -Asystem(unix) -Asystem(msdos)
> > -Acpu(i386) -Amachine(i386) -g -Acpu(i386) -Amachine(i386) -Di386
> > -D__i386 -D__i386__ -D__tune_pentium__
> > -imacros d:/djgpp/lib/../include/sys/version.h -remap star300.c c:/ccDaGvq5.i
> 
> whereas on PTS-DOS, it invokes cpp like this:
> 
> >  d:/djgpp/lib/gcc-lib/djgpp/2.952/cpp.exe -lang-c -v -Id:/djgpp/include
> > -Id:/grx/include -Id:/djgpp/contrib/pmcom11 -D__GNUC__=2
> > -D__GNUC_MINOR__=3D95 -Dunix -Di386 -DGO32 -DDJGPP=2 -DMSDOS
> > -D__unix__ -D__i386__ -D__GO32__ -D__DJGPP__=2 -D__MSDOS__ -D__unix
> > -D__i386 -D__GO32 -D__DJGPP=2 -D__MSDOS -Asystem(unix) -Asystem(msdos)
> > -Acpu(i386) -Amachine(i386) -g -Acpu(i386) -Amachine(i386) -Di386
> > -D__i386 -D__i386__ -D__tune_pentium__ 
> > -imacros ../include/sys/version.h -remap star300.c c:/ccp5SQML.i
> 
> See the difference?  The PTS-DOS command line doesn't prefix
> ../include/sys/version.h with d:/djgpp/lib when it passes that file
> name to the -imacros switch.
> 
> Hmm.. I wonder what causes the difference...  What does the following
> command print under each one of the two operating systems?
> 
> 	gcc --print-file-name ../include/sys/version.h
> 

Here is fragment from gcc/gcc.c (from docs of GCC specs)

 %s     current argument is the name of a library or startup file of some
        sort.
        Search for that file in a standard list of directories
        and substitute the full name found.

It seems that GCC fails to state 
	d:/djgpp/lib/../include/sys/version.h
for PTS-DOS and as it's actual location is not substituted. Perhaps
it would be usefull to write smaller test example to verify that under
PTS-DOS

Andris
 

- Raw text -


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