Blame SOURCES/disable-mozglue.patch

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