[libpng15] Make ARM NEON support work at compile time (not just configure time).

This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
using a compiler that compiles for multiple architectures at one time.
This commit is contained in:
Glenn Randers-Pehrson 2013-06-06 14:46:38 -05:00
parent fd03dddd78
commit ea216228f3
4 changed files with 37 additions and 6 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.5.17beta01 - June 5, 2013
Libpng 1.5.17beta01 - June 6, 2013
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@ -26,10 +26,13 @@ Other information:
Changes since the last public release (1.5.16):
Version 1.5.17beta01 [June 5, 2013]
Version 1.5.17beta01 [June 6, 2013]
Removed a redundant test from png_set_IHDR().
Added set(CMAKE_CONFIGURATION_TYPES ...) to CMakeLists.txt (Andrew Hundt)
Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt
Make ARM NEON support work at compile time (not just configure time).
This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
using a compiler that compiles for multiple architectures at one time.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -4113,10 +4113,13 @@ Version 1.5.16rc01 [May 16, 2013]
Version 1.5.16 [May 23, 2013]
No changes.
Version 1.5.17beta01 [June 5, 2013]
Version 1.5.17beta01 [June 6, 2013]
Removed a redundant test from png_set_IHDR().
Added set(CMAKE_CONFIGURATION_TYPES ...) to CMakeLists.txt (Andrew Hundt)
Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt
Make ARM NEON support work at compile time (not just configure time).
This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
using a compiler that compiles for multiple architectures at one time.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -179,11 +179,12 @@ AC_ARG_ENABLE([arm-neon],
[Enable ARM NEON optimizations: =no/off, check, api, yes/on:]
[no/off: disable the optimizations; check: use internal checking code]
[(deprecated and poorly supported); api: disable by default, enable by]
[a call to png_set_option; yes/on: turn on unconditionally.]),
[a call to png_set_option; yes/on: turn on unconditionally.]
[If not specified: determined by the compiler.]),
[case "$enableval" in
no|off)
# disable the default enabling on __ARM_NEON__ systems:
AC_DEFINE([PNG_NO_ARM_NEON], [],
AC_DEFINE([PNG_ARM_NEON_NOT_SUPPORTED], [],
[Disable ARM Neon optimizations])
# Prevent inclusion of the assembler files below:
enable_arm_neon=no;;

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.5.17beta01 - May 23, 2013
* libpng version 1.5.17beta01 - June 6, 2013
*
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -173,6 +173,30 @@
* PNG_USE_DLL is set.
*/
/* Compile time options.
* =====================
* In a multi-arch build the compiler may compile the code several times for the
* same object module, producing different codes for different architectures.
* When this happens configure-time setting of the target host options cannot be
* done and this interferes with the handling of the ARM NEON optimizations, and
* possibly other similiar optimizations. Put additional tests here; in general
* this is needed when the same option can be changed at both compile time and
* run time depending on the target OS (i.e. iOS vs Android.)
*/
#ifdef __ARM_NEON__
/* If the default below causes problems set PNG_ARM_NEON_NOT_SUPPORTED either
* by passing --enable-arm-neon=no to configure or setting it in some other
* way when pnglibconf.h is built.
*/
# if (!defined PNG_ARM_NEON_SUPPORTED) && (!defined PNG_ARM_NEON_NOT_SUPPORTED)
# define PNG_ARM_NEON_SUPPORTED
# endif
#endif
#if (defined PNG_ARM_NEON_SUPPORTED) && (defined PNG_ARM_NEON_NOT_SUPPORTED)
# error configuration: ARM_NEON cannot both be supported and disabled
#endif
/* System specific discovery.
* ==========================
* This code is used at build time to find PNG_IMPEXP, the API settings