| Summary: | Error when compiling SDL_image for arm64-v8a with android | ||
|---|---|---|---|
| Product: | SDL_image | Reporter: | tupan <rangelms> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus, sylvain.becker |
| Version: | 2.0.3 | ||
| Hardware: | ARM | ||
| OS: | Android (All) | ||
|
Description
tupan
2018-05-24 01:46:06 UTC
My guess is that when libpng.a was built, it was built without libpng-1.6.32/arm/arm_init.c, but I can't untangle the build script to see why, or if I'm right. (Alternately: it built it, but PNG_ARM_NEON_OPT was 0 or undefined?) --ryan. Hi,
If you want to disable neon for libpng you can patch the file external/libpng-1.6.32/Android.mk
by adding:
LOCAL_CFLAGS += -DPNG_ARM_NEON_OPT=0
I run a few benchmarks and saw no improvement by using neon with arm64-v8a.
But, if you really want to compile with NEON, you can add that to the previous file :
ifneq (,$(filter $(TARGET_ARCH),arm arm64))
$(warning ** Try to compile with NEON for TARGET_ARCH= $(TARGET_ARCH))
LOCAL_CFLAGS += -DPNG_ARM_NEON_CHECK_SUPPORTED -DPNG_ARM_NEON_FILE=\"contrib/arm-neon/android-ndk.c\"
common_SRC_FILES += arm/arm_init.c arm/filter_neon_intrinsics.c arm/filter_neon.S
LOCAL_STATIC_LIBRARIES := cpufeatures
endif
LOCAL_STATIC_LIBRARIES := cpufeatures
$(call import-module,android/cpufeatures)
(In reply to Ryan C. Gordon from comment #1) > My guess is that when libpng.a was built, it was built without > libpng-1.6.32/arm/arm_init.c, but I can't untangle the build script to see > why, or if I'm right. > > (Alternately: it built it, but PNG_ARM_NEON_OPT was 0 or undefined?) > > --ryan. How can I check this? (In reply to Sylvain from comment #2) > Hi, > > If you want to disable neon for libpng you can patch the file > external/libpng-1.6.32/Android.mk > > by adding: > > LOCAL_CFLAGS += -DPNG_ARM_NEON_OPT=0 > > > I run a few benchmarks and saw no improvement by using neon with arm64-v8a. > > > But, if you really want to compile with NEON, you can add that to the > previous file : > > > ifneq (,$(filter $(TARGET_ARCH),arm arm64)) > $(warning ** Try to compile with NEON for TARGET_ARCH= $(TARGET_ARCH)) > LOCAL_CFLAGS += -DPNG_ARM_NEON_CHECK_SUPPORTED > -DPNG_ARM_NEON_FILE=\"contrib/arm-neon/android-ndk.c\" > common_SRC_FILES += arm/arm_init.c arm/filter_neon_intrinsics.c > arm/filter_neon.S > LOCAL_STATIC_LIBRARIES := cpufeatures > endif > > LOCAL_STATIC_LIBRARIES := cpufeatures > > $(call import-module,android/cpufeatures) It worked by adding the LOCAL_CFLAGS to the Android.mk! Thanks! I wonder how this happened, though... Was fixed by https://hg.libsdl.org/SDL_image/rev/ed8961044eba |