[GTK] Fix the build of FTL JIT
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Nov 2014 07:53:11 +0000 (07:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Nov 2014 07:53:11 +0000 (07:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138298

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-11-02
Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/OptionsGTK.cmake:
Remove the need for the LIBCXXABI package.

Tools:

* gtk/jhbuild-optional.modules:
Bump up LLVM version to 3.5.0 release and apply patches.
* gtk/patches/llvm-elf-add-stackmaps.patch:
Added. Adds .llvm_stackmaps section to ELF files. Backported from LLVM
trunk.
* gtk/patches/llvm-elf-fix-x86_64-fdecfiencoding.patch:
Added. Ensures that PC-relative relocations in EH frames are not
truncated to 32 bits on x86_64.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175465 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/cmake/OptionsGTK.cmake
Tools/ChangeLog
Tools/gtk/jhbuild-optional.modules
Tools/gtk/patches/llvm-elf-add-stackmaps.patch [new file with mode: 0644]
Tools/gtk/patches/llvm-elf-fix-x86_64-fdecfiencoding.patch [new file with mode: 0644]

index 29970a9..ad6da81 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2014-11-02  Akos Kiss  <akiss@inf.u-szeged.hu>
+
+        [GTK] Fix the build of FTL JIT
+        https://bugs.webkit.org/show_bug.cgi?id=138298
+
+        Reviewed by Carlos Garcia Campos.
+
+        * Source/cmake/OptionsGTK.cmake:
+        Remove the need for the LIBCXXABI package.
+
 2014-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         REGRESSION(CMake): Make it possible to build without introspection
index e3f5f7f..2cd5116 100644 (file)
@@ -314,7 +314,6 @@ endif ()
 
 if (ENABLE_FTL_JIT)
     find_package(LLVM REQUIRED)
-    find_package(LIBCXXABI REQUIRED)
     set(HAVE_LLVM ON)
 endif ()
 
index fb5f837..6da4b11 100644 (file)
@@ -1,3 +1,19 @@
+2014-11-02  Akos Kiss  <akiss@inf.u-szeged.hu>
+
+        [GTK] Fix the build of FTL JIT
+        https://bugs.webkit.org/show_bug.cgi?id=138298
+
+        Reviewed by Carlos Garcia Campos.
+
+        * gtk/jhbuild-optional.modules:
+        Bump up LLVM version to 3.5.0 release and apply patches.
+        * gtk/patches/llvm-elf-add-stackmaps.patch:
+        Added. Adds .llvm_stackmaps section to ELF files. Backported from LLVM
+        trunk.
+        * gtk/patches/llvm-elf-fix-x86_64-fdecfiencoding.patch:
+        Added. Ensures that PC-relative relocations in EH frames are not
+        truncated to 32 bits on x86_64.
+
 2014-10-31  Michael Saboff  <msaboff@apple.com>
 
         No way to specify target os or architecture when using the --no-copy option with run-jsc-stress-tests
index e49c623..3cc9164 100644 (file)
@@ -9,8 +9,8 @@
 
   <repository type="tarball" name="ftp.gnome.org"
       href="http://ftp.gnome.org"/>
-  <repository type="svn" name="llvm.org"
-      href="http://llvm.org/svn/llvm-project/llvm/"/>
+  <repository type="tarball" name="llvm.org"
+      href="http://llvm.org"/>
 
   <autotools id="libsecret" autogen-sh="configure">
     <branch repo="ftp.gnome.org"
     </dependencies>
   </autotools>
 
-  <autotools id="llvm" autogenargs="--enable-optimized --disable-terminfo --disable-zlib">
-    <branch repo="llvm.org" module="trunk" checkoutdir="llvm" version="r206311"
-            revision="206311"/>
+  <autotools id="llvm"
+             autogenargs="--enable-optimized --disable-terminfo --disable-zlib --enable-targets=host --disable-backtraces --disable-crash-overrides --disable-expensive-checks --disable-debug-runtime --disable-assertions">
+    <branch repo="llvm.org"
+            module="/releases/3.5.0/llvm-3.5.0.src.tar.xz" version="3.5.0" checkoutdir="llvm-3.5.0"
+            hash="sha256:28e199f368ef0a4666708f31c7991ad3bcc3a578342b0306526dd35f07595c03">
+      <patch file="llvm-elf-fix-x86_64-fdecfiencoding.patch" strip="1"/>
+      <patch file="llvm-elf-add-stackmaps.patch" strip="1"/>
+    </branch>
   </autotools>
 
 </moduleset>
diff --git a/Tools/gtk/patches/llvm-elf-add-stackmaps.patch b/Tools/gtk/patches/llvm-elf-add-stackmaps.patch
new file mode 100644 (file)
index 0000000..877214d
--- /dev/null
@@ -0,0 +1,46 @@
+commit ec9de4677ac61f2164d7c80cae5da0008189efa3
+Author: Philip Reames <listmail@philipreames.com>
+Date:   Fri Aug 1 18:47:09 2014 +0000
+
+    Add support for StackMap section for ELF/Linux systems
+    
+    This patch adds code to emits the StackMap section on ELF systems. This section is required to support llvm.experimental.stackmap and llvm.experimental.patchpoint intrinsics.
+    
+    Reviewers: ributzka, echristo
+    
+    Differential Revision: http://reviews.llvm.org/D4574
+    
+    
+    
+    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214538 91177308-0d34-0410-b5e6-96231b3b80d8
+
+diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp
+index df5787c..da707d8 100644
+--- a/lib/MC/MCObjectFileInfo.cpp
++++ b/lib/MC/MCObjectFileInfo.cpp
+@@ -583,6 +583,12 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
+   DwarfAddrSection =
+     Ctx->getELFSection(".debug_addr", ELF::SHT_PROGBITS, 0,
+                        SectionKind::getMetadata());
++
++  StackMapSection =
++    Ctx->getELFSection(".llvm_stackmaps", ELF::SHT_PROGBITS,
++                       ELF::SHF_ALLOC,
++                       SectionKind::getMetadata());
++
+ }
+diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp
+index 3c22e88..fc0d408 100644
+--- a/lib/Target/X86/X86AsmPrinter.cpp
++++ b/lib/Target/X86/X86AsmPrinter.cpp
+@@ -736,6 +736,8 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
+       }
+       Stubs.clear();
+     }
++
++    SM.serializeToStackMapSection();
+   }
+ }
diff --git a/Tools/gtk/patches/llvm-elf-fix-x86_64-fdecfiencoding.patch b/Tools/gtk/patches/llvm-elf-fix-x86_64-fdecfiencoding.patch
new file mode 100644 (file)
index 0000000..b85c12e
--- /dev/null
@@ -0,0 +1,13 @@
+diff -ru llvm-3.5.0/lib/MC/MCObjectFileInfo.cpp llvm-3.5.0.patched/lib/MC/MCObjectFileInfo.cpp
+--- llvm-3.5.0/lib/MC/MCObjectFileInfo.cpp     2014-06-25 14:41:52.000000000 +0200
++++ llvm-3.5.0.patched/lib/MC/MCObjectFileInfo.cpp     2014-11-02 11:58:39.410521253 +0100
+@@ -274,6 +274,9 @@
+   case Triple::mips64el:
+     FDECFIEncoding = dwarf::DW_EH_PE_sdata8;
+     break;
++  case Triple::x86_64:
++    FDECFIEncoding = dwarf::DW_EH_PE_pcrel;
++    break;
+   default:
+     FDECFIEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
+     break;