mozjs52-disable-mozglue.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. From 7e6d628456af3e99ebcb9a01a27e1461585082a4 Mon Sep 17 00:00:00 2001
  2. From: Till Schneidereit <till@tillschneidereit.net>
  3. Date: Thu, 1 Oct 2015 12:59:09 +0200
  4. Subject: [PATCH] Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all
  5. platforms
  6. Otherwise, build fails not being able to find HashBytes.
  7. Patch ported forward to mozjs52 by Philip Chimento
  8. <philip.chimento@gmail.com>.
  9. https://bugzilla.mozilla.org/show_bug.cgi?id=1176787
  10. ---
  11. js/src/old-configure.in | 23 ++++++++++++++---------
  12. mozglue/build/moz.build | 2 +-
  13. 2 files changed, 15 insertions(+), 10 deletions(-)
  14. diff --git a/js/src/old-configure.in b/js/src/old-configure.in
  15. index 1c5c9e21..ff0617e3 100644
  16. --- a/js/src/old-configure.in
  17. +++ b/js/src/old-configure.in
  18. @@ -1623,16 +1623,21 @@ dnl ========================================================
  19. dnl = Enable jemalloc
  20. dnl ========================================================
  21. -case "${OS_TARGET}" in
  22. -Android|WINNT|Darwin)
  23. +dnl In stand-alone builds we always only want to link executables against mozglue.
  24. +if test "$JS_STANDALONE"; then
  25. MOZ_GLUE_IN_PROGRAM=
  26. - ;;
  27. -*)
  28. - dnl On !Android !Windows !OSX, we only want to link executables against mozglue
  29. - MOZ_GLUE_IN_PROGRAM=1
  30. - AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
  31. - ;;
  32. -esac
  33. +else
  34. + case "${OS_TARGET}" in
  35. + Android|WINNT|Darwin)
  36. + MOZ_GLUE_IN_PROGRAM=
  37. + ;;
  38. + *)
  39. + dnl On !Android !Windows !OSX, we only want to link executables against mozglue
  40. + MOZ_GLUE_IN_PROGRAM=1
  41. + AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
  42. + ;;
  43. + esac
  44. +fi
  45. if test "$MOZ_MEMORY"; then
  46. if test "x$MOZ_DEBUG" = "x1"; then
  47. diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
  48. index d2897477..e3be5a2b 100644
  49. --- a/mozglue/build/moz.build
  50. +++ b/mozglue/build/moz.build
  51. @@ -6,7 +6,7 @@
  52. # Build mozglue as a shared lib on Windows, OSX and Android.
  53. # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
  54. -if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
  55. +if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']:
  56. SharedLibrary('mozglue')
  57. else:
  58. Library('mozglue')