Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Aug 2020 15:28:29 +0000 (UTC)
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r547064 - in head/x11/pixman: . files
Message-ID:  <202008301528.07UFSTYo013782@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pkubaj
Date: Sun Aug 30 15:28:29 2020
New Revision: 547064
URL: https://svnweb.freebsd.org/changeset/ports/547064

Log:
  x11/pixman: support AltiVec on powerpc64
  
  Altivec on powerpc64 works just fine with pixman. Also add a patch to fix runtime AltiVec detection on FreeBSD.
  
  Since pixman-ppc.c requires newer GCC, add USES=compiler:c11.
  
  PR:		249005
  Approved by:	zeising (maintainer)

Added:
  head/x11/pixman/files/
  head/x11/pixman/files/patch-pixman_pixman-ppc.c   (contents, props changed)
Modified:
  head/x11/pixman/Makefile

Modified: head/x11/pixman/Makefile
==============================================================================
--- head/x11/pixman/Makefile	Sun Aug 30 15:21:43 2020	(r547063)
+++ head/x11/pixman/Makefile	Sun Aug 30 15:28:29 2020	(r547064)
@@ -12,7 +12,7 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 PORTSCOUT=	limitw:1,even
 
-USES=		cpe perl5 tar:xz xorg-cat:lib
+USES=		compiler:c11 cpe perl5 tar:xz xorg-cat:lib
 USE_PERL5=	build
 CONFIGURE_ARGS=	--disable-gtk
 INSTALL_TARGET=	install-strip
@@ -28,9 +28,7 @@ MAKE_ARGS=      SUBDIRS=pixman
 BUILD_DEPENDS+=	${LOCALBASE}/bin/as:devel/binutils
 CONFIGURE_ENV+=	CCASFLAGS="${CFLAGS} -B${LOCALBASE}/bin -no-integrated-as"
 LLD_UNSAFE=	yes
-.endif
-
-.if ${ARCH} == "powerpc64" || ${ARCH} == "powerpc"
+.elif ${ARCH} == "powerpc"
 CONFIGURE_ARGS+=	--disable-vmx
 .endif
 

Added: head/x11/pixman/files/patch-pixman_pixman-ppc.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/pixman/files/patch-pixman_pixman-ppc.c	Sun Aug 30 15:28:29 2020	(r547064)
@@ -0,0 +1,27 @@
+--- pixman/pixman-ppc.c.orig	2020-08-29 23:32:58 UTC
++++ pixman/pixman-ppc.c
+@@ -68,6 +68,24 @@ pixman_have_vmx (void)
+     return have_vmx;
+ }
+ 
++#elif defined (__FreeBSD__)
++#include <machine/cpu.h>
++#include <sys/auxv.h>
++
++static pixman_bool_t
++pixman_have_vmx (void)
++{
++
++    unsigned long cpufeatures;
++    int have_vmx;
++
++    if (elf_aux_info(AT_HWCAP, &cpufeatures, sizeof(cpufeatures)))
++        return FALSE;
++
++    have_vmx = cpufeatures & PPC_FEATURE_HAS_ALTIVEC;
++    return have_vmx;
++}
++
+ #elif defined (__linux__)
+ 
+ #include <sys/types.h>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008301528.07UFSTYo013782>