Mail Archives: djgpp-workers/1998/04/24/11:55:58
Hi!
The version of DJGPP port of gcc-2.8.1 that still does not provide safe sharing
of directory for temporary files between 2 or more copies of gcc is practically
ready to be uploaded. The only question is whether we can still provide
such sharing in final release of the gcc port.
Use of some artificially generated PID is perhaps not quick solution as requires
rather deep study for various systems and even then it's rather likely that
danger of conflicts between 2 copies of gcc will still remain.
Therefore after discussing this problem with Vik Heyndrickx I tried following
working but unfortunatelly very ugly solution:
- I'm removing definition of MKTEMP_EACH_FILE
- I'm replacing libc.a version of mktemp() (for gcc.exe and gxx.exe only)
with hacked (read broken) version that works only once (I'm forbidding to
call it second time). It is enough as without definition of MKTEMP_EACH_FILE
both programs really calls mktemp only once. This hacked version
generates base name for temporary files in format ccXXX is GUARANTEED
to unique for each copies of gcc that shares temporary directory (I provide
this with creating one more file ccXXX000.gcc that is deleted before exitting
gcc not only after normal termination but also after signals).
I tested this version with simultanous building GRX graphic library (beta version
2.28h) and also rather large my own library and didn't met any problems.
I adding an example of building program 3 sources (gcc -v) at the end of message
The question is whether this approach could be acceptable for release.
I understand this solution is ugly and may cause problems with future
versions of gcc
Andris
-----------------------------------------------------------------------------------------------------------
Reading specs from c:/djgpp/lib/gcc-lib/djgpp/2.81/specs
gcc version 2.8.1
c:/djgpp/lib/gcc-lib/djgpp/2.81/cpp.exe -lang-c++ -v -I../../include -I. -undef -
D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=8 -Dunix -
Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -
D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -
D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=1 -
D__EXCEPTIONS test.cc c:/djgpp/tmp/cc1tm.ii
GNU CPP version 2.8.1 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
../../include
.
c:/djgpp/contrib/grx228h/include
c:/djgpp/lang/cxx
c:/djgpp/lib/gcc-lib/djgpp/2.81/include
c:/djgpp/include
End of search list.
c:/djgpp/lib/gcc-lib/djgpp/2.81/cc1plus.exe c:/djgpp/tmp/cc1tm.ii -quiet -dumpbase
test.cc -version -o c:/djgpp/tmp/cc1tm.s
GNU C++ version 2.8.1 (djgpp) compiled by GNU C version 2.8.1.
as -o c:/djgpp/tmp/cc1tm1.o c:/djgpp/tmp/cc1tm.s
c:/djgpp/lib/gcc-lib/djgpp/2.81/cpp.exe -lang-c -v -I../../include -I. -undef -
D__GNUC__=2 -D__GNUC_MINOR__=8 -Dunix -Di386 -DGO32 -DMSDOS -
DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -
D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -
D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=1 prndata.c
c:/djgpp/tmp/cc1tm.i
GNU CPP version 2.8.1 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
../../include
.
c:/djgpp/contrib/grx228h/include
c:/djgpp/lib/gcc-lib/djgpp/2.81/include
c:/djgpp/include
End of search list.
c:/djgpp/lib/gcc-lib/djgpp/2.81/cc1.exe c:/djgpp/tmp/cc1tm.i -quiet -dumpbase
prndata.c -version -o c:/djgpp/tmp/cc1tm.s
GNU C version 2.8.1 (djgpp) compiled by GNU C version 2.8.1.
as -o c:/djgpp/tmp/cc1tm2.o c:/djgpp/tmp/cc1tm.s
c:/djgpp/lib/gcc-lib/djgpp/2.81/cpp.exe -lang-c -v -I../../include -I. -undef -
D__GNUC__=2 -D__GNUC_MINOR__=8 -Dunix -Di386 -DGO32 -DMSDOS -
DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -
D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -
D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=1 grxprint.c
c:/djgpp/tmp/cc1tm.i
GNU CPP version 2.8.1 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
../../include
.
c:/djgpp/contrib/grx228h/include
c:/djgpp/lib/gcc-lib/djgpp/2.81/include
c:/djgpp/include
End of search list.
c:/djgpp/lib/gcc-lib/djgpp/2.81/cc1.exe c:/djgpp/tmp/cc1tm.i -quiet -dumpbase
grxprint.c -version -o c:/djgpp/tmp/cc1tm.s
GNU C version 2.8.1 (djgpp) compiled by GNU C version 2.8.1.
as -o c:/djgpp/tmp/cc1tm3.o c:/djgpp/tmp/cc1tm.s
ld c:/djgpp/lib/gcc-lib/djgpp/2.81/crtf.o c:/djgpp/lib/crt0.o -L../../lib/dj2 -
Lc:/djgpp/lib/gcc-lib/djgpp/2.81 -Lc:/djgpp/lib c:/djgpp/tmp/cc1tm1.o
c:/djgpp/tmp/cc1tm2.o c:/djgpp/tmp/cc1tm3.o -lgrx20 -lgcc -lc -lgcc -Tdjgpp.djl
stubify -v a.out
stubify for djgpp V2.X executables, Copyright (C) 1995 DJ Delorie
stubify: a.out -> a.000 -> a.exe
- Raw text -