[tlbuild] Fixes for libpng building on ARM

Norbert Preining preining at logic.at
Wed Oct 8 02:18:02 CEST 2014


Hi Peter,

we got a bug report that the current sources (which are very very
close to what is in svn) does not build on arm64.

Explanation and a bug fix is attached, thanks to Wookey in Cc.

----- Forwarded message from Wookey <wookey at wookware.org> -----

> This version of texlive-bin does not build on arm64 due to the
> internal libpng trying to use 32-bit neon code (neon is ARM SIMD
> unit). The attached simple patch correctly restricts that code to the
> right architectures.
> 
> There is actually a C intrinsics Neon implemention in the libpng which
> could be used for arm64, but that would involve more work, and for an
> internal libpng inside texlive does not seem worth the effort,
> especially at this stage of the release cycle.

----- End forwarded message -----

Maybe it makes sense to have this in our svn, too.

All the best

Norbert

------------------------------------------------------------------------
PREINING, Norbert                               http://www.preining.info
JAIST, Japan                                 TeX Live & Debian Developer
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0  ACF0 6CAC A448 860C DC13
------------------------------------------------------------------------
-------------- next part --------------
Description: Fix FTBFS on arm64
 Use correct defines for selecting 32-bit neon assembler code in 
 embedded libpng, so that it is not used on 64-bit armv8.
Author: Wookey <wookey at debian.org>
Last-Update: 2014-09-30

--- texlive-bin-2014.20140926.35254.orig/libs/libpng/libpng-1.6.13/pngpriv.h
+++ texlive-bin-2014.20140926.35254/libs/libpng/libpng-1.6.13/pngpriv.h
@@ -124,7 +124,7 @@
     * check both variants.
     */
 #  if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
-   defined(PNG_ALIGNED_MEMORY_SUPPORTED)
+   defined(PNG_ALIGNED_MEMORY_SUPPORTED) && defined(__arm__)
 #     define PNG_ARM_NEON_OPT 2
 #  else
 #     define PNG_ARM_NEON_OPT 0


More information about the tlbuild mailing list