media/libpng/arm.patch
author Cosmin Sabou <csabou@mozilla.com>
Sun, 05 Feb 2023 19:37:33 +0000
changeset 651812 d8601249f1eb8c52c742b0c19c9ca0fa8f2e31fe
parent 643327 a5be9935747857b3e18f4ca2bdea4e94c7bb97b2
permissions -rw-r--r--
Bug 1806090 - temporarily disable browser_quickactions.js on linux for frequent failures. r=intermittent-reviewers,MasterWayZ Differential Revision: https://phabricator.services.mozilla.com/D168909

diff --git a/arm/arm_init.c b/arm/arm_init.c
--- a/arm/arm_init.c
+++ b/arm/arm_init.c
@@ -41,7 +41,7 @@
      /* ARM Neon is expected to be available on the target CPU architecture. */
 #    error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch"
 #  elif defined(__linux__)
-#    define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
+#    define PNG_ARM_NEON_FILE "linux.c"
 #  else
 #    error "No support for run-time ARM Neon checking; use compile-time options"
 #  endif
diff --git a/arm/filter_neon.S b/arm/filter_neon.S
--- a/arm/filter_neon.S
+++ b/arm/filter_neon.S
@@ -10,6 +10,12 @@
  * 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.
  */