mozjs_17.0.0.bb 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
  2. LICENSE = "MPL-2.0"
  3. LIC_FILES_CHKSUM = "file://../../LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
  4. SRC_URI = " \
  5. http://ftp.mozilla.org/pub/mozilla.org/js/${BPN}${PV}.tar.gz \
  6. file://0001-mozjs17.0.0-fix-the-compile-bug-of-powerpc.patch \
  7. file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
  8. file://0002-Move-JS_BYTES_PER_WORD-out-of-config.h.patch;patchdir=../../ \
  9. file://0003-Add-AArch64-support.patch;patchdir=../../ \
  10. file://0004-mozbug746112-no-decommit-on-large-pages.patch;patchdir=../../ \
  11. file://0005-aarch64-64k-page.patch;patchdir=../../ \
  12. file://0001-regenerate-configure.patch;patchdir=../../ \
  13. file://fix-the-compile-error-of-powerpc64.patch;patchdir=../../ \
  14. file://fix_milestone_compile_issue.patch \
  15. file://0010-fix-cross-compilation-on-i586-targets.patch;patchdir=../../ \
  16. file://0001-add-support-for-big-endian-32bit-ARM.patch;patchdir=../../ \
  17. file://Manually_mmap_heap_memory_esr17.patch;patchdir=../../ \
  18. "
  19. SRC_URI[md5sum] = "20b6f8f1140ef6e47daa3b16965c9202"
  20. SRC_URI[sha256sum] = "321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba"
  21. S = "${WORKDIR}/${BPN}${PV}/js/src"
  22. inherit autotools pkgconfig perlnative pythonnative
  23. DEPENDS += "nspr zlib"
  24. # nspr's package-config is ignored so set libs manually
  25. EXTRA_OECONF = " \
  26. --target=${TARGET_SYS} \
  27. --host=${BUILD_SYS} \
  28. --build=${BUILD_SYS} \
  29. --prefix=${prefix} \
  30. --libdir=${libdir} \
  31. --with-nspr-libs='-lplds4 -lplc4 -lnspr4' \
  32. --enable-threadsafe \
  33. --disable-static \
  34. "
  35. EXTRA_OECONF_append_armv4 = " \
  36. --disable-methodjit \
  37. "
  38. PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
  39. PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11"
  40. # mozjs requires autoreconf 2.13
  41. do_configure() {
  42. ( cd ${S}
  43. gnu-configize --force
  44. mv config.guess config.sub build/autoconf )
  45. ${S}/configure ${EXTRA_OECONF}
  46. }
  47. # patch.bbclass will try to apply the patches already present and fail, so clean them out
  48. do_unpack() {
  49. tar -xvf ${DL_DIR}/mozjs17.0.0.tar.gz -C ${WORKDIR}/
  50. rm -rf ${WORKDIR}/${BPN}${PV}/patches
  51. }
  52. PACKAGES =+ "lib${BPN}"
  53. FILES_lib${BPN} += "${libdir}/lib*.so"
  54. FILES_${PN}-dev += "${bindir}/js17-config"
  55. # Fails to build with thumb-1 (qemuarm)
  56. #| {standard input}: Assembler messages:
  57. #| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20'
  58. #| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)'
  59. #| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)'
  60. #| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300'
  61. #| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52'
  62. ARM_INSTRUCTION_SET = "arm"