From 5272ab618ff6074b23fd788c3c8260eb9b5fce54 Mon Sep 17 00:00:00 2001 From: Johannes Obermayr Date: Mon, 28 Jan 2013 20:18:40 +0100 Subject: [PATCH v3] r600g: Fix building with --enable-r600-llvm-compiler the right way. This also reverts commit 91a160b19f5954fad6b1282880b843e8b1f15df4. --- configure.ac | 7 ++++--- src/gallium/drivers/r600/Makefile.am | 25 +++++++++++++++---------- 2 Dateien geändert, 19 Zeilen hinzugefügt(+), 13 Zeilen entfernt(-) diff --git a/configure.ac b/configure.ac index 1e352db..9cc5c4a 100644 --- a/configure.ac +++ b/configure.ac @@ -1834,12 +1834,14 @@ if test "x$with_gallium_drivers" != x; then if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then radeon_llvm_check NEED_RADEON_GALLIUM=yes; - R600_NEED_RADEON_GALLIUM=yes; - LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo bitreader asmparser" + LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo" fi if test "x$enable_r600_llvm" = xyes; then USE_R600_LLVM_COMPILER=yes; fi + if test "x$enable_opencl" = xyes -a "x$with_llvm_shared_libs" = xno; then + LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser" + fi gallium_check_st "radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600" ;; xradeonsi) @@ -1988,7 +1990,6 @@ AM_CONDITIONAL(HAVE_GALAHAD_GALLIUM, test x$HAVE_GALAHAD_GALLIUM = xyes) AM_CONDITIONAL(HAVE_IDENTITY_GALLIUM, test x$HAVE_IDENTITY_GALLIUM = xyes) AM_CONDITIONAL(HAVE_NOOP_GALLIUM, test x$HAVE_NOOP_GALLIUM = xyes) AM_CONDITIONAL(NEED_RADEON_GALLIUM, test x$NEED_RADEON_GALLIUM = xyes) -AM_CONDITIONAL(R600_NEED_RADEON_GALLIUM, test x$R600_NEED_RADEON_GALLIUM = xyes) AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes) AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes) AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = xyes) diff --git a/src/gallium/drivers/r600/Makefile.am b/src/gallium/drivers/r600/Makefile.am index 6f48b56..6bac529 100644 --- a/src/gallium/drivers/r600/Makefile.am +++ b/src/gallium/drivers/r600/Makefile.am @@ -8,13 +8,13 @@ AM_CFLAGS = \ -I$(top_srcdir)/include \ $(GALLIUM_CFLAGS) \ $(RADEON_CFLAGS) \ - $(VISIBILITY_CFLAGS) + $(VISIBILITY_CFLAGS) \ + $(DEFINES) libr600_la_SOURCES = \ $(C_SOURCES) -if R600_NEED_RADEON_GALLIUM - +if HAVE_GALLIUM_COMPUTE libr600_la_SOURCES += \ $(LLVM_C_SOURCES) \ $(LLVM_CXX_SOURCES) @@ -22,19 +22,24 @@ libr600_la_SOURCES += \ libr600_la_LIBADD = ../radeon/libllvmradeon@VERSION@.la AM_CFLAGS += \ + -I$(top_srcdir)/src/gallium/drivers/radeon \ $(LLVM_CFLAGS) \ - -I$(top_srcdir)/src/gallium/drivers/radeon/ + -DHAVE_OPENCL -AM_CXXFLAGS= \ +AM_CXXFLAGS = \ $(LLVM_CXXFLAGS) -endif - +else if USE_R600_LLVM_COMPILER +libr600_la_SOURCES += \ + $(LLVM_C_SOURCES) + AM_CFLAGS += \ - -DR600_USE_LLVM + -I$(top_srcdir)/src/gallium/drivers/radeon \ + $(LLVM_CFLAGS) +endif endif -if HAVE_GALLIUM_COMPUTE +if USE_R600_LLVM_COMPILER AM_CFLAGS += \ - -DHAVE_OPENCL + -DR600_USE_LLVM endif -- 1.7.10.4