diff mbox

[1/2] package/x11r7/xserver_xorg-server: add libdrm-specific cflags

Message ID 1469426956-23383-1-git-send-email-bernd.kuhls@t-online.de
State Changes Requested
Headers show

Commit Message

Bernd Kuhls July 25, 2016, 6:09 a.m. UTC
As described in
http://lists.busybox.net/pipermail/buildroot/2015-February/119410.html
xserver_xorg-server still uses PKG_CHECK_EXISTS to find libdrm but does
not add libdrm-specific CFLAGS to Makefile causing the build to fail.

Fixes
http://autobuild.buildroot.net/results/3b2/3b2b10314cde2ecacb7fd3949990a4cac2117f4c/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/x11r7/xserver_xorg-server/xserver_xorg-server.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Petazzoni July 25, 2016, 8:45 p.m. UTC | #1
Hello,

On Mon, 25 Jul 2016 08:09:15 +0200, Bernd Kuhls wrote:
> As described in
> http://lists.busybox.net/pipermail/buildroot/2015-February/119410.html
> xserver_xorg-server still uses PKG_CHECK_EXISTS to find libdrm but does
> not add libdrm-specific CFLAGS to Makefile causing the build to fail.

I am not convinced because the xserver is using PKG_CHECK_MODULES() to
check for libdrm:

if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then
        if test "x$DRM" = xyes; then
                AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support])
                PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
        fi
fi

and PKG_CHECK_MODULES() does fill in LIBDRM_CFLAGS.

PKG_CHECK_EXISTS() is only used for libdrm:

 * In a Solaris specific case, irrelevant;

 * To define XORG_DRIVER_MODESETTING to yes or no

So I'm not convinced by your explanation for this change.

Essentially, what I believe happens is that PKG_CHECK_MODULES() is only
called when DRI is enabled *or* DRI2 is enabled *or* DRI3 is enabled
*or* UDEV_KMS is enabled. Since none of these conditions are meant in
the configuration of
http://autobuild.buildroot.net/results/3b2/3b2b10314cde2ecacb7fd3949990a4cac2117f4c/,
the build fails.

Thomas
diff mbox

Patch

diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
index 85d7e98..0d14654 100644
--- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
@@ -99,6 +99,7 @@  XSERVER_XORG_SERVER_CONF_OPTS += --enable-xorg
 XSERVER_XORG_SERVER_DEPENDENCIES += libpciaccess
 ifeq ($(BR2_PACKAGE_LIBDRM),y)
 XSERVER_XORG_SERVER_DEPENDENCIES += libdrm
+XSERVER_XORG_SERVER_CONF_ENV += LIBDRM_CFLAGS="`$(PKG_CONFIG_HOST_BINARY) --cflags libdrm`"
 XSERVER_XORG_SERVER_CONF_OPTS += --enable-libdrm
 else
 XSERVER_XORG_SERVER_CONF_OPTS += --disable-libdrm