Mail Archives: djgpp-workers/1999/03/09/19:14:05
Hello again, DJGPP workers!
DJGPP requries some hacks on the preprocessor and link command
specs. However while building the compiler itself, `xgcc' dumps
specs that do not contain the DJGPP specifica, and it is just by
chance that the compilation works. The differences are as
follows:
8< -------------------------------------------------------------
--- dumped-specs Mon Mar 8 21:45:16 1999
+++ /usr/lib/gcc-lib/current-djgpp/specs Sun Jul 19 18:39:39 1998
@@ -35,7 +35,7 @@
%{funsigned-char:-D__CHAR_UNSIGNED__}
*predefines:
--Dunix -Di386 -DGO32 -DMSDOS -Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386)
+-Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 -Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386)
*cross_compile:
1
@@ -60,4 +60,12 @@
*cc1_cpu:
%{!mcpu*: %{m386:-mcpu=i386 -march=i386} %{mno-486:-mcpu=i386 -march=i386} %{m486:-mcpu=i486 -march=i486} %{mno-386:-mcpu=i486 -march=i486} %{mno-pentium:-mcpu=i486 -march=i486} %{mpentium:-mcpu=pentium} %{mno-pentiumpro:-mcpu=pentium} %{mpentiumpro:-mcpu=pentiumpro}}
+
+*link_command:
+%{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
+ %{r} %{s} %{t} %{u*} %{x} %{z}\
+ %{!A:%{!nostartfiles:%{!nostdlib:%S}}} %{static:}\
+ %{L*} %D %{T*} %o -Tdjgpp.djl\
+ %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}}}}}}
+%{!c:%{!M:%{!MM:%{!E:%{!S:stubify %{v} %{o*:%*} %{!o*:a.out}}}}}}
8< -------------------------------------------------------------
The clean way to get the changed specs into the compiler
seems to be through `config/i386/go32.h' by `#define'ing
CPP_PREDEFINES and LINK_COMMAND_SPEC accordingly. (The latter
one is evaluated by EGCS in `gcc.c:788' and would have to be
hacked into GCC2's `gcc.c'.)
What would you think about patching these defines into
`config/i386/go32.h' of the EGCS and GCC2 code bases?
Peter
--
Peter Gerwinski, Essen, Germany, http://home.pages.de/~Peter.Gerwinski/
Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-19990118
PGP key on request - 6C 94 45 BE 28 A4 96 - 0E CC E9 12 47 25 82 75
*** Vote against SPAM! ********* http://www.politik-digital.de/spam/ ***
- Raw text -