From 59ab5598b17e788e3cbf771122e2dca0c8b3428a Mon Sep 17 00:00:00 2001 From: Xiao-Long Chen Date: Sun, 28 Aug 2016 16:02:47 -0400 Subject: [PATCH] Fix static executable linking in CMake 3.6 --- cryptfstool/CMakeLists.txt | 1 + mbbootui/CMakeLists.txt | 1 + mbtool/CMakeLists.txt | 1 + odinupdater/CMakeLists.txt | 1 + 4 files changed, 4 insertions(+) diff --git a/cryptfstool/CMakeLists.txt b/cryptfstool/CMakeLists.txt index 28e015d4d..ce2aee12a 100644 --- a/cryptfstool/CMakeLists.txt +++ b/cryptfstool/CMakeLists.txt @@ -18,6 +18,7 @@ set_target_properties( CXX_STANDARD_REQUIRED 1 POSITION_INDEPENDENT_CODE 1 LINK_FLAGS "-static" + LINK_SEARCH_START_STATIC ON ) target_link_libraries( diff --git a/mbbootui/CMakeLists.txt b/mbbootui/CMakeLists.txt index b56de741b..2ac040163 100644 --- a/mbbootui/CMakeLists.txt +++ b/mbbootui/CMakeLists.txt @@ -44,6 +44,7 @@ set_target_properties( CXX_STANDARD_REQUIRED 1 POSITION_INDEPENDENT_CODE 1 LINK_FLAGS "-static" + LINK_SEARCH_START_STATIC ON ) target_link_libraries( diff --git a/mbtool/CMakeLists.txt b/mbtool/CMakeLists.txt index 09e9fee34..cbd141898 100644 --- a/mbtool/CMakeLists.txt +++ b/mbtool/CMakeLists.txt @@ -163,6 +163,7 @@ if(${MBP_BUILD_TARGET} STREQUAL android-system) mbtool mbtool_recovery PROPERTIES LINK_FLAGS "-static" + LINK_SEARCH_START_STATIC ON ) endif() diff --git a/odinupdater/CMakeLists.txt b/odinupdater/CMakeLists.txt index 6150d852e..c97c6fcd0 100644 --- a/odinupdater/CMakeLists.txt +++ b/odinupdater/CMakeLists.txt @@ -30,6 +30,7 @@ if(${MBP_BUILD_TARGET} STREQUAL android-system) fuse-sparse PROPERTIES LINK_FLAGS "-static" + LINK_SEARCH_START_STATIC ON ) target_link_libraries(