User Tools

Site Tools


devel:sis

This is an old revision of the document!


Building SIS

  • Replace restrict to restrict_var – it is a keyword now.
  • Use __MINGW32__ macro to distinguish Linux/Windows builds.
  • For Windows builds add -lwinmm to the linker command.

Cross-compiling for Windows

  1. Install MinGW-W64:
    sudo apt install mingw-w64
  2. Add the following header file to /usr/share/mingw-w64/include/sys/:
    wait.h
    #ifndef _WAIT_H
    #define _WAIT_H
     
    #ifdef __cplusplus
    extern "C" {
    #endif
     
    #ifndef __STRICT_ANSI__
     
    #include <sys/types.h>
     
    #define WEXITSTATUS(stat_val)	(  (stat_val) & 0x000ff)
    #define WIFEXITED(stat_val)	(!((stat_val) & 0x3ff00))
    #define WIFSIGNALED(stat_val)	( ((stat_val) & 0x3ff00))
    #define WIFSTOPPED(stat_val)	0
    #define WNOHANG			1
    #define WSTOPSIG(stat_val)	0
    #define WTERMSIG(stat_val)	( ((stat_val) >> 8 ) & 0x3ff)
    #define WUNTRACED		0
     
    pid_t wait(int *stat_loc);
    pid_t waitpid(pid_t pid, int *stat_loc, int options);
     
    #endif /* !__STRICT_ANSI__ */
     
    #ifdef __cplusplus
    }
    #endif
     
    #endif /* !_WAIT_H */
  3. Create symbolic link to from /usr/i686-w64-mingw32/include/sys:
    ln -s ../../../share/mingw-w64/include/sys/wait.h  
  4. Create symbolic links from /usr/x86_64-w64-mingw32/include/sys:
    ln -s ../../../share/mingw-w64/include/sys/wait.h  

32-bit for Windows

  • Rebuild SIS:
    ./configure --host=i686-w64-mingw32
    make

64-bit for Windows

  • Rebuild SIS:
    ./configure --host=x86_64-w64-mingw32
    make

Compiling for Linux

32-bit for Linux

  • Rebuild SIS:
    CFLAGS=-m32 ./configure
    make

64-bit for Linux

  • Rebuild SIS:
    CFLAGS=-m64 ./configure
    make
Copyright © 2014-2024 workcraft.org

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki