Mail Archives: djgpp/2001/06/06/03:32:31
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 -