diff options
author | Andy Li <andy@onthewings.net> | 2017-10-20 03:14:18 +0800 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-10-26 09:50:03 +0000 |
commit | 1bfdcf019bf1dd8473f49e55d9152f3bd2a2d638 (patch) | |
tree | 540b56a5c229b7d3bac90200d6c4d43238f514d9 /testing/neko/mincoming-stack-boundary.patch | |
parent | d8b8e7aa9cda382110db3d2f9a40bb7cdeea8ec1 (diff) | |
download | aports-1bfdcf019bf1dd8473f49e55d9152f3bd2a2d638.tar.bz2 aports-1bfdcf019bf1dd8473f49e55d9152f3bd2a2d638.tar.xz |
testing/neko: only use -mincoming-stack-boundary when it is available
Diffstat (limited to 'testing/neko/mincoming-stack-boundary.patch')
-rw-r--r-- | testing/neko/mincoming-stack-boundary.patch | 36 |
1 files changed, 36 insertions, 0 deletions
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) |