Ticket #50169: moarvm-nojit-in-i386.2.diff

File moarvm-nojit-in-i386.2.diff, 1.9 KB (added by mojca (Mojca Miklavec), 9 years ago)

disable JIT for MoarVM in i386 only

  • Portfile

     
    55
    66name                MoarVM
    77version             2015.12
    8 revision            1
     8revision            2
    99categories          lang devel
    1010platforms           darwin
    1111license             Artistic-2 MIT BSD ISC public-domain
     
    2424
    2525depends_build       port:perl5
    2626
     27# https://github.com/MoarVM/MoarVM/issues/324
     28patchfiles          patch-src-jit-emit_x64.dasc.diff
     29
    2730configure.cmd       ${prefix}/bin/perl Configure.pl
    2831
    2932# Unsupported by Configure.pl
    3033configure.universal_args-delete --disable-dependency-tracking
    31 # JIT is not supported on anything but x86_64
    32 # (and universal builds would need a special treatment)
    33 # automatic disabling of JIT should be implemented/fixed upstream
    34 # https://github.com/MoarVM/MoarVM/issues/324
    35 if {[variant_isset universal] || ${configure.build_arch} ne "x86_64"} {
    36     configure.args-append --no-jit
    37 }
  • files/patch-src-jit-emit_x64.dasc.diff

     
     1https://github.com/MoarVM/MoarVM/issues/324
     2https://github.com/MoarVM/MoarVM/commit/6ae4e7fdb82b147df79109f5567d77300c5a6e78
     3
     4--- src/jit/emit_x64.dasc.orig
     5+++ src/jit/emit_x64.dasc
     6@@ -61,7 +61,15 @@
     7 
     8 
     9 const MVMint32 MVM_jit_support(void) {
     10+#ifdef __i386__
     11+    /* Usually, this file should only be compiled only on a amd64
     12+       platform; but when compiling 'fat' or 'universal' binaries, we
     13+       may compile it for other platform. In this case we use the
     14+       runtime check to disable the JIT */
     15+    return 0;
     16+#else
     17     return 1;
     18+#endif
     19 }
     20 
     21 const unsigned char * MVM_jit_actions(void) {