From b5bf4dc5b5186324f53c5d9ef2a4225224338950 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 4 Mar 2023 21:05:02 +0800 Subject: [PATCH] Fix x86_64 builds of libjpeg on Android * cross/ndk-build/ndk-build-shared-library.mk: * cross/ndk-build/ndk-build-static-library.mk: Specify right ELF format for 64 bit executables. --- cross/ndk-build/ndk-build-shared-library.mk | 2 +- cross/ndk-build/ndk-build-static-library.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cross/ndk-build/ndk-build-shared-library.mk b/cross/ndk-build/ndk-build-shared-library.mk index 0af68980cfc..d60802da1d0 100644 --- a/cross/ndk-build/ndk-build-shared-library.mk +++ b/cross/ndk-build/ndk-build-shared-library.mk @@ -77,7 +77,7 @@ $$(error Trying to build nasm file on non-Intel platform!) else $(call objname,$(LOCAL_MODULE),$(basename $(1))): $(LOCAL_PATH)/$(1) - $(NDK_BUILD_NASM) -felf -o $$@ -i $(LOCAL_PATH) -i $$(dir $$<) $(NDK_ASFLAGS_$(LOCAL_MODULE)) $$< + $(NDK_BUILD_NASM) -felf$(findstring 64,$(NDK_BUILD_ARCH)) -o $$@ -i $(LOCAL_PATH) -i $$(dir $$<) $(NDK_ASFLAGS_$(LOCAL_MODULE)) $$< endif endif diff --git a/cross/ndk-build/ndk-build-static-library.mk b/cross/ndk-build/ndk-build-static-library.mk index 88be518cd39..98afd864ed6 100644 --- a/cross/ndk-build/ndk-build-static-library.mk +++ b/cross/ndk-build/ndk-build-static-library.mk @@ -65,7 +65,7 @@ $$(error Trying to build nasm file on non-Intel platform!) else $(call objname,$(LOCAL_MODULE),$(basename $(1))): $(call maybe-absolute,$(1),$(2)) - $(NDK_BUILD_NASM) -felf -o $$@ -i $(LOCAL_PATH) -i $$(dir $$<) $(NDK_ASFLAGS_$(LOCAL_MODULE)) $$< + $(NDK_BUILD_NASM) -felf$(findstring 64,$(NDK_BUILD_ARCH)) -o $$@ -i $(LOCAL_PATH) -i $$(dir $$<) $(NDK_ASFLAGS_$(LOCAL_MODULE)) $$< endif endif -- 2.39.2