To: dj AT citron DOT com Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Problems with rebuilding GO32 Date: Thu, 24 Mar 94 09:24:29 +0200 From: eliz AT is DOT elta DOT co DOT il I was trying to patch GO32 these days along the lines suggested by terra AT diku DOT dk (set dr[7] = 0 in extdebug.c) so that data read breakpoints work with FSDB. The following is the list of (minor) problems encountered: 1. In the main() of coff2exe there is a fragment: stub-file = -open(argv[2], O-READONLY); if (stub-file < 0) { perror(stub-file); exit(1); } But stub-file is an int, and perror() wants a const char * as its arg. This probably should be perror(argv[2]), right? My BC++ 3.1 compiler barked at this line. I don't know, how it evaded the TCC that was originally used, maybe because its diagnostics was somehow suppressed by command-line switches. 2. In the makefile (in the go32/ directory), the CFLAGS variable should include -A-, because some source files which use non-ANSI features won't compile otherwise. Whoever writes makefiles for Borland products should keep in mind that they have configuration files which list the *default* switches. Mine includes the -A switch (I like portability and want all my non-portable features to be kept at minimum, and then only added conciously). 3. Also in the makefile, the rule for stamp.exe includes the `tcc' command explicitly, whereas it should be $(CC). 4. The link rule should include -l3 switch (which gives Turbo Link the /3 switch); otherwise TLink won't link some executable (is it GO32 itself? I forgot) which uses 386-specific code. Btw, what about other optimization-related switches of BCC? Did anybody try them? Is, e.g., -O1 safe? What about -O2? Can I use -3 switch (produces 386 code which uses 32-bit registers)? Eli Zaretskii.