Blame SOURCES/disable-mozglue.patch

b56797
From 7e6d628456af3e99ebcb9a01a27e1461585082a4 Mon Sep 17 00:00:00 2001
b56797
From: Till Schneidereit <till@tillschneidereit.net>
b56797
Date: Thu, 1 Oct 2015 12:59:09 +0200
b56797
Subject: [PATCH] Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all
b56797
 platforms
b56797
b56797
Otherwise, build fails not being able to find HashBytes.
b56797
b56797
Patch ported forward to mozjs52 by Philip Chimento
b56797
<philip.chimento@gmail.com>.
b56797
b56797
https://bugzilla.mozilla.org/show_bug.cgi?id=1176787
b56797
---
b56797
 js/src/old-configure.in | 23 ++++++++++++++---------
b56797
 mozglue/build/moz.build |  2 +-
b56797
 2 files changed, 15 insertions(+), 10 deletions(-)
b56797
b56797
diff --git a/js/src/old-configure.in b/js/src/old-configure.in
b56797
index 1c5c9e21..ff0617e3 100644
b56797
--- a/js/src/old-configure.in
b56797
+++ b/js/src/old-configure.in
b56797
@@ -1623,16 +1623,21 @@ dnl ========================================================
b56797
 dnl = Enable jemalloc
b56797
 dnl ========================================================
b56797
 
b56797
-case "${OS_TARGET}" in
b56797
-Android|WINNT|Darwin)
b56797
+dnl In stand-alone builds we always only want to link executables against mozglue.
b56797
+if test "$JS_STANDALONE"; then
b56797
   MOZ_GLUE_IN_PROGRAM=
b56797
-  ;;
b56797
-*)
b56797
-  dnl On !Android !Windows !OSX, we only want to link executables against mozglue
b56797
-  MOZ_GLUE_IN_PROGRAM=1
b56797
-  AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
b56797
-  ;;
b56797
-esac
b56797
+else
b56797
+  case "${OS_TARGET}" in
b56797
+  Android|WINNT|Darwin)
b56797
+    MOZ_GLUE_IN_PROGRAM=
b56797
+    ;;
b56797
+  *)
b56797
+    dnl On !Android !Windows !OSX, we only want to link executables against mozglue
b56797
+    MOZ_GLUE_IN_PROGRAM=1
b56797
+    AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
b56797
+    ;;
b56797
+  esac
b56797
+fi
b56797
 
b56797
 if test "$MOZ_MEMORY"; then
b56797
   if test "x$MOZ_DEBUG" = "x1"; then
b56797
diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
b56797
index d2897477..e3be5a2b 100644
b56797
--- a/mozglue/build/moz.build
b56797
+++ b/mozglue/build/moz.build
b56797
@@ -6,7 +6,7 @@
b56797
 
b56797
 # Build mozglue as a shared lib on Windows, OSX and Android.
b56797
 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
b56797
-if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
b56797
+if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']:
b56797
     SharedLibrary('mozglue')
b56797
 else:
b56797
     Library('mozglue')
b56797