From b8432c0cc5866a830cdf852ffdbdc3d27926dc0b Mon Sep 17 00:00:00 2001 From: Sacha Date: Sun, 6 Jul 2014 23:50:48 +1000 Subject: [PATCH] Blackberry: Link with pie (required for 10.3?). Fix debug build. Cmake: Show compile type (debug, release) in output. --- CMakeLists.txt | 25 +++++++++++++------------ Common/Log.h | 2 ++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b7fd491f05..cac0bc3314 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,18 +102,6 @@ if(ANDROID OR BLACKBERRY OR IOS) endif() endif() -if(ARMV7) - message("Building for ARMv7") -elseif(ARM) - message("Building for ARMv6") -elseif(MIPS) - message("Building for MIPS in x86 mode") -elseif(X86) - message("Building for x86") -else() - message("Building for Generic") -endif() - if(ANDROID) set(CoreLibName ppsspp_jni) set(CoreLinkType SHARED) @@ -190,6 +178,18 @@ if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif() +if(ARMV7) + message("Building for ARMv7, ${CMAKE_BUILD_TYPE}") +elseif(ARM) + message("Building for ARMv6, ${CMAKE_BUILD_TYPE}") +elseif(MIPS) + message("Building for MIPS in x86 mode, ${CMAKE_BUILD_TYPE}") +elseif(X86) + message("Building for x86, ${CMAKE_BUILD_TYPE}") +else() + message("Building for Generic, ${CMAKE_BUILD_TYPE}") +endif() + if(NOT MSVC) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -D_DEBUG") set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -D_NDEBUG") @@ -215,6 +215,7 @@ if(NOT MSVC) if (BLACKBERRY AND ARM) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9") + set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") endif() if(IOS) diff --git a/Common/Log.h b/Common/Log.h index 2ab1057258..2c0efe5ccf 100644 --- a/Common/Log.h +++ b/Common/Log.h @@ -38,6 +38,8 @@ #include #endif +#include + namespace LogTypes {