Merge "Support .asm being compiled by yasm targeted for x86."
This commit is contained in:
@@ -744,6 +744,19 @@ endif
|
|||||||
asm_objects := $(asm_objects_S) $(asm_objects_s)
|
asm_objects := $(asm_objects_S) $(asm_objects_s)
|
||||||
|
|
||||||
|
|
||||||
|
# .asm for x86 needs to be compiled with yasm.
|
||||||
|
ifeq (x86,$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
|
||||||
|
asm_sources_asm := $(filter %.asm,$(my_src_files))
|
||||||
|
ifneq ($(strip $(asm_sources_asm)),)
|
||||||
|
asm_objects_asm := $(addprefix $(intermediates)/,$(asm_sources_asm:.asm=.o))
|
||||||
|
$(asm_objects_asm): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.asm \
|
||||||
|
$(LOCAL_ADDITIONAL_DEPENDENCIES)
|
||||||
|
$(transform-asm-to-o)
|
||||||
|
|
||||||
|
asm_objects += $(asm_objects_asm)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
####################################################
|
####################################################
|
||||||
## Import includes
|
## Import includes
|
||||||
####################################################
|
####################################################
|
||||||
|
@@ -367,6 +367,8 @@ BISON_PKGDATADIR := $(PWD)/external/bison/data
|
|||||||
BISON := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/bison/bison
|
BISON := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/bison/bison
|
||||||
YACC := $(BISON) -d
|
YACC := $(BISON) -d
|
||||||
|
|
||||||
|
YASM := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/yasm/yasm
|
||||||
|
|
||||||
DOXYGEN:= doxygen
|
DOXYGEN:= doxygen
|
||||||
AAPT := $(HOST_OUT_EXECUTABLES)/aapt$(HOST_EXECUTABLE_SUFFIX)
|
AAPT := $(HOST_OUT_EXECUTABLES)/aapt$(HOST_EXECUTABLE_SUFFIX)
|
||||||
AIDL := $(HOST_OUT_EXECUTABLES)/aidl$(HOST_EXECUTABLE_SUFFIX)
|
AIDL := $(HOST_OUT_EXECUTABLES)/aidl$(HOST_EXECUTABLE_SUFFIX)
|
||||||
|
@@ -1039,6 +1039,16 @@ $(transform-s-to-o-no-deps)
|
|||||||
$(transform-d-to-p)
|
$(transform-d-to-p)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# YASM compilation
|
||||||
|
define transform-asm-to-o
|
||||||
|
@mkdir -p $(dir $@)
|
||||||
|
$(hide) $(YASM) \
|
||||||
|
$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
|
||||||
|
-f elf32 -m x86 \
|
||||||
|
$(PRIVATE_ASFLAGS) \
|
||||||
|
-o $@ $<
|
||||||
|
endef
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
## Commands for running gcc to compile an Objective-C file
|
## Commands for running gcc to compile an Objective-C file
|
||||||
## This should never happen for target builds but this
|
## This should never happen for target builds but this
|
||||||
|
Reference in New Issue
Block a user