Skip to content

Commit

Permalink
Fixed bug 3694 - SDL_image fails to compile with the latest NDK (r15)
Browse files Browse the repository at this point in the history
Sylvain

Re-opening, since jpeg is updated to jpeg-9b, we have the issue again that with newer ndk, "machine/cpu-features.h" has been removed.
So let's disable assembly:

(and also sources were included twice)
  • Loading branch information
slouken committed Oct 23, 2017
1 parent 623de40 commit 9e2ab86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions external/jpeg-9b.patch
@@ -1,6 +1,6 @@
diff -ruN jpeg-9b.orig/Android.mk jpeg-9b/Android.mk
--- jpeg-9b.orig/Android.mk 1969-12-31 16:00:00.000000000 -0800
+++ jpeg-9b/Android.mk 2017-10-22 10:52:15.000000000 -0700
+++ jpeg-9b/Android.mk 2017-10-23 07:33:24.698623073 -0700
@@ -0,0 +1,37 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
Expand All @@ -14,7 +14,7 @@ diff -ruN jpeg-9b.orig/Android.mk jpeg-9b/Android.mk
+ jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
+ jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
+ jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
+ jfdctfst.c jfdctint.c jidctflt.c jquant1.c \
+ jquant2.c jutils.c jmemmgr.c \
+ jmem-android.c
+
Expand All @@ -24,7 +24,7 @@ diff -ruN jpeg-9b.orig/Android.mk jpeg-9b/Android.mk
+endif
+
+# temp fix until we understand why this broke cnn.com
+#ANDROID_JPEG_NO_ASSEMBLER := true
+ANDROID_JPEG_NO_ASSEMBLER := true
+
+ifeq ($(strip $(ANDROID_JPEG_NO_ASSEMBLER)),true)
+LOCAL_SRC_FILES += jidctint.c jidctfst.c
Expand All @@ -41,7 +41,7 @@ diff -ruN jpeg-9b.orig/Android.mk jpeg-9b/Android.mk
+include $(BUILD_STATIC_LIBRARY)
diff -ruN jpeg-9b.orig/jconfig.h jpeg-9b/jconfig.h
--- jpeg-9b.orig/jconfig.h 1969-12-31 16:00:00.000000000 -0800
+++ jpeg-9b/jconfig.h 2017-10-22 10:52:15.000000000 -0700
+++ jpeg-9b/jconfig.h 2017-10-22 10:55:55.745170265 -0700
@@ -0,0 +1,156 @@
+/* android jconfig.h */
+/*
Expand Down Expand Up @@ -201,7 +201,7 @@ diff -ruN jpeg-9b.orig/jconfig.h jpeg-9b/jconfig.h
+#endif /* JPEG_CJPEG_DJPEG */
diff -ruN jpeg-9b.orig/jidctfst.S jpeg-9b/jidctfst.S
--- jpeg-9b.orig/jidctfst.S 1969-12-31 16:00:00.000000000 -0800
+++ jpeg-9b/jidctfst.S 2017-10-22 10:52:15.000000000 -0700
+++ jpeg-9b/jidctfst.S 2017-10-22 10:55:55.829170262 -0700
@@ -0,0 +1,476 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
Expand Down Expand Up @@ -681,7 +681,7 @@ diff -ruN jpeg-9b.orig/jidctfst.S jpeg-9b/jidctfst.S
+ .endfunc
diff -ruN jpeg-9b.orig/jmem-android.c jpeg-9b/jmem-android.c
--- jpeg-9b.orig/jmem-android.c 1969-12-31 16:00:00.000000000 -0800
+++ jpeg-9b/jmem-android.c 2017-10-22 10:52:50.000000000 -0700
+++ jpeg-9b/jmem-android.c 2017-10-22 10:55:55.833170261 -0700
@@ -0,0 +1,187 @@
+/*
+ * Copyright (C) 2007-2008 The Android Open Source Project
Expand Down
4 changes: 2 additions & 2 deletions external/jpeg-9b/Android.mk
Expand Up @@ -10,7 +10,7 @@ LOCAL_SRC_FILES := \
jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
jfdctfst.c jfdctint.c jidctflt.c jquant1.c \
jquant2.c jutils.c jmemmgr.c \
jmem-android.c

Expand All @@ -20,7 +20,7 @@ ANDROID_JPEG_NO_ASSEMBLER := true
endif

# temp fix until we understand why this broke cnn.com
#ANDROID_JPEG_NO_ASSEMBLER := true
ANDROID_JPEG_NO_ASSEMBLER := true

ifeq ($(strip $(ANDROID_JPEG_NO_ASSEMBLER)),true)
LOCAL_SRC_FILES += jidctint.c jidctfst.c
Expand Down

0 comments on commit 9e2ab86

Please sign in to comment.