Fixed bug 3108 - JPEG Assembly using Android API 21
authorSam Lantinga <slouken@libsdl.org>
Sat, 12 Aug 2017 12:27:53 -0700
changeset 4978402819e7bb2
parent 496 6332f9425dcc
child 498 af656a0a0fb5
Fixed bug 3108 - JPEG Assembly using Android API 21

Isaac Burns

Starting with API 21 (android-21), __ARCH_ARM__ < 6 is no longer defined in platforms/android-21/arch-arm/usr/include/machine/cpu-features.h.

Compiling the JPEG library for armeabi errors with: "error Unknown or unsupported ARM architecture".

There may be a better way to patch this in the SDL_image/Android.mk file.

ifneq (,$(filter $(TARGET_ARCH_ABI),armeabi-v7a arm64-v8a))
LOCAL_SRC_FILES += $(JPG_LIBRARY_PATH)/jidctfst.S
else
LOCAL_SRC_FILES += $(JPG_LIBRARY_PATH)/jidctfst.c
endif

Somewhat related to Bug #2501.
Android.mk
     1.1 --- a/Android.mk	Sun Jan 01 18:50:51 2017 -0800
     1.2 +++ b/Android.mk	Sat Aug 12 12:27:53 2017 -0700
     1.3 @@ -86,8 +86,8 @@
     1.4          $(JPG_LIBRARY_PATH)/jmemmgr.c \
     1.5          $(JPG_LIBRARY_PATH)/jmem-android.c
     1.6  
     1.7 -    # assembler support is available for arm
     1.8 -    ifeq ($(TARGET_ARCH),arm)
     1.9 +    # starting with android-21, assembler support is available for armeabi-v7a
    1.10 +    ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
    1.11          LOCAL_SRC_FILES += $(JPG_LIBRARY_PATH)/jidctfst.S
    1.12      else
    1.13          LOCAL_SRC_FILES += $(JPG_LIBRARY_PATH)/jidctfst.c