Add a patch so that this builds on NetBSD/powerpc with altivec.

Without this, we get "subscripted value is neither array nor pointer"
error from the compiler.
Since this is a build fix for powerpc platforms, no PKGREVISION bump.
This commit is contained in:
he 2016-04-21 21:39:36 +00:00
parent de8efa2de9
commit 3742e9a290
2 changed files with 51 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.58 2016/02/05 12:15:40 wiz Exp $
$NetBSD: distinfo,v 1.59 2016/04/21 21:39:36 he Exp $
SHA1 (pixman-0.34.0.tar.bz2) = 367698744e74d6d4f363041482965b9ea7fbe4a5
RMD160 (pixman-0.34.0.tar.bz2) = 2e4b79160bc913dc0043f9c1710f91801bcb8734
@ -9,3 +9,4 @@ SHA1 (patch-bb) = d47b1857771b8addb6897d45782ba2735a7aacbd
SHA1 (patch-bc) = 3e23e6c482ea193885f3f762af355ef2f692132b
SHA1 (patch-bd) = 1b1432f4a88d5486afdb4c0cad0808d3748fa522
SHA1 (patch-pixman_Makefile.in) = 7dabdc0e2c8c73780c4b005ef6f5055a550b9651
SHA1 (patch-pixman_pixman-vmx.c) = d96dad41d94bf8dfb956afda00a5a175a9c1f6fc

View file

@ -0,0 +1,49 @@
$NetBSD: patch-pixman_pixman-vmx.c,v 1.1 2016/04/21 21:39:36 he Exp $
Add a fix so that this builds on NetBSD/powerpc. Otherwise we get
pixman-vmx.c:2936:5: error: subscripted value is neither array nor pointer
--- pixman/pixman-vmx.c.orig 2016-01-04 09:13:54.000000000 +0000
+++ pixman/pixman-vmx.c
@@ -2913,32 +2913,29 @@ scaled_nearest_scanline_vmx_8888_8888_OV
while (w >= 4)
{
- vector unsigned int tmp;
- uint32_t tmp1, tmp2, tmp3, tmp4;
+ union {
+ vector unsigned int tmp;
+ uint32_t tmp1[4];
+ } u;
- tmp1 = *(ps + pixman_fixed_to_int (vx));
+ u.tmp1[0] = *(ps + pixman_fixed_to_int (vx));
vx += unit_x;
while (vx >= 0)
vx -= src_width_fixed;
- tmp2 = *(ps + pixman_fixed_to_int (vx));
+ u.tmp1[1] = *(ps + pixman_fixed_to_int (vx));
vx += unit_x;
while (vx >= 0)
vx -= src_width_fixed;
- tmp3 = *(ps + pixman_fixed_to_int (vx));
+ u.tmp1[2] = *(ps + pixman_fixed_to_int (vx));
vx += unit_x;
while (vx >= 0)
vx -= src_width_fixed;
- tmp4 = *(ps + pixman_fixed_to_int (vx));
+ u.tmp1[3] = *(ps + pixman_fixed_to_int (vx));
vx += unit_x;
while (vx >= 0)
vx -= src_width_fixed;
- tmp[0] = tmp1;
- tmp[1] = tmp2;
- tmp[2] = tmp3;
- tmp[3] = tmp4;
-
- vsrc = combine4 ((const uint32_t *) &tmp, pm);
+ vsrc = combine4 ((const uint32_t *) &u.tmp, pm);
if (is_opaque (vsrc))
{