Skip to content

Commit

Permalink
Workaround for linker warning in latest Android NDK
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 2, 2017
1 parent 7084fd6 commit beefbf5
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 63 deletions.
131 changes: 68 additions & 63 deletions external/mpg123-1.25.6.patch
@@ -1,6 +1,6 @@
diff -ruN mpg123-1.25.6.orig/android/config.h mpg123-1.25.6/android/config.h
--- mpg123-1.25.6.orig/android/config.h 1969-12-31 16:00:00.000000000 -0800
+++ mpg123-1.25.6/android/config.h 2017-10-18 00:55:57.906177396 -0700
+++ mpg123-1.25.6/android/config.h 2017-10-23 07:43:01.919907577 -0700
@@ -0,0 +1,478 @@
+/* src/config.h. Generated from config.h.in by configure. */
+/* src/config.h.in. Generated from configure.ac by autoheader. */
Expand Down Expand Up @@ -482,7 +482,7 @@ diff -ruN mpg123-1.25.6.orig/android/config.h mpg123-1.25.6/android/config.h
+/* #undef uintptr_t */
diff -ruN mpg123-1.25.6.orig/android/mpg123.h mpg123-1.25.6/android/mpg123.h
--- mpg123-1.25.6.orig/android/mpg123.h 1969-12-31 16:00:00.000000000 -0800
+++ mpg123-1.25.6/android/mpg123.h 2017-10-18 00:57:07.438009786 -0700
+++ mpg123-1.25.6/android/mpg123.h 2017-10-23 07:43:01.919907577 -0700
@@ -0,0 +1,1441 @@
+/*
+ libmpg123: MPEG Audio Decoder library (version 1.25.6)
Expand Down Expand Up @@ -1927,8 +1927,8 @@ diff -ruN mpg123-1.25.6.orig/android/mpg123.h mpg123-1.25.6/android/mpg123.h
+#endif
diff -ruN mpg123-1.25.6.orig/Android.mk mpg123-1.25.6/Android.mk
--- mpg123-1.25.6.orig/Android.mk 1969-12-31 16:00:00.000000000 -0800
+++ mpg123-1.25.6/Android.mk 2017-10-18 01:34:30.879829213 -0700
@@ -0,0 +1,110 @@
+++ mpg123-1.25.6/Android.mk 2017-11-02 10:11:23.366221713 -0700
@@ -0,0 +1,115 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
Expand All @@ -1944,65 +1944,65 @@ diff -ruN mpg123-1.25.6.orig/Android.mk mpg123-1.25.6/Android.mk
+
+DECODER_SRC_NEON := \
+ src/libmpg123/stringbuf.c \
+ src/libmpg123/icy.c \
+ src/libmpg123/icy2utf8.c \
+ src/libmpg123/ntom.c \
+ src/libmpg123/synth.c \
+ src/libmpg123/synth_8bit.c \
+ src/libmpg123/layer1.c \
+ src/libmpg123/layer2.c \
+ src/libmpg123/layer3.c \
+ src/libmpg123/dct36_neon.S \
+ src/libmpg123/dct64_neon_float.S \
+ src/libmpg123/synth_neon_float.S \
+ src/libmpg123/synth_neon_s32.S \
+ src/libmpg123/synth_stereo_neon_float.S \
+ src/libmpg123/synth_stereo_neon_s32.S \
+ src/libmpg123/dct64_neon.S \
+ src/libmpg123/synth_neon.S \
+ src/libmpg123/synth_stereo_neon.S \
+ src/libmpg123/synth_s32.c \
+ src/libmpg123/synth_real.c \
+ src/libmpg123/feature.c \
+ src/libmpg123/icy.c \
+ src/libmpg123/icy2utf8.c \
+ src/libmpg123/ntom.c \
+ src/libmpg123/synth.c \
+ src/libmpg123/synth_8bit.c \
+ src/libmpg123/layer1.c \
+ src/libmpg123/layer2.c \
+ src/libmpg123/layer3.c \
+ src/libmpg123/dct36_neon.S \
+ src/libmpg123/dct64_neon_float.S \
+ src/libmpg123/synth_neon_float.S \
+ src/libmpg123/synth_neon_s32.S \
+ src/libmpg123/synth_stereo_neon_float.S \
+ src/libmpg123/synth_stereo_neon_s32.S \
+ src/libmpg123/dct64_neon.S \
+ src/libmpg123/synth_neon.S \
+ src/libmpg123/synth_stereo_neon.S \
+ src/libmpg123/synth_s32.c \
+ src/libmpg123/synth_real.c \
+ src/libmpg123/feature.c \
+
+DECODER_CFLAGS_X86 := -DOPT_MULTI -DOPT_GENERIC -DOPT_GENERIC_DITHER -DOPT_I386 -DOPT_I586 -DOPT_I586_DITHER -DOPT_MMX -DOPT_3DNOW -DOPT_3DNOW_VINTAGE -DOPT_3DNOWEXT -DOPT_3DNOWEXT_VINTAGE -DOPT_SSE -DOPT_SSE_VINTAGE -DREAL_IS_FLOAT
+
+DECODER_SRC_X86 := \
+ src/libmpg123/stringbuf.c \
+ src/libmpg123/icy.c \
+ src/libmpg123/icy2utf8.c \
+ src/libmpg123/ntom.c \
+ src/libmpg123/synth.c \
+ src/libmpg123/synth_8bit.c \
+ src/libmpg123/layer1.c \
+ src/libmpg123/layer2.c \
+ src/libmpg123/layer3.c \
+ src/libmpg123/synth_s32.c \
+ src/libmpg123/synth_real.c \
+ src/libmpg123/dct64_i386.c \
+ src/libmpg123/synth_i586.S \
+ src/libmpg123/synth_i586_dither.S \
+ src/libmpg123/dct64_mmx.S \
+ src/libmpg123/tabinit_mmx.S \
+ src/libmpg123/synth_mmx.S \
+ src/libmpg123/synth_3dnow.S \
+ src/libmpg123/dct64_3dnow.S \
+ src/libmpg123/equalizer_3dnow.S \
+ src/libmpg123/dct36_3dnow.S \
+ src/libmpg123/dct64_3dnowext.S \
+ src/libmpg123/synth_3dnowext.S \
+ src/libmpg123/dct36_3dnowext.S \
+ src/libmpg123/dct64_sse_float.S \
+ src/libmpg123/synth_sse_float.S \
+ src/libmpg123/synth_stereo_sse_float.S \
+ src/libmpg123/synth_sse_s32.S \
+ src/libmpg123/synth_stereo_sse_s32.S \
+ src/libmpg123/dct36_sse.S \
+ src/libmpg123/dct64_sse.S \
+ src/libmpg123/synth_sse.S \
+ src/libmpg123/getcpuflags.S \
+ src/libmpg123/dither.c \
+ src/libmpg123/feature.c \
+ src/libmpg123/icy.c \
+ src/libmpg123/icy2utf8.c \
+ src/libmpg123/ntom.c \
+ src/libmpg123/synth.c \
+ src/libmpg123/synth_8bit.c \
+ src/libmpg123/layer1.c \
+ src/libmpg123/layer2.c \
+ src/libmpg123/layer3.c \
+ src/libmpg123/synth_s32.c \
+ src/libmpg123/synth_real.c \
+ src/libmpg123/dct64_i386.c \
+ src/libmpg123/synth_i586.S \
+ src/libmpg123/synth_i586_dither.S \
+ src/libmpg123/dct64_mmx.S \
+ src/libmpg123/tabinit_mmx.S \
+ src/libmpg123/synth_mmx.S \
+ src/libmpg123/synth_3dnow.S \
+ src/libmpg123/dct64_3dnow.S \
+ src/libmpg123/equalizer_3dnow.S \
+ src/libmpg123/dct36_3dnow.S \
+ src/libmpg123/dct64_3dnowext.S \
+ src/libmpg123/synth_3dnowext.S \
+ src/libmpg123/dct36_3dnowext.S \
+ src/libmpg123/dct64_sse_float.S \
+ src/libmpg123/synth_sse_float.S \
+ src/libmpg123/synth_stereo_sse_float.S \
+ src/libmpg123/synth_sse_s32.S \
+ src/libmpg123/synth_stereo_sse_s32.S \
+ src/libmpg123/dct36_sse.S \
+ src/libmpg123/dct64_sse.S \
+ src/libmpg123/synth_sse.S \
+ src/libmpg123/getcpuflags.S \
+ src/libmpg123/dither.c \
+ src/libmpg123/feature.c \
+
+ifeq ($(TARGET_ARCH_ABI),armeabi)
+DECODER_CFLAGS := $(DECODER_CFLAGS_NEON)
Expand All @@ -2019,17 +2019,22 @@ diff -ruN mpg123-1.25.6.orig/Android.mk mpg123-1.25.6/Android.mk
+
+LOCAL_CFLAGS := $(DECODER_CFLAGS)
+
+# This disables the following warning:
+# warning: shared library text segment is not shareable
+# However, the library still has PIC unaware assembly!
+LOCAL_DISABLE_FATAL_LINKER_WARNINGS = true
+
+LOCAL_SRC_FILES := \
+ src/libmpg123/parse.c \
+ src/libmpg123/frame.c \
+ src/libmpg123/frame.c \
+ src/libmpg123/format.c \
+ src/libmpg123/dct64.c \
+ src/libmpg123/dct64.c \
+ src/libmpg123/equalizer.c \
+ src/libmpg123/id3.c \
+ src/libmpg123/id3.c \
+ src/libmpg123/optimize.c \
+ src/libmpg123/readers.c \
+ src/libmpg123/readers.c \
+ src/libmpg123/tabinit.c \
+ src/libmpg123/libmpg123.c \
+ src/libmpg123/libmpg123.c \
+ src/libmpg123/index.c \
+ src/compat/compat_str.c \
+ src/compat/compat.c \
Expand Down
5 changes: 5 additions & 0 deletions external/mpg123-1.25.6/Android.mk
Expand Up @@ -88,6 +88,11 @@ endif

LOCAL_CFLAGS := $(DECODER_CFLAGS)

# This disables the following warning:
# warning: shared library text segment is not shareable
# However, the library still has PIC unaware assembly!
LOCAL_DISABLE_FATAL_LINKER_WARNINGS = true

LOCAL_SRC_FILES := \
src/libmpg123/parse.c \
src/libmpg123/frame.c \
Expand Down

0 comments on commit beefbf5

Please sign in to comment.