texlive[54291] Build/source/libs/libpng: --enable-powerpc-vsx: import

commits+karl at tug.org commits+karl at tug.org
Sat Mar 14 17:03:20 CET 2020


Revision: 54291
          http://tug.org/svn/texlive?view=revision&revision=54291
Author:   karl
Date:     2020-03-14 17:03:19 +0100 (Sat, 14 Mar 2020)
Log Message:
-----------
--enable-powerpc-vsx: import support from upstream

Modified Paths:
--------------
    trunk/Build/source/libs/libpng/ChangeLog
    trunk/Build/source/libs/libpng/Makefile.am
    trunk/Build/source/libs/libpng/Makefile.in
    trunk/Build/source/libs/libpng/config.h.in
    trunk/Build/source/libs/libpng/configure
    trunk/Build/source/libs/libpng/configure.ac

Modified: trunk/Build/source/libs/libpng/ChangeLog
===================================================================
--- trunk/Build/source/libs/libpng/ChangeLog	2020-03-14 15:40:52 UTC (rev 54290)
+++ trunk/Build/source/libs/libpng/ChangeLog	2020-03-14 16:03:19 UTC (rev 54291)
@@ -1,3 +1,12 @@
+2020-03-14  Karl Berry  <karl at freefriends.org>
+
+	Import VSX support from upstream to TL configure.
+	* configure.ac (powerpc-vsx): new AC_ARG_ENABLE, copied
+	from libpng-src/configure.ac.
+	* Makefile.am (nodist_libpng_a_SOURCES) [PNG_POWERPC_VSX]:
+	add powerpc/*.c, copied from libpng-src/Makefile.am.
+	From Johannes Hielscher, tlbuild mail 16 Feb 2020 23:09:54 (item 2).
+
 2019-05-03 Akira Kakuto  <kakuto at w32tex.org>
 
 	Import libpng-1.6.37.

Modified: trunk/Build/source/libs/libpng/Makefile.am
===================================================================
--- trunk/Build/source/libs/libpng/Makefile.am	2020-03-14 15:40:52 UTC (rev 54290)
+++ trunk/Build/source/libs/libpng/Makefile.am	2020-03-14 16:03:19 UTC (rev 54291)
@@ -1,7 +1,7 @@
 ## $Id$
 ## Proxy Makefile.am to build libpng for TeX Live.
 ##
-##   Copyright 2016-2017 Karl Berry <tex-live at tug.org>
+##   Copyright 2016-2020 Karl Berry <tex-live at tug.org>
 ##   Copyright 2009-2015 Peter Breitenlohner <tex-live at tug.org>
 ##
 ##   This file is free software; the copyright holder
@@ -49,6 +49,11 @@
 	@LIBPNG_TREE@/arm/palette_neon_intrinsics.c
 endif
 
+if PNG_POWERPC_VSX
+nodist_libpng_a_SOURCES += @LIBPNG_TREE@/powerpc/powerpc_init.c\
+        @LIBPNG_TREE@/powerpc/filter_vsx_intrinsics.c
+endif
+
 $(libpng_a_OBJECTS): config.force
 
 ## Tests

Modified: trunk/Build/source/libs/libpng/Makefile.in
===================================================================
--- trunk/Build/source/libs/libpng/Makefile.in	2020-03-14 15:40:52 UTC (rev 54290)
+++ trunk/Build/source/libs/libpng/Makefile.in	2020-03-14 16:03:19 UTC (rev 54291)
@@ -90,6 +90,9 @@
 @PNG_ARM_NEON_TRUE@	@LIBPNG_TREE@/arm/filter_neon.S @LIBPNG_TREE@/arm/filter_neon_intrinsics.c \
 @PNG_ARM_NEON_TRUE@	@LIBPNG_TREE@/arm/palette_neon_intrinsics.c
 
+ at PNG_POWERPC_VSX_TRUE@am__append_2 = @LIBPNG_TREE@/powerpc/powerpc_init.c\
+ at PNG_POWERPC_VSX_TRUE@        @LIBPNG_TREE@/powerpc/filter_vsx_intrinsics.c
+
 @build_TRUE at check_PROGRAMS = pngtest$(EXEEXT)
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -124,6 +127,8 @@
 @PNG_ARM_NEON_TRUE@	@LIBPNG_TREE@/arm/filter_neon.$(OBJEXT) \
 @PNG_ARM_NEON_TRUE@	@LIBPNG_TREE@/arm/filter_neon_intrinsics.$(OBJEXT) \
 @PNG_ARM_NEON_TRUE@	@LIBPNG_TREE@/arm/palette_neon_intrinsics.$(OBJEXT)
+ at PNG_POWERPC_VSX_TRUE@am__objects_2 = @LIBPNG_TREE@/powerpc/powerpc_init.$(OBJEXT) \
+ at PNG_POWERPC_VSX_TRUE@	@LIBPNG_TREE@/powerpc/filter_vsx_intrinsics.$(OBJEXT)
 nodist_libpng_a_OBJECTS = @LIBPNG_TREE@/png.$(OBJEXT) \
 	@LIBPNG_TREE@/pngerror.$(OBJEXT) \
 	@LIBPNG_TREE@/pngget.$(OBJEXT) @LIBPNG_TREE@/pngmem.$(OBJEXT) \
@@ -136,7 +141,8 @@
 	@LIBPNG_TREE@/pngwio.$(OBJEXT) \
 	@LIBPNG_TREE@/pngwrite.$(OBJEXT) \
 	@LIBPNG_TREE@/pngwtran.$(OBJEXT) \
-	@LIBPNG_TREE@/pngwutil.$(OBJEXT) $(am__objects_1)
+	@LIBPNG_TREE@/pngwutil.$(OBJEXT) $(am__objects_1) \
+	$(am__objects_2)
 libpng_a_OBJECTS = $(nodist_libpng_a_OBJECTS)
 nodist_pngtest_OBJECTS = @LIBPNG_TREE@/pngtest.$(OBJEXT)
 pngtest_OBJECTS = $(nodist_pngtest_OBJECTS)
@@ -177,7 +183,9 @@
 	@LIBPNG_TREE@/arm/$(DEPDIR)/arm_init.Po \
 	@LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon.Po \
 	@LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon_intrinsics.Po \
-	@LIBPNG_TREE@/arm/$(DEPDIR)/palette_neon_intrinsics.Po
+	@LIBPNG_TREE@/arm/$(DEPDIR)/palette_neon_intrinsics.Po \
+	@LIBPNG_TREE@/powerpc/$(DEPDIR)/filter_vsx_intrinsics.Po \
+	@LIBPNG_TREE@/powerpc/$(DEPDIR)/powerpc_init.Po
 am__mv = mv -f
 CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
@@ -621,7 +629,7 @@
 	@LIBPNG_TREE@/pngrutil.c @LIBPNG_TREE@/pngset.c \
 	@LIBPNG_TREE@/pngtrans.c @LIBPNG_TREE@/pngwio.c \
 	@LIBPNG_TREE@/pngwrite.c @LIBPNG_TREE@/pngwtran.c \
-	@LIBPNG_TREE@/pngwutil.c $(am__append_1)
+	@LIBPNG_TREE@/pngwutil.c $(am__append_1) $(am__append_2)
 AM_TESTS_ENVIRONMENT = LIBPNG_TREE=$(LIBPNG_TREE); export LIBPNG_TREE;
 @build_TRUE at TESTS = libpng.test
 @build_TRUE at dist_check_SCRIPTS = libpng.test
@@ -750,6 +758,18 @@
 @LIBPNG_TREE@/arm/palette_neon_intrinsics.$(OBJEXT):  \
 	@LIBPNG_TREE@/arm/$(am__dirstamp) \
 	@LIBPNG_TREE@/arm/$(DEPDIR)/$(am__dirstamp)
+ at LIBPNG_TREE@/powerpc/$(am__dirstamp):
+	@$(MKDIR_P) @LIBPNG_TREE@/powerpc
+	@: > @LIBPNG_TREE@/powerpc/$(am__dirstamp)
+ at LIBPNG_TREE@/powerpc/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) @LIBPNG_TREE@/powerpc/$(DEPDIR)
+	@: > @LIBPNG_TREE@/powerpc/$(DEPDIR)/$(am__dirstamp)
+ at LIBPNG_TREE@/powerpc/powerpc_init.$(OBJEXT):  \
+	@LIBPNG_TREE@/powerpc/$(am__dirstamp) \
+	@LIBPNG_TREE@/powerpc/$(DEPDIR)/$(am__dirstamp)
+ at LIBPNG_TREE@/powerpc/filter_vsx_intrinsics.$(OBJEXT):  \
+	@LIBPNG_TREE@/powerpc/$(am__dirstamp) \
+	@LIBPNG_TREE@/powerpc/$(DEPDIR)/$(am__dirstamp)
 
 libpng.a: $(libpng_a_OBJECTS) $(libpng_a_DEPENDENCIES) $(EXTRA_libpng_a_DEPENDENCIES) 
 	$(AM_V_at)-rm -f libpng.a
@@ -766,6 +786,7 @@
 	-rm -f *.$(OBJEXT)
 	-rm -f @LIBPNG_TREE@/*.$(OBJEXT)
 	-rm -f @LIBPNG_TREE@/arm/*.$(OBJEXT)
+	-rm -f @LIBPNG_TREE@/powerpc/*.$(OBJEXT)
 
 distclean-compile:
 	-rm -f *.tab.c
@@ -790,6 +811,8 @@
 @AMDEP_TRUE@@am__include@ @am__quote@@LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon.Po at am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@@LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon_intrinsics.Po at am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@@LIBPNG_TREE@/arm/$(DEPDIR)/palette_neon_intrinsics.Po at am__quote@ # am--include-marker
+ at AMDEP_TRUE@@am__include@ @am__quote@@LIBPNG_TREE@/powerpc/$(DEPDIR)/filter_vsx_intrinsics.Po at am__quote@ # am--include-marker
+ at AMDEP_TRUE@@am__include@ @am__quote@@LIBPNG_TREE@/powerpc/$(DEPDIR)/powerpc_init.Po at am__quote@ # am--include-marker
 
 $(am__depfiles_remade):
 	@$(MKDIR_P) $(@D)
@@ -1327,6 +1350,8 @@
 	-rm -f @LIBPNG_TREE@/$(am__dirstamp)
 	-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/$(am__dirstamp)
 	-rm -f @LIBPNG_TREE@/arm/$(am__dirstamp)
+	-rm -f @LIBPNG_TREE@/powerpc/$(DEPDIR)/$(am__dirstamp)
+	-rm -f @LIBPNG_TREE@/powerpc/$(am__dirstamp)
 	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
@@ -1359,6 +1384,8 @@
 	-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon.Po
 	-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon_intrinsics.Po
 	-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/palette_neon_intrinsics.Po
+	-rm -f @LIBPNG_TREE@/powerpc/$(DEPDIR)/filter_vsx_intrinsics.Po
+	-rm -f @LIBPNG_TREE@/powerpc/$(DEPDIR)/powerpc_init.Po
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-hdr distclean-tags
@@ -1426,6 +1453,8 @@
 	-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon.Po
 	-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon_intrinsics.Po
 	-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/palette_neon_intrinsics.Po
+	-rm -f @LIBPNG_TREE@/powerpc/$(DEPDIR)/filter_vsx_intrinsics.Po
+	-rm -f @LIBPNG_TREE@/powerpc/$(DEPDIR)/powerpc_init.Po
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 

Modified: trunk/Build/source/libs/libpng/config.h.in
===================================================================
--- trunk/Build/source/libs/libpng/config.h.in	2020-03-14 15:40:52 UTC (rev 54290)
+++ trunk/Build/source/libs/libpng/config.h.in	2020-03-14 16:03:19 UTC (rev 54291)
@@ -63,6 +63,15 @@
 /* Enable ARM Neon optimizations */
 #undef PNG_ARM_NEON_OPT
 
