delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/05/08/07:26:59

From: Andris Pavenis <pavenis AT latnet DOT lv>
To: djgpp-workers AT delorie DOT com
Subject: DXE3 in DJGPP CVS breaks cross-compiling
Date: Thu, 8 May 2003 14:26:01 +0300
User-Agent: KMail/1.5.1
MIME-Version: 1.0
Message-Id: <200305081426.01388.pavenis@latnet.lv>
Reply-To: djgpp-workers AT delorie DOT com

Including DXE3 in DJGPP CVS rather seriously breaks cross-building from Linux:

1) makefile in src/dxe3 uses host strip for target related object files. Though about checking following in, but it is only the first problem.

--- djgpp/src/dxe/makefile~1	2003-05-06 10:46:37.000000000 +0300
+++ djgpp/src/dxe/makefile	2003-05-08 14:03:34.000000000 +0300
@@ -17,7 +17,7 @@
 	$E
 
 .o.h:
-	strip --strip-unneeded $<
+	$(CROSS_STRIP) --strip-unneeded $<
 	bin2h $< $(basename $<) $@
 
 $(BIN)/dxe3gen.exe : $(C) dxe3gen.o $(L) 


2) The next line in makefile uses bin2h, so it should be added 
to host tools. bin2h.c doesn't build without following patch:

--- djgpp/src/utils/bin2h.c~1	2002-10-18 02:00:25.000000000 +0300
+++ djgpp/src/utils/bin2h.c	2003-05-08 14:05:40.000000000 +0300
@@ -9,6 +9,10 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
 int
 main(int argc, char **argv)
 {


3) After I put bin2c on path, got linker error messages:

gcc -g -O2 -I ../../include -DDXE_LD=\"i586-pc-msdosdjgpp-ld\" dxe3gen.c -o ../../hostbin/dxegen.exe
In file included from dxe3gen.c:23:
../../include/string.h:28: warning: conflicting types for built-in function `memcmp'
../../include/string.h:29: warning: conflicting types for built-in function `memcpy'
../../include/string.h:31: warning: conflicting types for built-in function `memset'
../../include/string.h:40: warning: conflicting types for built-in function `strncat'
../../include/string.h:41: warning: conflicting types for built-in function `strncmp'
../../include/string.h:42: warning: conflicting types for built-in function `strncpy'
/tmp/ccLEBaD8.o(.text+0x722): In function `process_args':
/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:240: undefined reference to `__dj_stderr'
/tmp/ccLEBaD8.o(.text+0x754): In function `run_ld':
/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:359: undefined reference to `spawnvp'
/tmp/ccLEBaD8.o(.text+0x9ff):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:459: undefined reference to `spawnvp'
/tmp/ccLEBaD8.o(.text+0xbc1):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:376: undefined reference to `__dj_stderr'
/tmp/ccLEBaD8.o(.text+0x11b3): In function `write_dxe':
/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:766: undefined reference to `__dj_stderr'
/tmp/ccLEBaD8.o(.text+0x141e):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:623: undefined reference to `__dj_stderr'
/tmp/ccLEBaD8.o(.text+0x162a):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:726: undefined reference to `__dj_stderr'
/tmp/ccLEBaD8.o(.text+0x177f): In function `open_dxe_file':
/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:870: undefined reference to `__dj_stderr'
/tmp/ccLEBaD8.o(.text+0x179f):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:863: more undefined references to `__dj_stderr' follow
/tmp/ccLEBaD8.o(.text+0x183d): In function `make_implib':
/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:905: undefined reference to `__dj_ctype_flags'
/tmp/ccLEBaD8.o(.text+0x185f):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:908: undefined reference to `__dj_ctype_toupper'
/tmp/ccLEBaD8.o(.text+0x1948):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:1005: undefined reference to `spawnlp'
/tmp/ccLEBaD8.o(.text+0x1975):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:1013: undefined reference to `spawnlp'
/tmp/ccLEBaD8.o(.text+0x1a61):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:943: undefined reference to `__dj_stderr'
/tmp/ccLEBaD8.o(.text+0x1a94):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:913: undefined reference to `spawnlp'
/tmp/ccLEBaD8.o(.text+0x1acc):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:921: undefined reference to `spawnlp'
/tmp/ccLEBaD8.o(.text+0x1e54): In function `main':
/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:1149: undefined reference to `__dj_stderr'
/tmp/ccLEBaD8.o(.text+0x1e9b):/disk2/cvs/djgpp/build/djgpp/src/dxe/dxe3gen.c:1127: undefined reference to `__dj_stderr'
collect2: ld returned 1 exit status
make[1]: *** [../../hostbin/dxegen.exe] Error 1
make: *** [subs] Error 2


So dxe3gen uses DJGPP specific features. So it should be fixed (unless we agree to drop cross-compiling support).

Andris

- Raw text -


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