We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2461

Summary: Allow compilation of SDL_mixer for Android x86
Product: SDL_mixer Reporter: Daniel Sobe <daniel.sobe>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86   
OS: Android (All)   

Description Daniel Sobe 2014-03-23 13:28:55 UTC
Hi,

the following patch enables compilation of SDL_mixer for Android x86. I have checked and there doesn't seem to be a nicer way to change the makefile. The patch disables the _ARM_ASSEM_ #define if the platform is not ARM.

--- SDL_mixer/Android.mk	2014-03-23 14:04:43.045322407 +0100
+++ SDL_mixer_new/Android.mk	2014-03-23 14:21:37.255577268 +0100
@@ -89,7 +89,13 @@
 
 ifeq ($(SUPPORT_OGG),true)
     LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(OGG_LIBRARY_PATH)/include $(LOCAL_PATH)/$(VORBIS_LIBRARY_PATH)
-    LOCAL_CFLAGS += -DOGG_MUSIC -DOGG_USE_TREMOR -D_ARM_ASSEM_
+    LOCAL_CFLAGS += -DOGG_MUSIC -DOGG_USE_TREMOR
+    ifeq ($(TARGET_ARCH_ABI),armeabi)
+	LOCAL_CFLAGS += -D_ARM_ASSEM_
+    endif
+    ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
+	LOCAL_CFLAGS += -D_ARM_ASSEM_
+    endif
     LOCAL_SRC_FILES += \
         $(VORBIS_LIBRARY_PATH)/mdct.c \
         $(VORBIS_LIBRARY_PATH)/block.c \
Comment 1 Sam Lantinga 2014-03-23 16:52:29 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL_mixer/rev/d9e357c04dfa