www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/03/09/19:14:05

Message-ID: <19990310011358.K281@esmeralda.gerwinski.de>
Date: Wed, 10 Mar 1999 01:13:58 +0100
From: Peter Gerwinski <peter AT gerwinski DOT de>
To: djgpp-workers AT delorie DOT com
Cc: Frank Heckenbach <frank AT tim DOT gerwinski DOT de>
Subject: DJGPP preprocessor and link command specs
Mime-Version: 1.0
X-Mailer: Mutt 0.93.1i
X-Counter: 869
Reply-To: djgpp-workers AT delorie DOT com

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 -


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