www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/07/07/16:18:09

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <199807072012.WAA17281@sister.ludd.luth.se>
Subject: Re: dxegen patch
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Tue, 7 Jul 1998 22:12:45 +0200 (MET DST)
Cc: djgpp-workers AT delorie DOT com (DJGPP-WORKERS)
In-Reply-To: <Pine.SUN.3.91.980707141520.1727Q-100000@is> from Eli Zaretskii at "Jul 7, 98 02:16:22 pm"
MIME-Version: 1.0

According to Eli Zaretskii:
> 
> On Tue, 7 Jul 1998, Martin Str|mberg wrote:
> 
> > diff -ru src.org/dxe/makefile src/dxe/makefile
> > --- src.org/dxe/makefile        Thu Jan  1 23:25:10 1998
> > +++ src/dxe/makefile    Tue Jul  7 04:01:20 1998
> > @@ -16,7 +16,7 @@
> >         $(XLGCC) dxegen.c -o $@
> > 
> >  $(HOSTBIN)/dxegen.exe : dxegen.c
> > -       $(GCC) -DDXE_LD=\"$(CROSS_LD)\" dxegen.c -o $@
> > +       $(GCC) -DDXE_LD=\"$(CROSS_LD)\" -DDXE_GCC=\"$(CROSS_GCC)\" dxegen.c -o $@
> 
> In my experience, this is incorrect: CROSS_LD is defined as 
> /usr/local/whatever/dos-ld or some such, and this fails on DOS.

Please elaborate. To get somewhere at all compiling natively I had to
set variables (if that's what they are called in makefiles) CROSS_GCC
to GCC, respectively. If CROSS_GCC is wrong why isn't CROSS_LD that?

One thing is sure, as it was, it wasn't compiling (with gcc-2.8.1). 

Here is the patch to makefile.def:
--- src.org/makefile.def        Sat May 30 18:17:16 1998
+++ src/makefile.def    Sun Jul  5 16:42:20 1998
@@ -2,19 +2,27 @@

 #  These define the cross-to-djgpp and native programs.

+# Set CROSS_BUILD = 1 if cross-compiling, otherwise 0
+#CROSS_BUILD = 1
+CROSS_BUILD = 0
+
 # For building distributed (djgpp) libraries and programs
+ifneq ($(CROSS_BUILD),1)
+CROSS_GCC = gcc
+CROSS_AR = ar
+CROSS_LD = ld
+CROSS_BISON = bison
+else
 CROSS_GCC = gcc-dos
 CROSS_AR = /usr/local/i386-go32-msdos/bin/ar
 CROSS_LD = /usr/local/i386-go32-msdos/bin/ld
 CROSS_BISON = bison
+endif

 # For building native programs; assumes GNU versions
 GCC = gcc
 AR = ar
 LD = ld
 BISON = bison
-
-CROSS_BUILD = 1
-#CROSS_BUILD = 0

 # You may need to replace coff-go32 with coff-i386 in lib/djgpp.djl


This Mortal Coil, Blood,

							MartinS

- Raw text -


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