mozilla-ppc64.patch
changeset 355 91b462c0fd72
child 356 30a00f382aed
equal deleted inserted replaced
354:7044f3366d64 355:91b462c0fd72
       
     1 # HG changeset patch
       
     2 # Parent 87e43d08cce58b76e1910946c36c6465bb4c74e6
       
     3 From: upstream
       
     4 Subject: Fix PPC64 build
       
     5 https://bugzilla.mozilla.org/show_bug.cgi?id=670719
       
     6 https://bugzilla.mozilla.org/show_bug.cgi?id=654056
       
     7 
       
     8 diff --git a/ipc/chromium/src/build/build_config.h b/ipc/chromium/src/build/build_config.h
       
     9 --- a/ipc/chromium/src/build/build_config.h
       
    10 +++ b/ipc/chromium/src/build/build_config.h
       
    11 @@ -52,16 +52,19 @@
       
    12  #define ARCH_CPU_X86_FAMILY 1
       
    13  #define ARCH_CPU_X86 1
       
    14  #define ARCH_CPU_32_BITS 1
       
    15  #elif defined(__ARMEL__)
       
    16  #define ARCH_CPU_ARM_FAMILY 1
       
    17  #define ARCH_CPU_ARMEL 1
       
    18  #define ARCH_CPU_32_BITS 1
       
    19  #define WCHAR_T_IS_UNSIGNED 1
       
    20 +#elif defined(__powerpc64__)
       
    21 +#define ARCH_CPU_PPC64 1
       
    22 +#define ARCH_CPU_64_BITS 1
       
    23  #elif defined(__ppc__) || defined(__powerpc__)
       
    24  #define ARCH_CPU_PPC 1
       
    25  #define ARCH_CPU_32_BITS 1
       
    26  #else
       
    27  #error Please add support for your architecture in build/build_config.h
       
    28  #endif
       
    29  
       
    30  // Type detection for wchar_t.
       
    31 diff --git a/js/src/Makefile.in b/js/src/Makefile.in
       
    32 --- a/js/src/Makefile.in
       
    33 +++ b/js/src/Makefile.in
       
    34 @@ -433,16 +433,18 @@ CPPSRCS += \
       
    35  		YarrPattern.cpp \
       
    36  		YarrSyntaxChecker.cpp \
       
    37  		$(NULL)
       
    38  else
       
    39  
       
    40  ###############################################
       
    41  # BEGIN include sources for the Nitro assembler
       
    42  #
       
    43 +ENABLE_YARR_JIT = 1
       
    44 +
       
    45  VPATH += 	$(srcdir)/assembler \
       
    46  		$(srcdir)/assembler/wtf \
       
    47  		$(srcdir)/assembler/jit \
       
    48  		$(srcdir)/assembler/assembler \
       
    49  		$(srcdir)/methodjit \
       
    50  		$(srcdir)/yarr \
       
    51  		$(NONE)
       
    52  
       
    53 @@ -1076,17 +1078,21 @@ endif
       
    54  
       
    55  ###############################################
       
    56  # BEGIN kludges for the Nitro assembler
       
    57  #
       
    58  
       
    59  # Needed to "configure" it correctly.  Unfortunately these
       
    60  # flags wind up being applied to all code in js/src, not just
       
    61  # the code in js/src/assembler.
       
    62 -CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1
       
    63 +CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
       
    64 +
       
    65 +ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT))
       
    66 +CXXFLAGS +=  -DENABLE_JIT=1
       
    67 +endif
       
    68  
       
    69  INCLUDES +=	-I$(srcdir)/assembler -I$(srcdir)/yarr
       
    70  
       
    71  ifdef ENABLE_METHODJIT
       
    72  # Build a standalone test program that exercises the assembler
       
    73  # sources a bit.
       
    74  TESTMAIN_OBJS = \
       
    75  		Assertions.$(OBJ_SUFFIX) \