+/* Turn on POWERPC VSX optimizations at run-time */
+#undef PNG_POWERPC_VSX_API_SUPPORTED
+
+/* Check for POWERPC VSX support at run-time */
+#undef PNG_POWERPC_VSX_CHECK_SUPPORTED
+
+/* Enable POWERPC VSX optimizations */
+#undef PNG_POWERPC_VSX_OPT
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 

Modified: trunk/Build/source/libs/libpng/configure
===================================================================
--- trunk/Build/source/libs/libpng/configure	2020-03-14 15:40:52 UTC (rev 54290)
+++ trunk/Build/source/libs/libpng/configure	2020-03-14 16:03:19 UTC (rev 54291)
@@ -625,6 +625,8 @@
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
+PNG_POWERPC_VSX_FALSE
+PNG_POWERPC_VSX_TRUE
 PNG_ARM_NEON_FALSE
 PNG_ARM_NEON_TRUE
 LIBPNG_DEFINES
@@ -745,6 +747,7 @@
 with_zlib_includes
 with_zlib_libdir
 enable_arm_neon
+enable_powerpc_vsx
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1391,6 +1394,12 @@
                           call to png_set_option; yes/on: turn on
                           unconditionally. If not specified: determined by the
                           compiler.
+  --enable-powerpc-vsx  Enable POWERPC VSX optimizations: =no/off, check,
+                          api, yes/on: no/off: disable the optimizations;
+                          check: use internal checking code api: disable by
+                          default, enable by a call to png_set_option yes/on:
+                          turn on unconditionally. If not specified:
+                          determined by the compiler.
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -6029,6 +6038,67 @@
 fi
 
 
