jbarnette / johnson

Johnson wraps JavaScript in a loving Ruby embrace.

johnson / cross-compile.txt
100644 39 lines (23 sloc) 0.919 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
CROSS-COMPILING FOR WINDOWS
 
Based on http://eigenclass.org/hiki.rb?cross+compiling+rcovrt
 
 
*) Install the MinGW cross-compiler
 
    Debian: apt-get install mingw32 mingw32-binutils mingw32-runtime
 
*) Download & extract a ruby distribution archive
 
*) Double the backslashes in the ALT_SEPARATOR definition in Makefile.in
 
*) Build & install it:
 
    env ac_cv_func_getpgrp_void=no \
       ac_cv_func_setpgrp_void=yes \
       rb_cv_negative_time_t=no \
       ac_cv_func_memcmp_working=yes \
       rb_cv_binary_elf=no \
       ./configure \
       --host=i586-mingw32msvc \
       --target=i386-mingw32 \
       --build=i686-linux \
       --prefix=~/ruby-mingw32
 
    make ruby
 
    make install
 
*) Build the extension (rake will build spidermonkey for you)
 
    # Remove any native binaries that are already built
    rake clean
 
    rake build CROSS=MINGW32 CROSSLIB=~/ruby-mingw32/lib/ruby/1.8/i386-mingw32