void-packages/srcpkgs/qt5/patches/0093-chromium-v8-elfv2.patch
John bebf09a3b3 qt5: update to 5.13.0
qt5: update ppc64(le) support + add big endian
2019-07-11 04:29:48 +00:00

43 lines
1.7 KiB
Diff

This fixes v8 on big endian ppc64 ELFv2.
--- qtwebengine/src/3rdparty/chromium/v8/src/ppc/constants-ppc.h
+++ qtwebengine/src/3rdparty/chromium/v8/src/ppc/constants-ppc.h
@@ -21,7 +21,8 @@
#endif
#if V8_HOST_ARCH_PPC && \
- (V8_OS_AIX || (V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN))
+ (V8_OS_AIX || (V8_TARGET_ARCH_PPC64 && \
+ (V8_TARGET_BIG_ENDIAN && (!defined(_CALL_ELF) || _CALL_ELF == 1))))
#define ABI_USES_FUNCTION_DESCRIPTORS 1
#else
#define ABI_USES_FUNCTION_DESCRIPTORS 0
@@ -33,13 +34,15 @@
#define ABI_PASSES_HANDLES_IN_REGS 0
#endif
-#if !V8_HOST_ARCH_PPC || !V8_TARGET_ARCH_PPC64 || V8_TARGET_LITTLE_ENDIAN
+#if !V8_HOST_ARCH_PPC || !V8_TARGET_ARCH_PPC64 || \
+ (V8_TARGET_LITTLE_ENDIAN || (defined(_CALL_ELF) && _CALL_ELF == 2))
#define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 1
#else
#define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 0
#endif
-#if !V8_HOST_ARCH_PPC || (V8_TARGET_ARCH_PPC64 && V8_TARGET_LITTLE_ENDIAN)
+#if !V8_HOST_ARCH_PPC || (V8_TARGET_ARCH_PPC64 && \
+ (V8_TARGET_LITTLE_ENDIAN || (defined(_CALL_ELF) && _CALL_ELF == 2)))
#define ABI_CALL_VIA_IP 1
#else
#define ABI_CALL_VIA_IP 0
--- qtwebengine/src/3rdparty/chromium/v8/src/ppc/register-ppc.h
+++ qtwebengine/src/3rdparty/chromium/v8/src/ppc/register-ppc.h
@@ -145,7 +145,8 @@ const int kNumSafepointRegisters = 32;
// The following constants describe the stack frame linkage area as
// defined by the ABI. Note that kNumRequiredStackFrameSlots must
// satisfy alignment requirements (rounding up if required).
-#if V8_TARGET_ARCH_PPC64 && V8_TARGET_LITTLE_ENDIAN // ppc64le linux
+#if V8_TARGET_ARCH_PPC64 && (V8_TARGET_LITTLE_ENDIAN || \
+ defined(_CALL_ELF) && _CALL_ELF == 2)
// [0] back chain
// [1] condition register save area
// [2] link register save area