From owner-freebsd-x11@FreeBSD.ORG Tue Jul 3 09:30:16 2012 Return-Path: Delivered-To: freebsd-x11@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C0CA106564A for ; Tue, 3 Jul 2012 09:30:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 366718FC1D for ; Tue, 3 Jul 2012 09:30:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q639UG9Y013268 for ; Tue, 3 Jul 2012 09:30:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q639UGE6013265; Tue, 3 Jul 2012 09:30:16 GMT (envelope-from gnats) Date: Tue, 3 Jul 2012 09:30:16 GMT Message-Id: <201207030930.q639UGE6013265@freefall.freebsd.org> To: freebsd-x11@FreeBSD.org From: Matthieu Volat Cc: Subject: Re: powerpc/165585: x11-servers/xorg-server: Both Xorg and Xorg-server port installs break when dri is being built X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthieu Volat List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 09:30:16 -0000 The following reply was made to PR powerpc/165585; it has been noted by GNATS. From: Matthieu Volat To: bug-followup@FreeBSD.org, superbisquit@gmail.com Cc: Subject: Re: powerpc/165585: x11-servers/xorg-server: Both Xorg and Xorg-server port installs break when dri is being built Date: Tue, 3 Jul 2012 11:26:29 +0200 This is a multi-part message in MIME format. --Multipart=_Tue__3_Jul_2012_11_26_29_+0200_aCMDDNjZdmHv959w Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Here is a follow-up on building X.org on powerpc. I've reduced and cleaned my patches, and made so that libdrm and dri could be built without manual actions. Here is an overview of what it does : * graphics/libdrm : build the intel libraries... this sound silly but dri want to build every gfx card backend, so let libdrm build an intel backend * graphics/dri: changes are made into libGL as it's where patches are stored for dri too, this is just a fix to a radeon file about bit swapping functions If anybody has feedback or can push for a commit... ;) -- Matthieu Volat --Multipart=_Tue__3_Jul_2012_11_26_29_+0200_aCMDDNjZdmHv959w Content-Type: text/x-diff; name="powerpc_xorg.patch" Content-Disposition: attachment; filename="powerpc_xorg.patch" Content-Transfer-Encoding: 7bit diff -Nru graphics/libdrm.orig/Makefile graphics/libdrm/Makefile --- graphics/libdrm.orig/Makefile 2012-07-02 19:51:23.000000000 +0200 +++ graphics/libdrm/Makefile 2012-07-02 19:54:04.000000000 +0200 @@ -41,6 +41,10 @@ PLIST_SUB+= KMS="@comment " .endif +.if ${ARCH} == "powerpc" +EXTRA_PATCHES+= ${FILESDIR}/extra-new-configure +.endif + LIBDRM_VERSION= 2.4.31 LIBDRM_REVISION=1 PLIST_SUB+= OLD="@comment " NEW="" diff -Nru graphics/libdrm.orig/files/extra-new-configure graphics/libdrm/files/extra-new-configure --- graphics/libdrm.orig/files/extra-new-configure 1970-01-01 01:00:00.000000000 +0100 +++ graphics/libdrm/files/extra-new-configure 2012-07-02 19:51:36.000000000 +0200 @@ -0,0 +1,11 @@ +--- configure.orig 2012-07-02 19:39:00.000000000 +0200 ++++ configure 2012-07-02 19:39:16.000000000 +0200 +@@ -12658,7 +12658,7 @@ + else + if test "x$INTEL" != "xno"; then + case $host_cpu in +- i?86|amd64) INTEL=yes ;; ++ i?86|amd64|powerpc) INTEL=yes ;; + *) INTEL=no ;; + esac + fi diff -Nru graphics/libGL.orig/bsd.mesalib.mk graphics/libGL/bsd.mesalib.mk --- graphics/libGL.orig/bsd.mesalib.mk 2012-07-02 22:22:29.000000000 +0200 +++ graphics/libGL/bsd.mesalib.mk 2012-07-02 22:24:01.000000000 +0200 @@ -57,7 +57,8 @@ ${PATCHDIR}/extra-sis_context.h \ ${PATCHDIR}/extra-src-glsl_ir_constant_expression.cpp \ ${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c \ - ${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c + ${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c \ + ${PATCHDIR}/extra-src__mesa__drivers__dri__r600__radeon_span.c .else EXTRA_PATCHES+= ${PATCHDIR}/extra-src__mesa__x86-64__glapi_x86-64.S \ ${PATCHDIR}/extra-src__mesa__x86-64__xform4.S \ diff -Nru graphics/libGL.orig/files/extra-src__mesa__drivers__dri__r600__radeon_span.c graphics/libGL/files/extra-src__mesa__drivers__dri__r600__radeon_span.c --- graphics/libGL.orig/files/extra-src__mesa__drivers__dri__r600__radeon_span.c 1970-01-01 01:00:00.000000000 +0100 +++ graphics/libGL/files/extra-src__mesa__drivers__dri__r600__radeon_span.c 2012-07-02 22:38:34.000000000 +0200 @@ -0,0 +1,15 @@ +--- src/mesa/drivers/dri/r600/radeon_span.c.orig 2012-06-22 22:18:00.000000000 +0200 ++++ src/mesa/drivers/dri/r600/radeon_span.c 2012-06-22 22:23:02.000000000 +0200 +@@ -51,7 +51,11 @@ + #define DBG 0 + + #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN +-#if defined(__linux__) ++#if defined(__FreeBSD__) ++#include ++#define CPU_TO_LE16( x ) bswap16( x ) ++#define LE16_TO_CPU( x ) bswap16( x ) ++#elif defined(__linux__) + #include + #define CPU_TO_LE16( x ) bswap_16( x ) + #define LE16_TO_CPU( x ) bswap_16( x ) --Multipart=_Tue__3_Jul_2012_11_26_29_+0200_aCMDDNjZdmHv959w--