[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-652-g4cfeac8

Brad King brad.king at kitware.com
Fri Oct 21 13:25:37 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  4cfeac87fe0170b09b7c6a21a2f2dd0ff420d111 (commit)
       via  295c8efa359cbee22e45e6e9358990209b35aa39 (commit)
      from  98cc166c5565c2a57ff5e41c68d15dbb39e16aea (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4cfeac87fe0170b09b7c6a21a2f2dd0ff420d111
commit 4cfeac87fe0170b09b7c6a21a2f2dd0ff420d111
Merge: 98cc166 295c8ef
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Oct 21 13:25:35 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Oct 21 13:25:35 2016 -0400

    Merge topic 'android-link-exe' into next
    
    295c8efa Android: Add missing link flags for device executables


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=295c8efa359cbee22e45e6e9358990209b35aa39
commit 295c8efa359cbee22e45e6e9358990209b35aa39
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Oct 21 09:12:34 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Oct 21 10:43:45 2016 -0400

    Android: Add missing link flags for device executables
    
    See `${ndk}/build/core/default-build-commands.mk` for link flags the NDK
    uses for executables.  Add them to our default executable link flags.
    Suppress `nocopyreloc` on `arm64-v8a` because it does not work with
    some STL types.
    
    Closes: #16380

diff --git a/Modules/Platform/Android-Common.cmake b/Modules/Platform/Android-Common.cmake
index 6544696..8755d4f 100644
--- a/Modules/Platform/Android-Common.cmake
+++ b/Modules/Platform/Android-Common.cmake
@@ -107,6 +107,7 @@ set(_ANDROID_ABI_INIT_CFLAGS "")
 set(_ANDROID_ABI_INIT_CFLAGS_DEBUG "")
 set(_ANDROID_ABI_INIT_CFLAGS_RELEASE "")
 set(_ANDROID_ABI_INIT_LDFLAGS "")
+set(_ANDROID_ABI_INIT_EXE_LDFLAGS "")
 
 macro(__android_compiler_common lang)
   if(_ANDROID_ABI_INIT_CFLAGS)
@@ -125,6 +126,9 @@ macro(__android_compiler_common lang)
       string(APPEND CMAKE_${t}_LINKER_FLAGS_INIT " ${_ANDROID_ABI_INIT_LDFLAGS}")
     endforeach()
   endif()
+  if(_ANDROID_ABI_INIT_EXE_LDFLAGS)
+    string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${_ANDROID_ABI_INIT_EXE_LDFLAGS}")
+  endif()
 
   if(DEFINED _ANDROID_STL_EXCEPTIONS)
     if(_ANDROID_STL_EXCEPTIONS)
diff --git a/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake b/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake
index 3ff1fe5..e56b67b 100644
--- a/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake
+++ b/Modules/Platform/Android/abi-arm64-v8a-Clang.cmake
@@ -5,4 +5,7 @@ string(APPEND _ANDROID_ABI_INIT_CFLAGS
   " -fpic"
   )
 
+# Suppress -Wl,-z,nocopyreloc flag on arm64-v8a
+set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1)
+
 include(Platform/Android/abi-common-Clang)
diff --git a/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake b/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake
index 538ec2f..0bcfc86 100644
--- a/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake
+++ b/Modules/Platform/Android/abi-arm64-v8a-GNU.cmake
@@ -3,4 +3,7 @@ string(APPEND _ANDROID_ABI_INIT_CFLAGS
   " -fpic"
   )
 
+# Suppress -Wl,-z,nocopyreloc flag on arm64-v8a
+set(_ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc 1)
+
 include(Platform/Android/abi-common-GNU)
diff --git a/Modules/Platform/Android/abi-common.cmake b/Modules/Platform/Android/abi-common.cmake
index 12d8e5c..84e7dbd 100644
--- a/Modules/Platform/Android/abi-common.cmake
+++ b/Modules/Platform/Android/abi-common.cmake
@@ -2,3 +2,9 @@ string(APPEND _ANDROID_ABI_INIT_CFLAGS
   " -funwind-tables"
   " -no-canonical-prefixes"
   )
+
+string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -Wl,--gc-sections")
+
+if(NOT _ANDROID_ABI_INIT_EXE_LDFLAGS_NO_nocopyreloc)
+  string(APPEND _ANDROID_ABI_INIT_EXE_LDFLAGS " -Wl,-z,nocopyreloc")
+endif()

-----------------------------------------------------------------------

Summary of changes:
 Modules/Platform/Android-Common.cmake              |    4 ++++
 Modules/Platform/Android/abi-arm64-v8a-Clang.cmake |    3 +++
 Modules/Platform/Android/abi-arm64-v8a-GNU.cmake   |    3 +++
 Modules/Platform/Android/abi-common.cmake          |    6 ++++++
 4 files changed, 16 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list