components/desktop/firefox/patches/firefox-42-libxul.patch
author Jingning Ji <jingning.ji@oracle.com>
Fri, 16 Sep 2016 16:06:45 -0700
changeset 6919 7972aae0fb03
parent 5527 611b2d6efdfe
permissions -rw-r--r--
24508672 Upgrade Firefox to version 45.1.1 ESR
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5527
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     1
Solaris specific patches. 
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     2
Do not plan to send upstream.
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     3
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     4
diff --git a/toolkit/library/libxul.mk b/toolkit/library/libxul.mk
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     5
--- a/toolkit/library/libxul.mk
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     6
+++ b/toolkit/library/libxul.mk
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     7
@@ -32,16 +32,26 @@ endif
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     8
 ifeq (Linux,$(OS_ARCH))
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     9
 # Create a GDB Python auto-load file alongside the libxul shared library in
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    10
 # the build directory.
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    11
 PP_TARGETS += LIBXUL_AUTOLOAD
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    12
 LIBXUL_AUTOLOAD = $(topsrcdir)/toolkit/library/libxul.so-gdb.py.in
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    13
 LIBXUL_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(topsrcdir))
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    14
 endif
6919
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    15
5527
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    16
+ifdef MOZ_MEMORY
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    17
+ifeq ($(OS_ARCH),SunOS)
6919
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    18
+OS_LDFLAGS +=  $(MOZ_BUILD_ROOT)/dist/sdk/lib/libmemory.a
5527
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    19
+endif
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    20
+endif
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    21
+
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    22
+ifeq ($(OS_ARCH),SunOS)
6919
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    23
+OS_LDFLAGS +=  -lm -lsendfile -Wl,-z,defs ../../js/src/js-dtrace.o
5527
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    24
+endif
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    25
+
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    26
 # BFD ld doesn't create multiple PT_LOADs as usual when an unknown section
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    27
 # exists. Using an implicit linker script to make it fold that section in
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    28
 # .data.rel.ro makes it create multiple PT_LOADs. That implicit linker
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    29
 # script however makes gold misbehave, first because it doesn't like that
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    30
 # the linker script is given after crtbegin.o, and even past that, replaces
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    31
 # the default section rules with those from the script instead of
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    32
 # supplementing them. Which leads to a lib with a huge load of sections.
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    33
 ifneq (OpenBSD,$(OS_TARGET))
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    34
@@ -58,8 +68,12 @@ else
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    35
 get_first_and_last = $(TOOLCHAIN_PREFIX)nm -g $1 | grep _NSModule$$ | grep -vw refptr | sort | sed -n 's/^.* _*\([^ ]*\)$$/\1/;1p;$$p'
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    36
 endif
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    37
 
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    38
 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
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    39
 
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    40
 ifeq (Linux,$(OS_ARCH))
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    41
 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
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    42
 endif
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    43
+
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    44
+ifeq (SunOS,$(OS_ARCH))
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    45
+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
611b2d6efdfe 21602607 Need to move Firefox to 38.5.0 ESR branch to continue getting fixes
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    46
+endif
6919
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    47
diff a/ipc/app/moz.build b/ipc/app/moz.build
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    48
--- a/ipc/app/moz.build 2015-11-03 11:34:14.000000000 +0100
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    49
+++ b/ipc/app/moz.build 2015-11-10 08:31:42.024431000 +0100
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    50
@@ -130,5 +130,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    51
         'utils',
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    52
     ]
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    53
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    54
+OS_LIBS += [
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    55
+    '$(DEPTH)/security/nss/lib/util/libnssutil3.so',
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    56
+    '$(DEPTH)/security/nss/lib/ssl/libssl3.so',
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    57
+    '$(DEPTH)/security/nss/lib/smime/libsmime3.so',
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    58
+    '$(DEPTH)/security/nss/lib/nss/libnss3.so',
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    59
+    '$(DEPTH)/config/external/lgpllibs/liblgpllibs.so',
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    60
+    '-lsendfile',
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    61
+]
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    62
 if CONFIG['GNU_CXX']:
7972aae0fb03 24508672 Upgrade Firefox to version 45.1.1 ESR
Jingning Ji <jingning.ji@oracle.com>
parents: 5527
diff changeset
    63
     CXXFLAGS += ['-Wshadow']