mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-08 14:57:11 +02:00
37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
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)
|