components/desktop/firefox/patches/firefox-42-libxul.patch
changeset 5527 611b2d6efdfe
child 6919 7972aae0fb03
equal deleted inserted replaced
5526:570ac9aab8b2 5527:611b2d6efdfe
       
     1 Solaris specific patches. 
       
     2 Do not plan to send upstream.
       
     3 
       
     4 diff --git a/toolkit/library/libxul.mk b/toolkit/library/libxul.mk
       
     5 --- a/toolkit/library/libxul.mk
       
     6 +++ b/toolkit/library/libxul.mk
       
     7 @@ -32,16 +32,26 @@ endif
       
     8  ifeq (Linux,$(OS_ARCH))
       
     9  # Create a GDB Python auto-load file alongside the libxul shared library in
       
    10  # the build directory.
       
    11  PP_TARGETS += LIBXUL_AUTOLOAD
       
    12  LIBXUL_AUTOLOAD = $(topsrcdir)/toolkit/library/libxul.so-gdb.py.in
       
    13  LIBXUL_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(topsrcdir))
       
    14  endif
       
    15  
       
    16 +ifdef MOZ_MEMORY
       
    17 +ifeq ($(OS_ARCH),SunOS)
       
    18 +OS_LDFLAGS +=  $(LIBXUL_DIST)/lib/libmemory.a
       
    19 +endif
       
    20 +endif
       
    21 +
       
    22 +ifeq ($(OS_ARCH),SunOS)
       
    23 +OS_LDFLAGS +=  -lm -Wl,-z,defs
       
    24 +endif
       
    25 +
       
    26  # BFD ld doesn't create multiple PT_LOADs as usual when an unknown section
       
    27  # exists. Using an implicit linker script to make it fold that section in
       
    28  # .data.rel.ro makes it create multiple PT_LOADs. That implicit linker
       
    29  # script however makes gold misbehave, first because it doesn't like that
       
    30  # the linker script is given after crtbegin.o, and even past that, replaces
       
    31  # the default section rules with those from the script instead of
       
    32  # supplementing them. Which leads to a lib with a huge load of sections.
       
    33  ifneq (OpenBSD,$(OS_TARGET))
       
    34 @@ -58,8 +68,12 @@ else
       
    35  get_first_and_last = $(TOOLCHAIN_PREFIX)nm -g $1 | grep _NSModule$$ | grep -vw refptr | sort | sed -n 's/^.* _*\([^ ]*\)$$/\1/;1p;$$p'
       
    36  endif
       
    37  
       
    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
       
    39  
       
    40  ifeq (Linux,$(OS_ARCH))
       
    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
       
    42  endif
       
    43 +
       
    44 +ifeq (SunOS,$(OS_ARCH))
       
    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
       
    46 +endif