The following patch should fix it:
Code:
From d9286b87bebfc9d79b2037d9b1cb199679419837 Mon Sep 17 00:00:00 2001
From: Tobias Droste <tdroste@gmx.de>
Date: Mon, 6 Feb 2012 01:51:28 +0100
Subject: [PATCH] build: Add libdrm_radeon when linking egl and gbm
this fixes undefined references when creating egl_gallium and r600g
Signed-off-by: Tobias Droste <tdroste@gmx.de>
---
src/gallium/targets/egl-static/Makefile | 2 ++
src/gallium/targets/gbm/Makefile | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/gallium/targets/egl-static/Makefile b/src/gallium/targets/egl-static/Makefile
index 70e4362..02a55ee 100644
--- a/src/gallium/targets/egl-static/Makefile
+++ b/src/gallium/targets/egl-static/Makefile
@@ -115,6 +115,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_R300=1
egl_LIBS += \
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
$(TOP)/src/gallium/drivers/r300/libr300.a
+egl_SYS += -ldrm_radeon
endif
endif
@@ -125,6 +126,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_R600=1
egl_LIBS += \
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
$(TOP)/src/gallium/drivers/r600/libr600.a
+egl_SYS += -ldrm_radeon
endif
endif
diff --git a/src/gallium/targets/gbm/Makefile b/src/gallium/targets/gbm/Makefile
index ce56f93..ca58a97 100644
--- a/src/gallium/targets/gbm/Makefile
+++ b/src/gallium/targets/gbm/Makefile
@@ -114,6 +114,7 @@ ifneq ($(findstring radeon/drm,$(GALLIUM_WINSYS_DIRS)),)
ifneq ($(findstring r300,$(GALLIUM_DRIVERS_DIRS)),)
_pipe_TARGETS_CC += $(PIPE_PREFIX)r300.so
pipe_SOURCES += pipe_r300.c
+pipe_LDFLAGS += -ldrm_radeon
endif
endif
@@ -121,6 +122,7 @@ ifneq ($(findstring radeon/drm,$(GALLIUM_WINSYS_DIRS)),)
ifneq ($(findstring r600,$(GALLIUM_DRIVERS_DIRS)),)
_pipe_TARGETS_CC += $(PIPE_PREFIX)r600.so
pipe_SOURCES += pipe_r600.c
+pipe_LDFLAGS += -ldrm_radeon
endif
endif
--
1.7.7