]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/qt5/qt5webkit/5.6.2/0002-Remove-TEXTREL-tag-in-x86.patch
support/testing: update ISO9660 test case Linux kernel
[coffee/buildroot.git] / package / qt5 / qt5webkit / 5.6.2 / 0002-Remove-TEXTREL-tag-in-x86.patch
1 From ae16ce17cc7060274a0b0c165b953fc32540f977 Mon Sep 17 00:00:00 2001
2 From: Magnus Granberg <zorry@gentoo.org>
3 Date: Fri, 27 Feb 2015 11:55:09 +0100
4 Subject: [PATCH] Remove TEXTREL tag in x86
5
6 Fix textrel QA warnings when building qtwebkit for x86:
7
8   WARNING: QA Issue: ELF binary '/home/andre/rdk/rdk-master/build-vbox32/tmp/work/core2-32-rdk-linux/qtwebkit/5.4.0-r0/packages-split/qtwebkit/usr/lib/libQt5WebKit.so.5.4.0' has relocations in .text [textrel]
9
10 Patch from upstream webkit:
11
12   https://bugs.webkit.org/show_bug.cgi?id=70610
13
14 Minor refresh required to apply cleanly to the older webkit sources used
15 by qtwebkit. Specifically, the patch needed to be modified to account
16 for PLATFORM(MAC) -> OS(DARWIN) renaming in recent webkit which is not
17 part of qtwebkit yet ( https://bugs.webkit.org/show_bug.cgi?id=99683 ).
18
19 Upstream status [webkit] : backport
20 Upstream status [qtwebkit] : unclear
21
22 Bug: https://bugs.webkit.org/show_bug.cgi?id=70610
23 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
24
25 Downloaded from:
26 https://github.com/meta-qt5/meta-qt5/blob/krogoth/recipes-qt/qt5/qtwebkit/
27 0002-Remove-TEXTREL-tag-in-x86.patch
28
29 Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
30 ---
31  Source/JavaScriptCore/jit/ThunkGenerators.cpp | 24 ++++++++++++++++++++++++
32  Source/WTF/wtf/InlineASM.h                    |  2 ++
33  2 files changed, 26 insertions(+)
34
35 diff --git a/Source/JavaScriptCore/jit/ThunkGenerators.cpp b/Source/JavaScriptCore/jit/ThunkGenerators.cpp
36 index 9684df2..8af82d8 100644
37 --- a/Source/JavaScriptCore/jit/ThunkGenerators.cpp
38 +++ b/Source/JavaScriptCore/jit/ThunkGenerators.cpp
39 @@ -524,6 +524,30 @@ double jsRound(double d)
40      } \
41      static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
42  
43 +#elif CPU(X86) && COMPILER(GCC) && OS(LINUX) && defined(__PIC__)
44 +#define defineUnaryDoubleOpWrapper(function) \
45 +    asm( \
46 +        ".text\n" \
47 +        ".globl " SYMBOL_STRING(function##Thunk) "\n" \
48 +        HIDE_SYMBOL(function##Thunk) "\n" \
49 +        SYMBOL_STRING(function##Thunk) ":" "\n" \
50 +        "pushl %ebx\n" \
51 +        "subl $20, %esp\n" \
52 +        "movsd %xmm0, (%esp) \n" \
53 +        "call __x86.get_pc_thunk.bx\n" \
54 +        "addl $_GLOBAL_OFFSET_TABLE_, %ebx\n" \
55 +        "call " GLOBAL_REFERENCE(function) "\n" \
56 +        "fstpl (%esp) \n" \
57 +        "movsd (%esp), %xmm0 \n" \
58 +        "addl $20, %esp\n" \
59 +        "popl %ebx\n" \
60 +        "ret\n" \
61 +    );\
62 +    extern "C" { \
63 +        MathThunkCallingConvention function##Thunk(MathThunkCallingConvention); \
64 +    } \
65 +    static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
66 +
67  #elif CPU(X86) && COMPILER(GCC) && (PLATFORM(MAC) || OS(LINUX))
68  #define defineUnaryDoubleOpWrapper(function) \
69      asm( \
70 diff --git a/Source/WTF/wtf/InlineASM.h b/Source/WTF/wtf/InlineASM.h
71 index 0a2fe78..2dc40ef 100644
72 --- a/Source/WTF/wtf/InlineASM.h
73 +++ b/Source/WTF/wtf/InlineASM.h
74 @@ -46,6 +46,8 @@
75  #define GLOBAL_REFERENCE(name) #name "@plt"
76  #elif CPU(X86) && COMPILER(MINGW)
77  #define GLOBAL_REFERENCE(name) "@" #name "@4"
78 +#elif OS(LINUX) && CPU(X86) && defined(__PIC__)
79 +#define GLOBAL_REFERENCE(name) SYMBOL_STRING(name) "@plt"
80  #else
81  #define GLOBAL_REFERENCE(name) SYMBOL_STRING(name)
82  #endif
83 -- 
84 2.7.0
85