|
|
Line 86: |
Line 86: |
| ac_add_options --target=arm-linux-androideabi | | ac_add_options --target=arm-linux-androideabi |
| ac_add_options --with-endian=little | | ac_add_options --with-endian=little |
|
| |
|
| |
| Pending {{bug|694499}} getting fixed, there is a workaround you can use to get a cross-compile from Mac OS X working on an Android device. Apply this patch:
| |
|
| |
| diff -r d9e824e28209 js/src/jscpucfg.cpp
| |
| --- a/js/src/jscpucfg.cpp Thu Oct 13 21:13:01 2011 -0700
| |
| +++ b/js/src/jscpucfg.cpp Fri Oct 14 11:27:16 2011 -0400
| |
| @@ -64,13 +64,13 @@
| |
| * processors, and determines which processor to configure for based
| |
| * on compiler predefined macros. We do the same thing here.
| |
| */
| |
| - printf("#ifdef __LITTLE_ENDIAN__\n");
| |
| + //printf("#ifdef __LITTLE_ENDIAN__\n");
| |
| printf("#define IS_LITTLE_ENDIAN 1\n");
| |
| printf("#undef IS_BIG_ENDIAN\n");
| |
| - printf("#else\n");
| |
| - printf("#undef IS_LITTLE_ENDIAN\n");
| |
| - printf("#define IS_BIG_ENDIAN 1\n");
| |
| - printf("#endif\n\n");
| |
| + //printf("#else\n");
| |
| + //printf("#undef IS_LITTLE_ENDIAN\n");
| |
| + //printf("#define IS_BIG_ENDIAN 1\n");
| |
| + //printf("#endif\n\n");
| |
| #elif defined(IS_LITTLE_ENDIAN) || defined(FORCE_LITTLE_ENDIAN)
| |
| printf("#define IS_LITTLE_ENDIAN 1\n");
| |
| printf("#undef IS_BIG_ENDIAN\n\n");
| |
|
| |
| and rebuild using a mozconfig such as the one above. As leaving this change in your local hg clone might prevent some operations, you can use a hack with hard-links to only apply the patch when building. Keep two copies of the jscpucfg.cpp file in a directory somewhere, one with the patch applied and one original. Then, just before building, hard-link the modified file into the js/src folder, and after the build is complete, change the hard-link back the original file. This will retain the timestamps on the file and prevent the build scripts from rebuilding all of the js engine while also leaving hg blissfully unaware of the change.
| |