mozilla-ppc64le-javascript.patch
changeset 710 5341dc98d26c
equal deleted inserted replaced
709:7ce157f366c9 710:5341dc98d26c
       
     1 # HG changeset patch
       
     2 # Parent e6f9fc7c1611990ed9fdafd3ff19c79fd356a1d6
       
     3 # User Ulrich Weigand <uweigand@de.ibm.com>
       
     4 Bug 976648 - powerpc64le-linux support - JavaScript build/config
       
     5 
       
     6 diff --git a/js/src/assembler/wtf/Platform.h b/js/src/assembler/wtf/Platform.h
       
     7 --- a/js/src/assembler/wtf/Platform.h
       
     8 +++ b/js/src/assembler/wtf/Platform.h
       
     9 @@ -160,26 +160,32 @@
       
    10  /* WTF_CPU_PPC - PowerPC 32-bit */
       
    11  #if   defined(__ppc__)     \
       
    12      || defined(__PPC__)     \
       
    13      || defined(__powerpc__) \
       
    14      || defined(__powerpc)   \
       
    15      || defined(__POWERPC__) \
       
    16      || defined(_M_PPC)      \
       
    17      || defined(__PPC)
       
    18 +#if !defined(__ppc64__) && !defined(__PPC64__)
       
    19  #define WTF_CPU_PPC 1
       
    20 +#endif
       
    21 +#if !defined(__LITTLE_ENDIAN__)
       
    22  #define WTF_CPU_BIG_ENDIAN 1
       
    23  #endif
       
    24 +#endif
       
    25  
       
    26  /* WTF_CPU_PPC64 - PowerPC 64-bit */
       
    27  #if   defined(__ppc64__) \
       
    28      || defined(__PPC64__)
       
    29  #define WTF_CPU_PPC64 1
       
    30 +#if !defined(__LITTLE_ENDIAN__)
       
    31  #define WTF_CPU_BIG_ENDIAN 1
       
    32  #endif
       
    33 +#endif
       
    34  
       
    35  /* WTF_CPU_SH4 - SuperH SH-4 */
       
    36  #if defined(__SH4__)
       
    37  #define WTF_CPU_SH4 1
       
    38  #endif
       
    39  
       
    40  /* WTF_CPU_SPARC32 - SPARC 32-bit */
       
    41  #if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
       
    42 diff --git a/js/src/configure.in b/js/src/configure.in
       
    43 --- a/js/src/configure.in
       
    44 +++ b/js/src/configure.in
       
    45 @@ -923,17 +923,17 @@ esac
       
    46  
       
    47  # Only set CPU_ARCH if we recognize the value of OS_TEST
       
    48  
       
    49  case "$OS_TEST" in
       
    50  *86 | i86pc)
       
    51      CPU_ARCH=x86
       
    52      ;;
       
    53  
       
    54 -powerpc64 | ppc64)
       
    55 +powerpc64 | ppc64 | powerpc64le | ppc64le)
       
    56      CPU_ARCH=ppc64
       
    57      ;;
       
    58  
       
    59  powerpc | ppc | rs6000)
       
    60      CPU_ARCH=ppc
       
    61      ;;
       
    62  
       
    63  Alpha | alpha | ALPHA)
       
    64 diff --git a/js/src/jscpucfg.h b/js/src/jscpucfg.h
       
    65 --- a/js/src/jscpucfg.h
       
    66 +++ b/js/src/jscpucfg.h
       
    67 @@ -22,17 +22,17 @@
       
    68  
       
    69  # ifdef __WATCOMC__
       
    70  #  define HAVE_VA_LIST_AS_ARRAY 1
       
    71  # endif
       
    72  
       
    73  # define IS_LITTLE_ENDIAN 1
       
    74  # undef  IS_BIG_ENDIAN
       
    75  
       
    76 -#elif defined(__APPLE__)
       
    77 +#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__)
       
    78  # if __LITTLE_ENDIAN__
       
    79  #  define IS_LITTLE_ENDIAN 1
       
    80  #  undef  IS_BIG_ENDIAN
       
    81  # elif __BIG_ENDIAN__
       
    82  #  undef  IS_LITTLE_ENDIAN
       
    83  #  define IS_BIG_ENDIAN 1
       
    84  # endif
       
    85  
       
    86 @@ -84,18 +84,17 @@
       
    87  #  if defined(_STACK_GROWS_UPWARD)
       
    88  #   define JS_STACK_GROWTH_DIRECTION (1)
       
    89  #  elif defined(_STACK_GROWS_DOWNWARD)
       
    90  #   define JS_STACK_GROWTH_DIRECTION (-1)
       
    91  #  endif
       
    92  # endif
       
    93  
       
    94  #elif defined(__sparc) || defined(__sparc__) || \
       
    95 -      defined(_POWER) || defined(__powerpc__) || \
       
    96 -      defined(__ppc__) || defined(__hppa) || \
       
    97 +      defined(_POWER) || defined(__hppa) || \
       
    98        defined(_MIPSEB) || defined(_BIG_ENDIAN)
       
    99  /* IA64 running HP-UX will have _BIG_ENDIAN defined.
       
   100   * IA64 running Linux will have endian.h and be handled above.
       
   101   */
       
   102  # undef IS_LITTLE_ENDIAN
       
   103  # define IS_BIG_ENDIAN 1
       
   104  
       
   105  #else /* !defined(__sparc) && !defined(__sparc__) && ... */