From: Ying Wang Date: Tue, 10 Mar 2015 01:57:40 +0000 (-0700) Subject: Support .asm being compiled by yasm targeted for x86_64. X-Git-Tag: android-x86-6.0-r1~445^2~13^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=fe1e5c3453caa43662ee5a21be74aa160fdbc628;p=android-x86%2Fbuild.git Support .asm being compiled by yasm targeted for x86_64. Change-Id: Ia6425c38dd2f7ad2dc697213cd61b7515b9e7aff --- diff --git a/core/binary.mk b/core/binary.mk index 02b72b607..af6acf0b6 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -795,8 +795,7 @@ endif 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 for x86/x86_64 needs to be compiled with yasm. asm_sources_asm := $(filter %.asm,$(my_src_files)) ifneq ($(strip $(asm_sources_asm)),) asm_objects_asm := $(addprefix $(intermediates)/,$(asm_sources_asm:.asm=.o)) @@ -806,7 +805,6 @@ $(asm_objects_asm): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.asm \ asm_objects += $(asm_objects_asm) endif -endif ########################################################## diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk index e22500e51..f17a514fa 100644 --- a/core/combo/TARGET_linux-x86.mk +++ b/core/combo/TARGET_linux-x86.mk @@ -147,3 +147,5 @@ $(combo_2nd_arch_prefix)TARGET_STRIP_MODULE:=true $(combo_2nd_arch_prefix)TARGET_DEFAULT_SYSTEM_SHARED_LIBRARIES := libc libm $(combo_2nd_arch_prefix)TARGET_LINKER := /system/bin/linker + +$(combo_2nd_arch_prefix)TARGET_GLOBAL_YASM_FLAGS := -f elf32 -m x86 diff --git a/core/combo/TARGET_linux-x86_64.mk b/core/combo/TARGET_linux-x86_64.mk index 046a42bb5..c945b3e70 100644 --- a/core/combo/TARGET_linux-x86_64.mk +++ b/core/combo/TARGET_linux-x86_64.mk @@ -153,3 +153,5 @@ TARGET_STRIP_MODULE:=true TARGET_DEFAULT_SYSTEM_SHARED_LIBRARIES := libc libm TARGET_LINKER := /system/bin/linker64 + +TARGET_GLOBAL_YASM_FLAGS := -f elf64 -m amd64 diff --git a/core/definitions.mk b/core/definitions.mk index 4bc51d309..fb91e1367 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -1051,7 +1051,7 @@ define transform-asm-to-o @mkdir -p $(dir $@) $(hide) $(YASM) \ $(addprefix -I , $(PRIVATE_C_INCLUDES)) \ - -f elf32 -m x86 \ + $($(PRIVATE_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_YASM_FLAGS) \ $(PRIVATE_ASFLAGS) \ -o $@ $< endef