Ilya Zakharevich on Thu, 17 Oct 2002 11:50:25 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PATCH CVS] dynamic linking on OS/2


On Wed, Oct 16, 2002 at 11:05:23PM -0700, Ilya Zakharevich wrote:
> This patch
> 
>   a) Adds a new file README.os2 (please update the distribution-build process);
> 
>   b) Enables the dynamic-linking build on OS/2 (with the limitation
>      discussed in README.os2);

Of course, one misprint and one omition in the docs turned out several
minutes after the posting...  Sorry.

Yours,
Ilya

--- ./Configure-pre2	Wed Oct 16 22:37:18 2002
+++ ./Configure	Thu Oct 17 01:32:42 2002
@@ -523,7 +523,7 @@ if test -n "$__gnuc__"; then
       -malign-loops=2 -malign-jumps=2 -malign-functions=2";;
     *-sparcv8*) cflags=-mv8;;
   esac
-  if test "X$osname" = os2; then cflags=-Zmt; fi
+  if test "X$osname" = Xos2; then cflags=-Zmt; fi
 
   # omit-frame-pointer incompatible with -pg
   PRFFLAGS="-pg $OPTFLAGS"
--- ./README.os2-pre2	Wed Oct 16 22:45:24 2002
+++ ./README.os2	Thu Oct 17 00:03:18 2002
@@ -15,10 +15,13 @@ the build of dynamically linked target f
 To build with OMF-type target
 
   cd Oos2-ix86
-  make _O=.obj _A=.lib CC_FLAVOR="-Zomf -Zcrtdll" RLLIBS=-lreadline_import DLLD_IGNORE= bench
+  make _O=.obj _A=.lib CC_FLAVOR="-Zomf -Zcrtdll -Zstack 8192" RLLIBS=-lreadline_import DLLD_IGNORE= AR=emxomfar bench
 
 This build constructs a working DLL.  Both -Zomf and -Zcrtdll are crucial to
-have a functioning DLL (see EMX documentation for details).
+have a functioning DLL (see EMX documentation for details).  -Zstack 8192
+forces the same C stack size as for AOUT build (and the same - 8M - as on many
+Unices, so you get few surprises when things work on Unix, but core on OS/2).
+
 Use of the the readline-DLL (via the readline_import.lib library) is not only
 a convenience, but also statically linked readline library are often broken;
 sigh...
@@ -29,7 +32,7 @@ To use the gnuplot-engine DLL gnpltdrw.D
   sh Configure --graphic=gnuplot-dynamic,gnpltdrw
   make gp
   cd Oos2-ix86
-  make _O=.obj _A=.lib CC_FLAVOR="-Zomf -Zcrtdll" RLLIBS=-lreadline_import DLLD_IGNORE= bench
+  make _O=.obj _A=.lib CC_FLAVOR="-Zomf -Zcrtdll -Zstack 8192" RLLIBS=-lreadline_import DLLD_IGNORE= AR=emxomfar bench
   cd ..
 
 The statically build PARI library is in a file named similar to libpari-2_2.a,