OS/2 update
[p5sagit/p5-mst-13.2.git] / hints / os2.sh
index 2293adf..78d370a 100644 (file)
@@ -23,6 +23,14 @@ if test -f $sh.exe; then sh=$sh.exe; fi
 startsh="#!$sh"
 cc='gcc'
 
+# Make denser object files and DLL
+case "X$optimize" in
+  X)
+       optimize="-O2 -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -s"
+       ld_dll_optimize="-s"
+       ;;
+esac
+
 # Get some standard things (indented to avoid putting in config.sh):
  oifs="$IFS"
  IFS=" ;"
@@ -104,19 +112,19 @@ aout_obj_ext='.o'
 aout_lib_ext='.a'
 aout_ar='ar'
 aout_plibext='.a'
-aout_lddlflags='-Zdll'
+aout_lddlflags="-Zdll $ld_dll_optimize"
 if [ $emxcrtrev -ge 50 ]; then 
-    aout_ldflags='-Zexe -Zsmall-conv'
+    aout_ldflags='-Zexe -Zsmall-conv -Zstack 32000'
 else
-    aout_ldflags='-Zexe'
+    aout_ldflags='-Zexe -Zstack 32000'
 fi
 
 # To get into config.sh:
 aout_ldflags="$aout_ldflags"
 
 aout_d_fork='define'
-aout_ccflags='-DPERL_CORE -DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DTWO_POT_OPTIMIZE -DPERL_EMERGENCY_SBRK'
-aout_cppflags='-DPERL_CORE -DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DTWO_POT_OPTIMIZE -DPERL_EMERGENCY_SBRK'
+aout_ccflags='-DPERL_CORE -DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I.'
+aout_cppflags='-DPERL_CORE -DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I.'
 aout_use_clib='c'
 aout_usedl='undef'
 aout_archobjs="os2.o dl_os2.o"
@@ -152,13 +160,13 @@ else
     else
        d_fork='undef'
     fi
-    lddlflags='-Zdll -Zomf -Zmt -Zcrtdll'
+    lddlflags="-Zdll -Zomf -Zmt -Zcrtdll $ld_dll_optimize"
     # Recursive regmatch may eat 2.5M of stack alone.
     ldflags='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000'
     if [ $emxcrtrev -ge 50 ]; then 
-       ccflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DDEBUGGING_MSTATS -DTWO_POT_OPTIMIZE -DPERL_EMERGENCY_SBRK'
+       ccflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I.'
     else
-       ccflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DDEBUGGING_MSTATS -DEMX_BAD_SBRK'
+       ccflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DEMX_BAD_SBRK'
     fi
     use_clib='c_import'
     usedl='define'
@@ -241,13 +249,6 @@ nm_opt='-p'
 d_getprior='define'
 d_setprior='define'
 
-# Make denser object files and DLL
-case "X$optimize" in
-  X)
-       optimize="-O2 -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -s"
-       ;;
-esac
-
 if [ "X$usethreads" = "X$define" ]; then
     ccflags="-Zmt $ccflags"
     cppflags="-Zmt $cppflags"  # Do we really need to set this?