diff options
author | Fred Hornsey <hornseyf@objectcomputing.com> | 2020-12-29 21:57:14 -0600 |
---|---|---|
committer | Fred Hornsey <hornseyf@objectcomputing.com> | 2020-12-29 21:57:14 -0600 |
commit | 3072459f215b934bbcbe9c232732d3ac6fdbfd17 (patch) | |
tree | dc7dad07ff441a309c6649146d961a0a1a35ed32 /ACE/include | |
parent | b054b176be0cedeaa23b6852b7490113b3fb60a7 (diff) | |
download | ATCD-3072459f215b934bbcbe9c232732d3ac6fdbfd17.tar.gz |
Fix Older NDKs Not Having armv7a-* Prefixed Tools
Will have to check for them or fallback to the arm-* prefix.
Diffstat (limited to 'ACE/include')
-rw-r--r-- | ACE/include/makeinclude/platform_android.GNU | 20 | ||||
-rw-r--r-- | ACE/include/makeinclude/platform_clang_common.GNU | 2 | ||||
-rw-r--r-- | ACE/include/makeinclude/platform_g++_common.GNU | 2 |
3 files changed, 19 insertions, 5 deletions
diff --git a/ACE/include/makeinclude/platform_android.GNU b/ACE/include/makeinclude/platform_android.GNU index e58667b98eb..699ba459eb8 100644 --- a/ACE/include/makeinclude/platform_android.GNU +++ b/ACE/include/makeinclude/platform_android.GNU @@ -79,18 +79,32 @@ ifdef android_ndk android_ndk_tool_prefix := $(CROSS_COMPILE)$(android_api)- endif - # We dont want this being used again except to signal that this is a - # cross-compile build. If it is this command (probably) wont exist. + # We don't want this being used again except to signal that this is a + # cross-compile build. If it is then the resulting command (probably) wont + # exist. CROSS_COMPILE := THIS_VALUE_SHOULD_NOT_BE_USED + # Ignore value of CROSS_COMPILE because ar doesn't match clang like in + # platform_clang_common.GNU. override_cross_compile = 1 CC = $(android_ndk_tools)/$(android_ndk_tool_prefix)clang CXX = $(android_ndk_tools)/$(android_ndk_tool_prefix)clang++ AR = $(android_ndk_tools)/llvm-ar -else +else # Standalone Toolchain CROSS_COMPILE := $(CROSS_COMPILE)- + ifeq ($(android_abi),armeabi-v7a) + # According to Google the armv7a-linux-androideabi- prefix should be + # preferred because it produces more efficient code. However if it doesn't + # exist since we're using an older NDK we have to fallback to + # arm-linux-androideabi-. This isn't a problem when directly using the NDK + # because the NDKs we support for that have armv7a-* clangs. + ifeq (,$(shell command -v $(CROSS_COMPILE)clang $(ACE_NUL_STDERR))) + CROSS_COMPILE := arm-linux-androideabi- + endif + endif + # Export so child processes can use tools from the same toolchain. export CROSS_COMPILE endif diff --git a/ACE/include/makeinclude/platform_clang_common.GNU b/ACE/include/makeinclude/platform_clang_common.GNU index ca5541490a3..b9c77141d68 100644 --- a/ACE/include/makeinclude/platform_clang_common.GNU +++ b/ACE/include/makeinclude/platform_clang_common.GNU @@ -23,7 +23,7 @@ ifneq ($(CROSS_COMPILE),) TAO_IDL3_TO_IDL2_DEP = $(TAO_IDL3_TO_IDL2) TAO_IDL3_TO_XMI = $(HOST_ROOT)/bin/tao_idl3_to_xmi TAO_IDL3_TO_XMI_DEP = $(TAO_IDL3_TO_XMI) - # make sure to use the target compiler, not the cross-compiler + # make sure to use the host compiler, not the cross-compiler # as preprocessor for the cross-compiled idl tools TAO_IDL_PREPROCESSOR = clang endif diff --git a/ACE/include/makeinclude/platform_g++_common.GNU b/ACE/include/makeinclude/platform_g++_common.GNU index 603dc6dad5a..3401d2f35c6 100644 --- a/ACE/include/makeinclude/platform_g++_common.GNU +++ b/ACE/include/makeinclude/platform_g++_common.GNU @@ -21,7 +21,7 @@ else TAO_IDL3_TO_IDL2_DEP = $(TAO_IDL3_TO_IDL2) TAO_IDL3_TO_XMI = $(HOST_ROOT)/bin/tao_idl3_to_xmi TAO_IDL3_TO_XMI_DEP = $(TAO_IDL3_TO_XMI) - # make sure to use the target compiler, not the cross-compiler + # make sure to use the host compiler, not the cross-compiler # as preprocessor for the cross-compiled idl tools TAO_IDL_PREPROCESSOR = gcc endif |