Changes between Version 10 and Version 11 of PortingTips


Ignore:
Timestamp:
Nov 28, 2016, 12:26:52 AM (8 years ago)
Author:
dmik
Comment:

Increase default stack file for executables

Legend:

Unmodified
Added
Removed
Modified
  • PortingTips

    v10 v11  
    2929With the latest `libtool` it is possible to have a buildlevel string built into a dll. To do so you need to teach the `Makefile` how to handle it. Most likely it is the best practice to change `Makefile.am` and then do a `sh -c "autoreconf -fvi"`. How to adjust a `Makefile.am` can be seen here: r1823
    3030
    31 === Add OS/2 specific build details to Autoconf-based packages ===
     31=== Increase default stack file for executables ===
     32
     33The default stack size in the EMX GCC tool chain is 1 Mbyte. This is not always enough. A clear indication of your program running out of stack is a crash in GCC1.DLL (in a stack checking function `___chkstk_ms` usually located at 0001:00000F4).
     34
     35The stack size can be increased using the `-Zstack` linker option which specifies the stack size in Kbytes. For example, passing `-Zstack 0x2000` to the linker (e.g. via LDFLAGS) will increase the stack size to 8 Mbytes. Read the next section if you want to change the stack size using LDFLAGS in an Autoconf-based project.
     36
     37=== Add OS/2 specific build details to Autoconf-based projects ===
    3238
    3339**Method 1**. If `configure.ac` already uses AC_CANONICAL_TARGET or AC_CANONICAL_HOST macros, then you can add the following excerpt to it to do OS/2-specific job (`$target_os` becomes `$host_os` if AC_CANONICAL_HOST is used instead of AC_CANONICAL_TARGET):
     
    5157}}}
    5258
    53 Note though that if you need to add such a block more than once, it makes sense to add AC_CANONICAL_TARGET right after AC_INIT to `configure.ac` and go with //Method 1// described above. 
     59Note though that if you need to add such a block more than once, it makes sense to add AC_CANONICAL_TARGET right after AC_INIT to `configure.ac` and go with //Method 1// described above.