summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Android/abi-mips-GNU.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-24 15:40:53 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-24 15:40:53 (GMT)
commit6205f1797e33c22ab1f9cda8598d02b24497b806 (patch)
tree3ad0be2392d010b061cd3cbe6753715c97ba741c /Modules/Platform/Android/abi-mips-GNU.cmake
parent295c8efa359cbee22e45e6e9358990209b35aa39 (diff)
downloadCMake-6205f1797e33c22ab1f9cda8598d02b24497b806.zip
CMake-6205f1797e33c22ab1f9cda8598d02b24497b806.tar.gz
CMake-6205f1797e33c22ab1f9cda8598d02b24497b806.tar.bz2
Android: Set CMAKE_POSITION_INDEPENDENT_CODE automatically
If the toolchain file or cache does not set this, enable it automatically based on the Android API version. Versions 16 and above expect position independent code. Use the main `CMAKE_POSITION_INDEPENDENT_CODE` setting in favor of hard-coding `-fpic` or `-fPIC` in the compiler flags for each ABI. This allows CMake to use `-fpie` or `-fPIE` as needed when sources are meant for executables, and `-fpic` or `-fPIC` for other sources.
Diffstat (limited to 'Modules/Platform/Android/abi-mips-GNU.cmake')
-rw-r--r--Modules/Platform/Android/abi-mips-GNU.cmake3
1 files changed, 0 insertions, 3 deletions
diff --git a/Modules/Platform/Android/abi-mips-GNU.cmake b/Modules/Platform/Android/abi-mips-GNU.cmake
index d380440..982ad46 100644
--- a/Modules/Platform/Android/abi-mips-GNU.cmake
+++ b/Modules/Platform/Android/abi-mips-GNU.cmake
@@ -1,6 +1,3 @@
# <ndk>/build/core/toolchains/mipsel-linux-android-4.9/setup.mk
-string(APPEND _ANDROID_ABI_INIT_CFLAGS
- " -fpic"
- )
include(Platform/Android/abi-common-GNU)