Fixed building mpg123 on Android x86_64 and mips architectures
authorSam Lantinga <slouken@libsdl.org>
Sat, 04 Nov 2017 22:45:35 -0700
changeset 843d98f1d930524
parent 842 e94aeeed56d2
child 844 929c90225030
Fixed building mpg123 on Android x86_64 and mips architectures
external/mpg123-1.25.6.patch
external/mpg123-1.25.6/Android.mk
     1.1 --- a/external/mpg123-1.25.6.patch	Thu Nov 02 10:14:22 2017 -0700
     1.2 +++ b/external/mpg123-1.25.6.patch	Sat Nov 04 22:45:35 2017 -0700
     1.3 @@ -1927,8 +1927,8 @@
     1.4  +#endif
     1.5  diff -ruN mpg123-1.25.6.orig/Android.mk mpg123-1.25.6/Android.mk
     1.6  --- mpg123-1.25.6.orig/Android.mk	1969-12-31 16:00:00.000000000 -0800
     1.7 -+++ mpg123-1.25.6/Android.mk	2017-11-02 10:11:23.366221713 -0700
     1.8 -@@ -0,0 +1,115 @@
     1.9 ++++ mpg123-1.25.6/Android.mk	2017-11-04 22:43:44.473949961 -0700
    1.10 +@@ -0,0 +1,181 @@
    1.11  +LOCAL_PATH := $(call my-dir)
    1.12  +
    1.13  +include $(CLEAR_VARS)
    1.14 @@ -2004,6 +2004,60 @@
    1.15  +    src/libmpg123/dither.c \
    1.16  +    src/libmpg123/feature.c \
    1.17  +
    1.18 ++DECODER_CFLAGS_X64 := -DOPT_MULTI -DOPT_X86_64 -DOPT_GENERIC -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT -DOPT_AVX
    1.19 ++
    1.20 ++DECODER_SRC_X64 := \
    1.21 ++    src/libmpg123/stringbuf.c \
    1.22 ++    src/libmpg123/icy.c \
    1.23 ++    src/libmpg123/icy.h \
    1.24 ++    src/libmpg123/icy2utf8.c \
    1.25 ++    src/libmpg123/icy2utf8.h \
    1.26 ++    src/libmpg123/ntom.c \
    1.27 ++    src/libmpg123/synth.c \
    1.28 ++    src/libmpg123/synth.h \
    1.29 ++    src/libmpg123/synth_8bit.c \
    1.30 ++    src/libmpg123/synth_8bit.h \
    1.31 ++    src/libmpg123/layer1.c \
    1.32 ++    src/libmpg123/layer2.c \
    1.33 ++    src/libmpg123/layer3.c \
    1.34 ++    src/libmpg123/synth_s32.c \
    1.35 ++    src/libmpg123/synth_real.c \
    1.36 ++    src/libmpg123/dct36_x86_64.S \
    1.37 ++    src/libmpg123/dct64_x86_64_float.S \
    1.38 ++    src/libmpg123/synth_x86_64_float.S \
    1.39 ++    src/libmpg123/synth_x86_64_s32.S \
    1.40 ++    src/libmpg123/synth_stereo_x86_64_float.S \
    1.41 ++    src/libmpg123/synth_stereo_x86_64_s32.S \
    1.42 ++    src/libmpg123/synth_x86_64.S \
    1.43 ++    src/libmpg123/dct64_x86_64.S \
    1.44 ++    src/libmpg123/synth_stereo_x86_64.S \
    1.45 ++    src/libmpg123/dither.c \
    1.46 ++    src/libmpg123/dither.h \
    1.47 ++    src/libmpg123/getcpuflags_x86_64.S \
    1.48 ++    src/libmpg123/dct36_avx.S \
    1.49 ++    src/libmpg123/dct64_avx_float.S \
    1.50 ++    src/libmpg123/synth_stereo_avx_float.S \
    1.51 ++    src/libmpg123/synth_stereo_avx_s32.S \
    1.52 ++    src/libmpg123/dct64_avx.S \
    1.53 ++    src/libmpg123/synth_stereo_avx.S \
    1.54 ++    src/libmpg123/feature.c
    1.55 ++
    1.56 ++DECODER_CFLAGS_MIPS := -DOPT_GENERIC -DREAL_IS_FLOAT
    1.57 ++
    1.58 ++DECODER_SRC_MIPS := \
    1.59 ++    src/libmpg123/stringbuf.c \
    1.60 ++    src/libmpg123/icy.c \
    1.61 ++    src/libmpg123/icy2utf8.c \
    1.62 ++    src/libmpg123/ntom.c \
    1.63 ++    src/libmpg123/synth.c \
    1.64 ++    src/libmpg123/synth_8bit.c \
    1.65 ++    src/libmpg123/layer1.c \
    1.66 ++    src/libmpg123/layer2.c \
    1.67 ++    src/libmpg123/layer3.c \
    1.68 ++    src/libmpg123/synth_s32.c \
    1.69 ++    src/libmpg123/synth_real.c \
    1.70 ++    src/libmpg123/feature.c
    1.71 ++
    1.72  +ifeq ($(TARGET_ARCH_ABI),armeabi)
    1.73  +DECODER_CFLAGS := $(DECODER_CFLAGS_NEON)
    1.74  +DECODER_SRC := $(DECODER_SRC_NEON)
    1.75 @@ -2016,6 +2070,18 @@
    1.76  +DECODER_CFLAGS := $(DECODER_CFLAGS_X86)
    1.77  +DECODER_SRC := $(DECODER_SRC_X86)
    1.78  +endif
    1.79 ++ifeq ($(TARGET_ARCH_ABI),x86_64)
    1.80 ++DECODER_CFLAGS := $(DECODER_CFLAGS_X64)
    1.81 ++DECODER_SRC := $(DECODER_SRC_X64)
    1.82 ++endif
    1.83 ++ifeq ($(TARGET_ARCH_ABI),mips)
    1.84 ++DECODER_CFLAGS := $(DECODER_CFLAGS_MIPS)
    1.85 ++DECODER_SRC := $(DECODER_SRC_MIPS)
    1.86 ++endif
    1.87 ++ifeq ($(TARGET_ARCH_ABI),mips64)
    1.88 ++DECODER_CFLAGS := $(DECODER_CFLAGS_MIPS)
    1.89 ++DECODER_SRC := $(DECODER_SRC_MIPS)
    1.90 ++endif
    1.91  +
    1.92  +LOCAL_CFLAGS := $(DECODER_CFLAGS)
    1.93  +
     2.1 --- a/external/mpg123-1.25.6/Android.mk	Thu Nov 02 10:14:22 2017 -0700
     2.2 +++ b/external/mpg123-1.25.6/Android.mk	Sat Nov 04 22:45:35 2017 -0700
     2.3 @@ -73,6 +73,60 @@
     2.4      src/libmpg123/dither.c \
     2.5      src/libmpg123/feature.c \
     2.6  
     2.7 +DECODER_CFLAGS_X64 := -DOPT_MULTI -DOPT_X86_64 -DOPT_GENERIC -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT -DOPT_AVX
     2.8 +
     2.9 +DECODER_SRC_X64 := \
    2.10 +    src/libmpg123/stringbuf.c \
    2.11 +    src/libmpg123/icy.c \
    2.12 +    src/libmpg123/icy.h \
    2.13 +    src/libmpg123/icy2utf8.c \
    2.14 +    src/libmpg123/icy2utf8.h \
    2.15 +    src/libmpg123/ntom.c \
    2.16 +    src/libmpg123/synth.c \
    2.17 +    src/libmpg123/synth.h \
    2.18 +    src/libmpg123/synth_8bit.c \
    2.19 +    src/libmpg123/synth_8bit.h \
    2.20 +    src/libmpg123/layer1.c \
    2.21 +    src/libmpg123/layer2.c \
    2.22 +    src/libmpg123/layer3.c \
    2.23 +    src/libmpg123/synth_s32.c \
    2.24 +    src/libmpg123/synth_real.c \
    2.25 +    src/libmpg123/dct36_x86_64.S \
    2.26 +    src/libmpg123/dct64_x86_64_float.S \
    2.27 +    src/libmpg123/synth_x86_64_float.S \
    2.28 +    src/libmpg123/synth_x86_64_s32.S \
    2.29 +    src/libmpg123/synth_stereo_x86_64_float.S \
    2.30 +    src/libmpg123/synth_stereo_x86_64_s32.S \
    2.31 +    src/libmpg123/synth_x86_64.S \
    2.32 +    src/libmpg123/dct64_x86_64.S \
    2.33 +    src/libmpg123/synth_stereo_x86_64.S \
    2.34 +    src/libmpg123/dither.c \
    2.35 +    src/libmpg123/dither.h \
    2.36 +    src/libmpg123/getcpuflags_x86_64.S \
    2.37 +    src/libmpg123/dct36_avx.S \
    2.38 +    src/libmpg123/dct64_avx_float.S \
    2.39 +    src/libmpg123/synth_stereo_avx_float.S \
    2.40 +    src/libmpg123/synth_stereo_avx_s32.S \
    2.41 +    src/libmpg123/dct64_avx.S \
    2.42 +    src/libmpg123/synth_stereo_avx.S \
    2.43 +    src/libmpg123/feature.c
    2.44 +
    2.45 +DECODER_CFLAGS_MIPS := -DOPT_GENERIC -DREAL_IS_FLOAT
    2.46 +
    2.47 +DECODER_SRC_MIPS := \
    2.48 +    src/libmpg123/stringbuf.c \
    2.49 +    src/libmpg123/icy.c \
    2.50 +    src/libmpg123/icy2utf8.c \
    2.51 +    src/libmpg123/ntom.c \
    2.52 +    src/libmpg123/synth.c \
    2.53 +    src/libmpg123/synth_8bit.c \
    2.54 +    src/libmpg123/layer1.c \
    2.55 +    src/libmpg123/layer2.c \
    2.56 +    src/libmpg123/layer3.c \
    2.57 +    src/libmpg123/synth_s32.c \
    2.58 +    src/libmpg123/synth_real.c \
    2.59 +    src/libmpg123/feature.c
    2.60 +
    2.61  ifeq ($(TARGET_ARCH_ABI),armeabi)
    2.62  DECODER_CFLAGS := $(DECODER_CFLAGS_NEON)
    2.63  DECODER_SRC := $(DECODER_SRC_NEON)
    2.64 @@ -85,6 +139,18 @@
    2.65  DECODER_CFLAGS := $(DECODER_CFLAGS_X86)
    2.66  DECODER_SRC := $(DECODER_SRC_X86)
    2.67  endif
    2.68 +ifeq ($(TARGET_ARCH_ABI),x86_64)
    2.69 +DECODER_CFLAGS := $(DECODER_CFLAGS_X64)
    2.70 +DECODER_SRC := $(DECODER_SRC_X64)
    2.71 +endif
    2.72 +ifeq ($(TARGET_ARCH_ABI),mips)
    2.73 +DECODER_CFLAGS := $(DECODER_CFLAGS_MIPS)
    2.74 +DECODER_SRC := $(DECODER_SRC_MIPS)
    2.75 +endif
    2.76 +ifeq ($(TARGET_ARCH_ABI),mips64)
    2.77 +DECODER_CFLAGS := $(DECODER_CFLAGS_MIPS)
    2.78 +DECODER_SRC := $(DECODER_SRC_MIPS)
    2.79 +endif
    2.80  
    2.81  LOCAL_CFLAGS := $(DECODER_CFLAGS)
    2.82