+# emacs-page
+# PowerPC
+# ===
+#
+# PowerPC VSX (SIMD) support.
+
+# Check whether --enable-powerpc-vsx was given.
+if test "${enable_powerpc_vsx+set}" = set; then :
+  enableval=$enable_powerpc_vsx; case "$enableval" in
+      no|off)
+         # disable the default enabling on __ppc64__ systems:
+
+$as_echo "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h
+
+         # Prevent inclusion of the platform specific files below:
+         enable_powerpc_vsx=no;;
+      check)
+
+$as_echo "#define PNG_POWERPC_VSX_CHECK_SUPPORTED /**/" >>confdefs.h
+
+         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file
+            for the list of supported OSes." >&5
+$as_echo "$as_me: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file
+            for the list of supported OSes." >&2;};;
+      api)
+
+$as_echo "#define PNG_POWERPC_VSX_API_SUPPORTED /**/" >>confdefs.h
+;;
+      yes|on)
+
+$as_echo "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h
+
+         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if
+            you want the optimizations unconditionally pass '-maltivec -mvsx'
+            or '-mcpu=power8'to the compiler." >&5
+$as_echo "$as_me: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if
+            you want the optimizations unconditionally pass '-maltivec -mvsx'
+            or '-mcpu=power8'to the compiler." >&2;};;
+      *)
+         as_fn_error $? "--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value" "$LINENO" 5
+   esac
+fi
+
+
+# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or
+# where POWERPC optimizations were explicitly requested (this allows a fallback if a
+# future host CPU does not match 'powerpc*')
+
+ if test "$enable_powerpc_vsx" != 'no' &&
+    case "$host_cpu" in
+      powerpc*|ppc64*) :;;
+    esac; then
+  PNG_POWERPC_VSX_TRUE=
+  PNG_POWERPC_VSX_FALSE='#'
+else
+  PNG_POWERPC_VSX_TRUE='#'
+  PNG_POWERPC_VSX_FALSE=
+fi
+
+
+
 ac_config_files="$ac_config_files Makefile include/Makefile"
 
 
