summaryrefslogtreecommitdiffstats
path: root/media/libpng/arm.patch
blob: 4c6fd1e80f74e24a12805378611f2c0bc970cf9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff --git ../../../libpng-1.6.16/arm/arm_init.c arm/arm_init.c
--- ../../../libpng-1.6.16/arm/arm_init.c	2014-12-21 22:08:08.000000000 -0500
+++ arm/arm_init.c	2014-12-22 17:33:57.556305506 -0500
@@ -29,17 +29,17 @@
  * You may set the macro PNG_ARM_NEON_FILE to the file name of file containing
  * a fragment of C source code which defines the png_have_neon function.  There
  * are a number of implementations in contrib/arm-neon, but the only one that
  * has partial support is contrib/arm-neon/linux.c - a generic Linux
  * implementation which reads /proc/cpufino.
  */
 #ifndef PNG_ARM_NEON_FILE
 #  ifdef __linux__
-#     define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
+#     define PNG_ARM_NEON_FILE "linux.c"
 #  endif
 #endif
 
 #ifdef PNG_ARM_NEON_FILE
 
 #include <signal.h> /* for sig_atomic_t */
 static int png_have_neon(png_structp png_ptr);
 #include PNG_ARM_NEON_FILE
diff --git ../../../libpng-1.6.16/arm/filter_neon.S arm/filter_neon.S
--- ../../../libpng-1.6.16/arm/filter_neon.S	2014-12-21 22:08:08.000000000 -0500
+++ arm/filter_neon.S	2014-12-22 17:43:31.588323649 -0500
@@ -5,16 +5,22 @@
  * Written by Mans Rullgard, 2011.
  * Last changed in libpng 1.6.16 [December 22, 2014]
  *
  * This code is released under the libpng license.
  * For conditions of distribution and use, see the disclaimer
  * and license in png.h
  */
 
+/* These are required because Mozilla's moz.build system doesn't pass
+ * -DDefined macros to the assembler.
+ */
+#define PNG_READ_SUPPORTED
+#define MOZ_PNG_HAVE_ARM_NEON
+
 /* This is required to get the symbol renames, which are #defines, and the
  * definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION.
  */
 #define PNG_VERSION_INFO_ONLY
 #include "../pngpriv.h"
 
 #if defined(__linux__) && defined(__ELF__)
 .section .note.GNU-stack,"",%progbits /* mark stack as non-executable */