Hi,
Doing the build as usual, compilation dies at stage 2 when compiling the rts:
---------------------------------------------------------------------------
c:/djgpp/b/gnu/gcc-2.953/build.djg/gcc/xgpc -Bc:/djgpp/b/gnu/gcc-2.953/build.djg/gcc/ -Bc:/djgpp/i586-pc-msdosdjgpp/bin/ -I. -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -O2 --unit-path=/dev/c/djgpp/b/gnu/gcc-2.953/gcc/p/rts --automake --print-needed-options "/dev/c/djgpp/b/gnu/gcc-2.953/gcc/p/rts/endian.pas" 2> "needed-options" || true if grep -v '^--' "needed-options" > /dev/null; then echo "needed-options: `cat "needed-options"`" >&2; rm -f "needed-options"; false; else true; fi needed-options: gpcpp.exe: usage: c:/djgpp/b/gnu/gcc-2.953/build.djg/gcc/gpcpp.exe [switches] input output make.exe[2]: *** [needed-options] Error 1 make.exe[2]: Leaving directory `c:/djgpp/b/gnu/gcc-2.953/build.djg/gcc/p/rts' make.exe[1]: *** [pascal.rts] Error 2 make.exe[1]: Leaving directory `c:/djgpp/b/gnu/gcc-2.953/build.djg/gcc' make.exe: *** [all-gcc] Error 2 ---------------------------------------------------------------------------
there have been many changes in gpcpp.c
The only djgpp-related patch in the p directory now fails. it was
----------------------------------------------------------------------------
--- gpcpp.c.orig Thu Mar 29 16:56:24 2001 +++ gpcpp.c Thu Mar 29 17:22:06 2001 @@ -2480,6 +2480,21 @@ default_len = strlen (default_prefix) - 7; default_prefix[default_len] = 0; } + +#ifdef __DJGPP__ + for (p = include_defaults; p->fname; p++) { + if (strncmp(p->fname,"$DJDIR",6)==0) { + char * djdir = getenv("DJDIR"); + if (djdir) { + char * nwname = (char *) xmalloc (strlen(djdir)+strlen(p->fname)-5); + strcpy (nwname, djdir); + strcat (nwname, p->fname+6); + p->fname=nwname; + } + } + } +#endif + /* Search "translated" versions of GNU directories. These have /usr/local/lib/gcc... replaced by specd_prefix. */ if (specd_prefix != 0 && default_len != 0)
-----------------------------------------------------------------------------
It was used to make known the djgpp root directory for includes, but all this part has been changed.
I have rerun the offending instruction with addition of the -v option. result is
------------------------------------------------------------------------------
Reading specs from c:/djgpp/lib/gcc-lib/djgpp/2.953/specs gpc version 20021111, based on gcc-2.95.3 20010315/djgpp (release) c:/djgpp/b/gnu/gcc-2.953/build.djg/gcc/gpcpp.exe -v -I. -isystem c:/djgpp/b/gnu /gcc-2.953/build.djg/gcc/include -isystem c:/djgpp/i586-pc-msdosdjgpp/bin/includ e -famtmpfile=c:\djgpp\tmp\ccFZUxzs.gpa -funit-path=/dev/c/djgpp/b/gnu/gcc-2.953 /gcc/p/rts -fautomake -fprint-needed-options -fdelphi-comments -D__GNU_PASCAL__ -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__GPC__=2 -D__GPC_MINOR__=1 -D__GPC_VERSION__ =2.1 -D__GPC_RELEASE__=20021111 -D__BITS_LITTLE_ENDIAN__=1 -D__BYTES_LITTLE_ENDI AN__=1 -D__WORDS_LITTLE_ENDIAN__=1 -D__NEED_NO_ALIGNMENT__=1 -Dunix -Di386 -DGO3 2 -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) -D__OPTIMIZE__ -W -Wall -Wpointer-arith -Wwrite-strin gs -Wmissing-prototypes -Wmissing-declarations -Acpu(i386) -Amachine(i386) -Di38 6 -D__i386 -D__i386__ -D__tune_pentium__ -imacros c:/djgpp/b/gnu/gcc-2.953/build .djg/gcc/djgpp.ver -remap /dev/c/djgpp/b/gnu/gcc-2.953/gcc/p/rts/endian.pas c:\d jgpp\tmp\ccaPFVYK.i GNU Pascal Compiler PreProcessor version 20021111, based on gcc-2.95.3 20010315/ djgpp (release) (80386, BSD syntax) gpcpp.exe: usage: c:/djgpp/b/gnu/gcc-2.953/build.djg/gcc/gpcpp.exe [switches] in put output [exited with 1]
------------------------------------------------------------------------------
Any hint ?
Maurice
Maurice Lombardi wrote:
Doing the build as usual, compilation dies at stage 2 when compiling the rts:
there have been many changes in gpcpp.c
The only djgpp-related patch in the p directory now fails. it was
[...]
It was used to make known the djgpp root directory for includes, but all this part has been changed.
More precisely, it has been removed, since the Pascal preprocessor doesn't need to find the C includes. :-) (C files linked into Pascal code are compiled by cc1 and preprocessed by cpp0, not by gpcpp.) So this shouldn't be the problem.
BTW, I wonder a little about these patches. Why don't they get them integrated with the main sources (well, for GPC this was the only one, but there are some more for GCC)? In particular, why is there a DJGPP specific patch for config/i386/djgpp.h? ;-)
I have rerun the offending instruction with addition of the -v option. result is
[...]
The problem seems to be `-imacros' option. Try the following:
--- p/gpcpp.c.orig Sat Nov 9 04:48:57 2002 +++ p/gpcpp.c Wed Nov 13 19:50:46 2002 @@ -1008,6 +1008,8 @@ else pend_includes[i] = argv[i+1], i++; } + if (!strcmp (argv[i], "-imacros")) + i++; if (!strcmp (argv[i], "-iprefix")) { if (i + 1 == argc) fatal ("filename missing after `-iprefix' option");
Frank
Frank Heckenbach a écrit:
Maurice Lombardi wrote:
The problem seems to be `-imacros' option. Try the following:
--- p/gpcpp.c.orig Sat Nov 9 04:48:57 2002 +++ p/gpcpp.c Wed Nov 13 19:50:46 2002 @@ -1008,6 +1008,8 @@ else pend_includes[i] = argv[i+1], i++; }
if (!strcmp (argv[i], "-imacros"))
i++; if (!strcmp (argv[i], "-iprefix")) { if (i + 1 == argc) fatal ("filename missing after `-iprefix' option");
OK. It works now. I have uploaded it on adele at the usual place. I will try tomorrow with gcc-3.1
Maurice