mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/qtcreator fix
This commit is contained in:
parent
e35db8b460
commit
17fda6681b
2 changed files with 103 additions and 5 deletions
|
@ -0,0 +1,94 @@
|
||||||
|
From c6d02dba2911d93e2379cfb5e550b93558dd51bf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Greg Nietsky <gregory@distrotech.co.za>
|
||||||
|
Date: Tue, 4 Mar 2014 11:33:40 +0200
|
||||||
|
Subject: [PATCH] Fix: Allow qt-creator to build on arm aarch32 and aarch64
|
||||||
|
|
||||||
|
Botan is imported hardwired for x86 this small patch allows it
|
||||||
|
too operate on arm other platforms could be added.
|
||||||
|
|
||||||
|
Task-number: QTCREATORBUG-8107
|
||||||
|
Change-Id: Iddea28f21c9fa1afd2fdd5d16a44e6c96a516a7a
|
||||||
|
---
|
||||||
|
src/libs/3rdparty/botan/botan.cpp | 16 +++++++++++++++-
|
||||||
|
src/libs/3rdparty/botan/botan.h | 2 ++
|
||||||
|
2 files changed, 17 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/libs/3rdparty/botan/botan.cpp b/src/libs/3rdparty/botan/botan.cpp
|
||||||
|
index 917c385..4364a2e 100644
|
||||||
|
--- a/src/libs/3rdparty/botan/botan.cpp
|
||||||
|
+++ b/src/libs/3rdparty/botan/botan.cpp
|
||||||
|
@@ -1101,6 +1101,8 @@ class Montgomery_Exponentiator : public Modular_Exponentiator
|
||||||
|
|
||||||
|
#if (BOTAN_MP_WORD_BITS != 32)
|
||||||
|
#error The mp_x86_32 module requires that BOTAN_MP_WORD_BITS == 32
|
||||||
|
+#elif !defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
|
||||||
|
+typedef Botan::u64bit dword;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_OS_UNIX
|
||||||
|
@@ -1118,6 +1120,7 @@ extern "C" {
|
||||||
|
*/
|
||||||
|
inline word word_madd2(word a, word b, word* c)
|
||||||
|
{
|
||||||
|
+#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
|
||||||
|
asm(
|
||||||
|
ASM("mull %[b]")
|
||||||
|
ASM("addl %[c],%[a]")
|
||||||
|
@@ -1127,6 +1130,11 @@ inline word word_madd2(word a, word b, word* c)
|
||||||
|
: "0"(a), "1"(b), [c]"g"(*c) : "cc");
|
||||||
|
|
||||||
|
return a;
|
||||||
|
+#else
|
||||||
|
+ dword z = (dword)a * b + *c;
|
||||||
|
+ *c = (word)(z >> BOTAN_MP_WORD_BITS);
|
||||||
|
+ return (word)z;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -1134,6 +1142,7 @@ inline word word_madd2(word a, word b, word* c)
|
||||||
|
*/
|
||||||
|
inline word word_madd3(word a, word b, word c, word* d)
|
||||||
|
{
|
||||||
|
+#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
|
||||||
|
asm(
|
||||||
|
ASM("mull %[b]")
|
||||||
|
|
||||||
|
@@ -1147,6 +1156,11 @@ inline word word_madd3(word a, word b, word c, word* d)
|
||||||
|
: "0"(a), "1"(b), [c]"g"(c), [d]"g"(*d) : "cc");
|
||||||
|
|
||||||
|
return a;
|
||||||
|
+#else
|
||||||
|
+ dword z = (dword)a * b + c + *d;
|
||||||
|
+ *d = (word)(z >> BOTAN_MP_WORD_BITS);
|
||||||
|
+ return (word)z;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@@ -2315,7 +2329,7 @@ namespace Botan {
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
-#ifdef Q_OS_UNIX
|
||||||
|
+#if defined(Q_OS_UNIX) && defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
|
||||||
|
/*
|
||||||
|
* Helper Macros for x86 Assembly
|
||||||
|
*/
|
||||||
|
diff --git a/src/libs/3rdparty/botan/botan.h b/src/libs/3rdparty/botan/botan.h
|
||||||
|
index 6a9cbe0..3bfdbc2 100644
|
||||||
|
--- a/src/libs/3rdparty/botan/botan.h
|
||||||
|
+++ b/src/libs/3rdparty/botan/botan.h
|
||||||
|
@@ -81,7 +81,9 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN
|
||||||
|
+#if !defined(__arm__) && !defined(__aarch64__)
|
||||||
|
#define BOTAN_TARGET_CPU_IS_X86_FAMILY
|
||||||
|
+#endif
|
||||||
|
#define BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK 1
|
||||||
|
|
||||||
|
#if defined(BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN) || \
|
||||||
|
--
|
||||||
|
2.3.0
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# Contributor: delor <bartekpiech gmail com>
|
# Contributor: delor <bartekpiech gmail com>
|
||||||
|
|
||||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
# - depend on botan, configure with USE_SYSTEM_BOTAN=1
|
# - patch distributed botan version for ARM
|
||||||
# - drop valgrind optdepend
|
# - drop valgrind optdepend
|
||||||
|
|
||||||
pkgname=qtcreator
|
pkgname=qtcreator
|
||||||
|
@ -18,7 +18,7 @@ pkgdesc='Lightweight, cross-platform integrated development environment'
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url='http://qt-project.org'
|
url='http://qt-project.org'
|
||||||
license=('LGPL')
|
license=('LGPL')
|
||||||
depends=('qt5-quick1' 'qt5-tools' 'qt5-quickcontrols' 'botan')
|
depends=('qt5-quick1' 'qt5-tools' 'qt5-quickcontrols')
|
||||||
makedepends=('git' 'clang')
|
makedepends=('git' 'clang')
|
||||||
options=('docs')
|
options=('docs')
|
||||||
optdepends=('qt5-doc: for the integrated Qt documentation'
|
optdepends=('qt5-doc: for the integrated Qt documentation'
|
||||||
|
@ -32,23 +32,27 @@ optdepends=('qt5-doc: for the integrated Qt documentation'
|
||||||
install=qtcreator.install
|
install=qtcreator.install
|
||||||
source=("git+https://gitorious.org/qt-creator/qt-creator.git#tag=${_pkgver}"
|
source=("git+https://gitorious.org/qt-creator/qt-creator.git#tag=${_pkgver}"
|
||||||
"git+https://gitorious.org/qt-labs/qbs.git"
|
"git+https://gitorious.org/qt-labs/qbs.git"
|
||||||
'qtcreator.desktop')
|
'qtcreator.desktop'
|
||||||
|
'0001-Fix-Allow-qt-creator-to-build-on-arm-aarch32-and-aar.patch')
|
||||||
md5sums=('SKIP'
|
md5sums=('SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'50880836fd62ccd87550940feb995f06')
|
'50880836fd62ccd87550940feb995f06'
|
||||||
|
'49924cb71a664d079b8283a7173bc14f')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd qt-creator
|
cd qt-creator
|
||||||
git submodule init
|
git submodule init
|
||||||
git config submodule.qbs.url $srcdir/qbs
|
git config submodule.qbs.url $srcdir/qbs
|
||||||
git submodule update
|
git submodule update
|
||||||
|
|
||||||
|
git apply ../0001-Fix-Allow-qt-creator-to-build-on-arm-aarch32-and-aar.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
[[ -d build ]] && rm -r build
|
[[ -d build ]] && rm -r build
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
|
|
||||||
LLVM_INSTALL_DIR=/usr qmake -r ../qt-creator/qtcreator.pro USE_SYSTEM_BOTAN=1
|
LLVM_INSTALL_DIR=/usr qmake -r ../qt-creator/qtcreator.pro
|
||||||
make
|
make
|
||||||
make docs -j1
|
make docs -j1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue