aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2015-02-01 23:07:58 +0200
committerMartin Storsjo <martin@martin.st>2015-02-01 23:07:58 +0200
commit3981dea2cfa4eb58a930be2fe6c518ffb174c524 (patch)
treea81a47d340e3049abf8e37ebdd74e1d44a32ad60
parent7f4d5b85465a496943008a0e8f67e0b8e56f4f38 (diff)
downloadndk-3981dea2cfa4eb58a930be2fe6c518ffb174c524.tar.gz
Allow building .asm files for x86_64 as well
Change-Id: I4b00361fd66e67e8e59349e5705f13b7c18463ac
-rw-r--r--build/core/build-binary.mk4
-rw-r--r--build/core/definitions.mk2
2 files changed, 3 insertions, 3 deletions
diff --git a/build/core/build-binary.mk b/build/core/build-binary.mk
index ceb7e6714..7de5f294f 100644
--- a/build/core/build-binary.mk
+++ b/build/core/build-binary.mk
@@ -347,7 +347,7 @@ LOCAL_DEPENDENCY_DIRS :=
# all_source_patterns contains the list of filename patterns that correspond
# to source files recognized by our build system
-ifeq ($(TARGET_ARCH_ABI),x86)
+ifneq ($(filter x86 x86_64, $(TARGET_ARCH_ABI)),)
all_source_extensions := .c .s .S .asm $(LOCAL_CPP_EXTENSION) $(LOCAL_RS_EXTENSION)
else
all_source_extensions := .c .s .S $(LOCAL_CPP_EXTENSION) $(LOCAL_RS_EXTENSION)
@@ -462,7 +462,7 @@ $(foreach src,$(filter $(all_rs_patterns),$(LOCAL_SRC_FILES)),\
$(call compile-rs-source,$(src),$(call get-rs-scriptc-name,$(src)),$(call get-rs-bc-name,$(src)),$(call get-rs-so-name,$(src)),$(call get-object-name,$(src)),$(RS_COMPAT))\
)
-ifeq ($(TARGET_ARCH_ABI),x86)
+ifneq ($(filter x86 x86_64, $(TARGET_ARCH_ABI)),)
$(foreach src,$(filter %.asm,$(LOCAL_SRC_FILES)), $(call compile-asm-source,$(src),$(call get-object-name,$(src))))
endif
diff --git a/build/core/definitions.mk b/build/core/definitions.mk
index 62047428c..e21100d38 100644
--- a/build/core/definitions.mk
+++ b/build/core/definitions.mk
@@ -1635,7 +1635,7 @@ _FLAGS := $$(call host-c-includes,$$(LOCAL_C_INCLUDES) $$(LOCAL_PATH)) \
$$(LOCAL_ASMFLAGS) \
$$(NDK_APP_ASMFLAGS) \
$$(call host-c-includes,$$($(my)C_INCLUDES)) \
- -f elf32 -m x86
+ $$(if $$(filter x86_64, $$(TARGET_ARCH_ABI)), -f elf64, -f elf32 -m x86)
_TEXT := Assemble $$(call get-src-file-text,$1)
_CC := $$(NDK_CCACHE) $$(TARGET_ASM)