[Mesa-stable] Patch 81799c82e47b not picking cleanly to 10.1 branch

Jonathan Gray jsg at jsg.id.au
Mon Apr 14 22:24:02 PDT 2014


On Mon, Apr 14, 2014 at 12:12:17PM -0700, Carl Worth wrote:
> Hi Jonathan,
> 
> You nominated the below patch for the 10.1 branch. It doesn't pick
> cleanly, and I don't quite trust myself to sufficiently test my conflict
> resolution on this one.
> 
> If someone would like to provide me a conflict-resolved backport of this
> patch to the 10.1 patch I'll be happy to apply it.
> 
> -Carl
> 
> commit 81799c82e47b34db6eeca34113016d2d8389669d
> Author: Jonathan Gray <jsg at jsg.id.au>
> Date:   Sun Mar 23 15:53:08 2014 +1100
> 
>     configure: don't require libudev for gbm or egl drm/wayland
>     
>     After the loader changes libudev is no longer required for
>     gbm or the egl drm/wayland platforms.  Lets these build/run
>     on OpenBSD.
>     
>     v2: preserve the libudev requirement for Linux as suggested
>     by Emil Velikov.
>     
>     Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
>     Cc: "10.1" <mesa-stable at lists.freedesktop.org>
>     Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>

Actually, Emil nominated that one but I've attached a patch
against the 10.1 branch for it.  The conflict seems
to be because of a libudev version check that isn't in 10.1.

When trying to build this I noticed another patch that would
be nice to have cherry-picked:

commit 0d6f573f6e6785babe1e274697fdd315db95fb98
Author: Jonathan Gray <jsg at jsg.id.au>
Date:   Mon Mar 10 07:27:00 2014 -0600

    glsl: Link glsl_compiler with pthreads library.

    Fixes the following build error on OpenBSD:

    ./.libs/libglsl.a(builtin_functions.o)(.text+0x973): In function `mtx_lock':
    ../../include/c11/threads_posix.h:195: undefined reference to `pthread_mutex_lock'
    ./.libs/libglsl.a(builtin_functions.o)(.text+0x9a5): In function `mtx_unlock':
    ../../include/c11/threads_posix.h:248: undefined reference to `pthread_mutex_unlock'

    Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
    Reviewed-by: Brian Paul <brianp at vmware.com>

That one had no conflicts when cherry picking into a 10.1 based branch here.
-------------- next part --------------
>From 78e93f3855d8f019845e67e8d415ecc64d18a59b Mon Sep 17 00:00:00 2001
From: Jonathan Gray <jsg at jsg.id.au>
Date: Sun, 23 Mar 2014 15:53:08 +1100
Subject: [PATCH] configure: don't require libudev for gbm or egl drm/wayland

After the loader changes libudev is no longer required for
gbm or the egl drm/wayland platforms.  Lets these build/run
on OpenBSD.

v2: preserve the libudev requirement for Linux as suggested
by Emil Velikov.

Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
Cc: "10.1" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
(cherry picked from commit 81799c82e47b34db6eeca34113016d2d8389669d)
---
 configure.ac | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 53efa1d..a430285 100644
--- a/configure.ac
+++ b/configure.ac
@@ -780,6 +780,13 @@ if test "x$have_libdrm" = xyes; then
 	DEFINES="$DEFINES -DHAVE_LIBDRM"
 fi
 
+case "$host_os" in
+linux*)
+    need_libudev=yes ;;
+*)
+    need_libudev=no ;;
+esac
+
 PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
                   have_libudev=yes, have_libudev=no)
 
@@ -1184,7 +1191,7 @@ if test "x$enable_gbm" = xauto; then
     esac
 fi
 if test "x$enable_gbm" = xyes; then
-    if test x"$have_libudev" != xyes; then
+    if test "x$need_libudev$have_libudev" = xyesno; then
         AC_MSG_ERROR([gbm needs udev])
     fi
 
@@ -1196,7 +1203,11 @@ if test "x$enable_gbm" = xyes; then
     fi
 fi
 AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
-GBM_PC_REQ_PRIV="libudev"
+if test "x$need_libudev" = xyes; then
+    GBM_PC_REQ_PRIV="libudev"
+else
+    GBM_PC_REQ_PRIV=""
+fi
 GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
 AC_SUBST([GBM_PC_REQ_PRIV])
 AC_SUBST([GBM_PC_LIB_PRIV])
@@ -1467,8 +1478,8 @@ for plat in $egl_platforms; do
 		;;
 	esac
 
-        case "$plat$have_libudev" in
-                waylandno|drmno)
+        case "$plat$need_libudev$have_libudev" in
+                waylandyesno|drmyesno)
                     AC_MSG_ERROR([cannot build $plat platfrom without udev]) ;;
         esac
 done
@@ -1708,8 +1719,9 @@ gallium_require_llvm() {
 
 gallium_require_drm_loader() {
     if test "x$enable_gallium_loader" = xyes; then
-        PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
-                          AC_MSG_ERROR([Gallium drm loader requires libudev]))
+        if test "x$need_libudev$have_libudev" = xyesno; then
+            AC_MSG_ERROR([Gallium drm loader requires libudev])
+        fi
         if test "x$have_libdrm" != xyes; then
             AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED])
         fi
-- 
1.9.1



More information about the mesa-stable mailing list