aboutsummaryrefslogtreecommitdiffstats
path: root/testing/neko
diff options
context:
space:
mode:
authorAndy Li <andy@onthewings.net>2017-10-20 03:14:18 +0800
committerNatanael Copa <ncopa@alpinelinux.org>2017-10-26 09:50:03 +0000
commit1bfdcf019bf1dd8473f49e55d9152f3bd2a2d638 (patch)
tree540b56a5c229b7d3bac90200d6c4d43238f514d9 /testing/neko
parentd8b8e7aa9cda382110db3d2f9a40bb7cdeea8ec1 (diff)
downloadaports-1bfdcf019bf1dd8473f49e55d9152f3bd2a2d638.tar.bz2
aports-1bfdcf019bf1dd8473f49e55d9152f3bd2a2d638.tar.xz
testing/neko: only use -mincoming-stack-boundary when it is available
Diffstat (limited to 'testing/neko')
-rw-r--r--testing/neko/APKBUILD4
-rw-r--r--testing/neko/mincoming-stack-boundary.patch36
2 files changed, 39 insertions, 1 deletions
diff --git a/testing/neko/APKBUILD b/testing/neko/APKBUILD
index ae64980b22..de4ce07b15 100644
--- a/testing/neko/APKBUILD
+++ b/testing/neko/APKBUILD
@@ -17,6 +17,7 @@ subpackages="$pkgname-dev $pkgname-libs"
source="$pkgname-$pkgver.tar.gz::https://github.com/HaxeFoundation/neko/archive/v${pkgver//./-}.tar.gz
compilation-fixes.patch
nojit.patch
+ mincoming-stack-boundary.patch
"
builddir="$srcdir/$pkgname-${pkgver//./-}"
@@ -41,4 +42,5 @@ package() {
}
sha512sums="a3a4e1064cf3a73b07d39eba62b261b3e954a74d71f588e90904ebdab2f3fc9f75c37a0788de0a354df9fddff412076cc321b6b33d529e69acccf403889a01b0 neko-2.1.0.tar.gz
8d2c7be3db571f1bd1efe75209941fb1c2feb133015950be70aa31a7d55e4f5918ddb84bde4bbcce514b876c93173d7d7157481e7ce9e96d98c4229e7695d9ee compilation-fixes.patch
-60023ab071fdaed40ccfcf452b7490f52bde04eac1586e66d93206dec66d2fb5f00a013dc93e4310dd40a0ca3e340e3b27a67ae9bb55a7a604d81e7a60acc01d nojit.patch"
+60023ab071fdaed40ccfcf452b7490f52bde04eac1586e66d93206dec66d2fb5f00a013dc93e4310dd40a0ca3e340e3b27a67ae9bb55a7a604d81e7a60acc01d nojit.patch
+bf6a42154070e9d7d5b65f9094f070e8d4965e4828f6b98d46ae4959a6cc13fbb3b46739e12b5125941da6ea9293ed0dd4d149885331925356395940d14e94ac mincoming-stack-boundary.patch"
diff --git a/testing/neko/mincoming-stack-boundary.patch b/testing/neko/mincoming-stack-boundary.patch
new file mode 100644
index 0000000000..30c6e98275
--- /dev/null
+++ b/testing/neko/mincoming-stack-boundary.patch
@@ -0,0 +1,36 @@
+From 4b78044643c459a63bc87f6eadd50991df0301c7 Mon Sep 17 00:00:00 2001
+From: Andy Li <andy@onthewings.net>
+Date: Mon, 6 Jun 2016 22:22:57 +0000
+Subject: [PATCH] only use -mincoming-stack-boundary when it is available
+ From upstream: https://github.com/HaxeFoundation/neko/commit/4b78044643c459a63bc87f6eadd50991df0301c7
+
+---
+ CMakeLists.txt | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+Index: neko-debian/CMakeLists.txt
+===================================================================
+--- neko-debian.orig/CMakeLists.txt
++++ neko-debian/CMakeLists.txt
+@@ -1,5 +1,6 @@
+ cmake_minimum_required(VERSION 2.8.7)
+
++include(CheckCCompilerFlag)
+ project(neko C)
+
+ set(CMAKE_OSX_ARCHITECTURES x86_64)
+@@ -191,7 +192,13 @@ if(UNIX)
+
+ # https://github.com/HaxeFoundation/neko/pull/17
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+- add_compile_options(-mincoming-stack-boundary=2)
++ check_c_compiler_flag(-mincoming-stack-boundary=2 HAS_MINCOMING_STACK_BOUNDARY)
++ check_c_compiler_flag(-mstack-alignment=2 HAS_MSTACK_ALIGNMENT)
++ if(HAS_MINCOMING_STACK_BOUNDARY)
++ add_compile_options(-mincoming-stack-boundary=2)
++ elseif(HAS_MSTACK_ALIGNMENT)
++ add_compile_options(-mstack-alignment=2)
++ endif()
+ endif()
+
+ find_package(PkgConfig REQUIRED)