@@ -6185,6 +6255,10 @@
   as_fn_error $? "conditional \"PNG_ARM_NEON\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${PNG_POWERPC_VSX_TRUE}" && test -z "${PNG_POWERPC_VSX_FALSE}"; then
+  as_fn_error $? "conditional \"PNG_POWERPC_VSX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0

Modified: trunk/Build/source/libs/libpng/configure.ac
===================================================================
--- trunk/Build/source/libs/libpng/configure.ac	2020-03-14 15:40:52 UTC (rev 54290)
+++ trunk/Build/source/libs/libpng/configure.ac	2020-03-14 16:03:19 UTC (rev 54291)
@@ -1,7 +1,7 @@
 dnl $Id$
 dnl Process this file with autoconf to produce a configure script.
 dnl
-dnl   Copyright 2016-2017 Karl Berry <tex-live at tug.org>
+dnl   Copyright 2016-2020 Karl Berry <tex-live at tug.org>
 dnl   Copyright 2009-2015 Peter Breitenlohner <tex-live at tug.org>
 dnl
 dnl   This file is free software; the copyright holder
@@ -124,6 +124,55 @@
       *)    test "$enable_arm_neon" != '';;
     esac])
 
+# emacs-page
+# PowerPC
+# ===
+#
+# PowerPC VSX (SIMD) support.
+
+AC_ARG_ENABLE([powerpc-vsx],
+AS_HELP_STRING([[[--enable-powerpc-vsx]]],
+      [Enable POWERPC VSX optimizations: =no/off, check, api, yes/on:]
+      [no/off: disable the optimizations; check: use internal checking code]
+      [api: disable by default, enable by 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 __ppc64__ systems:
+         AC_DEFINE([PNG_POWERPC_VSX_OPT], [0],
+                   [Disable POWERPC VSX optimizations])
+         # Prevent inclusion of the platform specific files below:
+         enable_powerpc_vsx=no;;
+      check)
+         AC_DEFINE([PNG_POWERPC_VSX_CHECK_SUPPORTED], [],
+                   [Check for POWERPC VSX support at run-time])
+         AC_MSG_WARN([--enable-powerpc-vsx Please check contrib/powerpc/README file]
+            [for the list of supported OSes.]);;
+      api)
+         AC_DEFINE([PNG_POWERPC_VSX_API_SUPPORTED], [],
+                   [Turn on POWERPC VSX optimizations at run-time]);;
+      yes|on)
+         AC_DEFINE([PNG_POWERPC_VSX_OPT], [2],
+                   [Enable POWERPC VSX optimizations])
+         AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api', if]
+            [you want the optimizations unconditionally pass '-maltivec -mvsx']
+            [or '-mcpu=power8'to the compiler.]);;
+      *)
+         AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value])
+   esac])
+
+# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or
+# where POWERPC optimizations were explicitly requested (this allows a fallback if a
+# future host CPU does not match 'powerpc*')
+
+AM_CONDITIONAL([PNG_POWERPC_VSX],
+   [test "$enable_powerpc_vsx" != 'no' &&
+    case "$host_cpu" in
+      powerpc*|ppc64*) :;;
+    esac])
+
+
 AC_CONFIG_FILES([Makefile include/Makefile])
 
 AC_OUTPUT



More information about the tex-live-commits mailing list.