git » qt5-script.git » commit acee952

Update to 5.15.8, fix build with LTO

author Antonio Rojas
2022-01-05 09:12:52 UTC
committer Antonio Rojas
2022-01-05 09:12:52 UTC
parent 1085bc30da7a552f9d1ae792043be9e982899462

Update to 5.15.8, fix build with LTO

PKGBUILD +6 -3
qt5-script-lto.patch +11 -0

diff --git a/PKGBUILD b/PKGBUILD
index 57c162d..be247f9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
 # Contributor: Andrea Scarpino <andrea@archlinux.org>
 
 pkgname=qt5-script
-_qtver=5.15.7
+_qtver=5.15.8
 pkgver=${_qtver/-/}
 pkgrel=1
 arch=('x86_64')
@@ -13,11 +13,14 @@ depends=('qt5-base')
 makedepends=('git')
 groups=('qt' 'qt5')
 _pkgfqn=${pkgname/5-/}
-source=(git+https://code.qt.io/qt/$_pkgfqn.git#tag=v${pkgver}-lts)
-sha256sums=('SKIP')
+source=(git+https://code.qt.io/qt/$_pkgfqn.git#tag=v${pkgver}-lts
+        qt5-script-lto.patch)
+sha256sums=('SKIP'
+            '48da16d6fff324db3aed7b0ad455894250ffbf29613cd60c8879027567d9abb5')
 
 prepare() {
   mkdir -p build
+  patch -d $_pkgfqn -p1 < qt5-script-lto.patch # Fix build with LTO
 }
 
 build() {
diff --git a/qt5-script-lto.patch b/qt5-script-lto.patch
new file mode 100644
index 0000000..7657f81
--- /dev/null
+++ b/qt5-script-lto.patch
@@ -0,0 +1,11 @@
+--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h.orig    2016-02-03 13:46:12.000000000 +0100
++++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h 2016-04-24 14:24:42.396004500 +0200
+@@ -316,7 +316,7 @@
+     EncodedJSValue JIT_STUB cti_op_to_primitive(STUB_ARGS_DECLARATION);
+     EncodedJSValue JIT_STUB cti_op_typeof(STUB_ARGS_DECLARATION);
+     EncodedJSValue JIT_STUB cti_op_urshift(STUB_ARGS_DECLARATION);
+-    EncodedJSValue JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION);
++    EncodedJSValue JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION) __attribute__((used));
+     EncodedJSValue JIT_STUB cti_to_object(STUB_ARGS_DECLARATION);
+     JSObject* JIT_STUB cti_op_construct_JSConstruct(STUB_ARGS_DECLARATION);
+     JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION);