diff options
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) |