components/desktop/firefox/patches/firefox-42-libxul.patch
author Rich Burridge <rich.burridge@oracle.com>
Tue, 02 May 2017 17:33:26 -0700
changeset 7964 d9801318ed3d
parent 6919 7972aae0fb03
permissions -rw-r--r--
25981468 Build ilmbase and openexr with the GNU compilers

Solaris specific patches. 
Do not plan to send upstream.

diff --git a/toolkit/library/libxul.mk b/toolkit/library/libxul.mk
--- a/toolkit/library/libxul.mk
+++ b/toolkit/library/libxul.mk
@@ -32,16 +32,26 @@ endif
 ifeq (Linux,$(OS_ARCH))
 # Create a GDB Python auto-load file alongside the libxul shared library in
 # the build directory.
 PP_TARGETS += LIBXUL_AUTOLOAD
 LIBXUL_AUTOLOAD = $(topsrcdir)/toolkit/library/libxul.so-gdb.py.in
 LIBXUL_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(topsrcdir))
 endif

+ifdef MOZ_MEMORY
+ifeq ($(OS_ARCH),SunOS)
+OS_LDFLAGS +=  $(MOZ_BUILD_ROOT)/dist/sdk/lib/libmemory.a
+endif
+endif
+
+ifeq ($(OS_ARCH),SunOS)
+OS_LDFLAGS +=  -lm -lsendfile -Wl,-z,defs ../../js/src/js-dtrace.o
+endif
+
 # BFD ld doesn't create multiple PT_LOADs as usual when an unknown section
 # exists. Using an implicit linker script to make it fold that section in
 # .data.rel.ro makes it create multiple PT_LOADs. That implicit linker
 # script however makes gold misbehave, first because it doesn't like that
 # the linker script is given after crtbegin.o, and even past that, replaces
 # the default section rules with those from the script instead of
 # supplementing them. Which leads to a lib with a huge load of sections.
 ifneq (OpenBSD,$(OS_TARGET))
@@ -58,8 +68,12 @@ else
 get_first_and_last = $(TOOLCHAIN_PREFIX)nm -g $1 | grep _NSModule$$ | grep -vw refptr | sort | sed -n 's/^.* _*\([^ ]*\)$$/\1/;1p;$$p'
 endif
 
 LOCAL_CHECKS = test "$$($(get_first_and_last) | xargs echo)" != "start_kPStaticModules_NSModule end_kPStaticModules_NSModule" && echo "NSModules are not ordered appropriately" && exit 1 || exit 0
 
 ifeq (Linux,$(OS_ARCH))
 LOCAL_CHECKS += ; test "$$($(TOOLCHAIN_PREFIX)readelf -l $1 | awk '$1 == "LOAD" { t += 1 } END { print t }')" -le 1 && echo "Only one PT_LOAD segment" && exit 1 || exit 0
 endif
+
+ifeq (SunOS,$(OS_ARCH))
+LOCAL_CHECKS += ; test "$$($(TOOLCHAIN_PREFIX)readelf -l $1 | awk '$1 == "LOAD" { t += 1 } END { print t }')" -le 1 && echo "Only one PT_LOAD segment" && exit 1 || exit 0
+endif
diff a/ipc/app/moz.build b/ipc/app/moz.build
--- a/ipc/app/moz.build 2015-11-03 11:34:14.000000000 +0100
+++ b/ipc/app/moz.build 2015-11-10 08:31:42.024431000 +0100
@@ -130,5 +130,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
         'utils',
     ]

+OS_LIBS += [
+    '$(DEPTH)/security/nss/lib/util/libnssutil3.so',
+    '$(DEPTH)/security/nss/lib/ssl/libssl3.so',
+    '$(DEPTH)/security/nss/lib/smime/libsmime3.so',
+    '$(DEPTH)/security/nss/lib/nss/libnss3.so',
+    '$(DEPTH)/config/external/lgpllibs/liblgpllibs.so',
+    '-lsendfile',
+]
 if CONFIG['GNU_CXX']:
     CXXFLAGS += ['-Wshadow']