Merge branch 'android-pic' into release

This commit is contained in:
Brad King 2016-10-24 13:50:10 -04:00
commit 69a7309ceb
15 changed files with 9 additions and 35 deletions

View File

@ -1,10 +1,6 @@
# <ndk>/build/core/toolchains/aarch64-linux-android-clang/setup.mk # <ndk>/build/core/toolchains/aarch64-linux-android-clang/setup.mk
set(_ANDROID_ABI_CLANG_TARGET "aarch64-none-linux-android") set(_ANDROID_ABI_CLANG_TARGET "aarch64-none-linux-android")
string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -fpic"
)
# Suppress -Wl,-z,nocopyreloc flag on arm64-v8a # Suppress -Wl,-z,nocopyreloc flag on arm64-v8a
set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1) set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1)

View File

@ -1,7 +1,4 @@
# <ndk>/build/core/toolchains/aarch64-linux-android-4.9/setup.mk # <ndk>/build/core/toolchains/aarch64-linux-android-4.9/setup.mk
string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -fpic"
)
# Suppress -Wl,-z,nocopyreloc flag on arm64-v8a # Suppress -Wl,-z,nocopyreloc flag on arm64-v8a
set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1) set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1)

View File

@ -14,7 +14,6 @@ endif()
string(APPEND _ANDROID_ABI_INIT_CFLAGS string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -msoft-float" " -msoft-float"
" -mtune=xscale" " -mtune=xscale"
" -fpic"
) )
include(Platform/Android/abi-common-Clang) include(Platform/Android/abi-common-Clang)

View File

@ -12,7 +12,6 @@ endif()
string(APPEND _ANDROID_ABI_INIT_CFLAGS string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -msoft-float" " -msoft-float"
" -mtune=xscale" " -mtune=xscale"
" -fpic"
) )
include(Platform/Android/abi-common-GNU) include(Platform/Android/abi-common-GNU)

View File

@ -13,7 +13,6 @@ endif()
string(APPEND _ANDROID_ABI_INIT_CFLAGS string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -mfloat-abi=softfp" " -mfloat-abi=softfp"
" -fpic"
) )
include(Platform/Android/abi-common-Clang) include(Platform/Android/abi-common-Clang)

View File

@ -11,7 +11,6 @@ endif()
string(APPEND _ANDROID_ABI_INIT_CFLAGS string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -mfloat-abi=softfp" " -mfloat-abi=softfp"
" -fpic"
) )
include(Platform/Android/abi-common-GNU) include(Platform/Android/abi-common-GNU)

View File

@ -23,7 +23,6 @@ string(APPEND _ANDROID_ABI_INIT_LDFLAGS
string(APPEND _ANDROID_ABI_INIT_CFLAGS string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -mfloat-abi=softfp" " -mfloat-abi=softfp"
" -fpic"
) )
include(Platform/Android/abi-common-Clang) include(Platform/Android/abi-common-Clang)

View File

@ -17,7 +17,6 @@ endif()
string(APPEND _ANDROID_ABI_INIT_CFLAGS string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -mfloat-abi=softfp" " -mfloat-abi=softfp"
" -fpic"
) )
string(APPEND _ANDROID_ABI_INIT_LDFLAGS string(APPEND _ANDROID_ABI_INIT_LDFLAGS

View File

@ -3,6 +3,15 @@ string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -no-canonical-prefixes" " -no-canonical-prefixes"
) )
if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE
AND NOT CMAKE_SYSTEM_VERSION VERSION_LESS 16)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
if(CMAKE_POSITION_INDEPENDENT_CODE)
string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -fPIE -pie")
endif()
string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -Wl,--gc-sections") string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -Wl,--gc-sections")
if(NOT _ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc) if(NOT _ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc)

View File

@ -1,8 +1,4 @@
# <ndk>/build/core/toolchains/mipsel-linux-android-clang/setup.mk # <ndk>/build/core/toolchains/mipsel-linux-android-clang/setup.mk
set(_ANDROID_ABI_CLANG_TARGET "mipsel-none-linux-android") set(_ANDROID_ABI_CLANG_TARGET "mipsel-none-linux-android")
string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -fpic"
)
include(Platform/Android/abi-common-Clang) include(Platform/Android/abi-common-Clang)

View File

@ -1,6 +1,3 @@
# <ndk>/build/core/toolchains/mipsel-linux-android-4.9/setup.mk # <ndk>/build/core/toolchains/mipsel-linux-android-4.9/setup.mk
string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -fpic"
)
include(Platform/Android/abi-common-GNU) include(Platform/Android/abi-common-GNU)

View File

@ -1,8 +1,4 @@
# <ndk>/build/core/toolchains/mips64el-linux-android-clang/setup.mk # <ndk>/build/core/toolchains/mips64el-linux-android-clang/setup.mk
set(_ANDROID_ABI_CLANG_TARGET "mips64el-none-linux-android") set(_ANDROID_ABI_CLANG_TARGET "mips64el-none-linux-android")
string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -fpic"
)
include(Platform/Android/abi-common-Clang) include(Platform/Android/abi-common-Clang)

View File

@ -1,6 +1,3 @@
# <ndk>/build/core/toolchains/mips64el-linux-android-4.9/setup.mk # <ndk>/build/core/toolchains/mips64el-linux-android-4.9/setup.mk
string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -fpic"
)
include(Platform/Android/abi-common-GNU) include(Platform/Android/abi-common-GNU)

View File

@ -1,8 +1,4 @@
# <ndk>/build/core/toolchains/x86-clang/setup.mk # <ndk>/build/core/toolchains/x86-clang/setup.mk
set(_ANDROID_ABI_CLANG_TARGET "i686-none-linux-android") set(_ANDROID_ABI_CLANG_TARGET "i686-none-linux-android")
string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -fPIC"
)
include(Platform/Android/abi-common-Clang) include(Platform/Android/abi-common-Clang)

View File

@ -1,8 +1,4 @@
# <ndk>/build/core/toolchains/x86_64-clang/setup.mk # <ndk>/build/core/toolchains/x86_64-clang/setup.mk
set(_ANDROID_ABI_CLANG_TARGET "x86_64-none-linux-android") set(_ANDROID_ABI_CLANG_TARGET "x86_64-none-linux-android")
string(APPEND _ANDROID_ABI_INIT_CFLAGS
" -fPIC"
)
include(Platform/Android/abi-common-Clang) include(Platform/Android/abi-common-Clang)