gecko-dev/media/libpng/arm.patch
2014-12-23 06:44:00 +01:00

49 lines
1.8 KiB
Diff

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 */