[Mesa-dev] [PATCH 1/2] r600g: Don't build llvm_wrapper.cpp when we aren't using LLVM

Alex Deucher alexdeucher at gmail.com
Fri Jan 25 08:20:02 PST 2013


On Fri, Jan 25, 2013 at 10:43 AM, Tom Stellard <tom at stellard.net> wrote:
> From: Tom Stellard <thomas.stellard at amd.com>
>
> We were using the NEED_RADEON_GALLIUM conditional to decide whether or not
> to build llvm_wrapper.cpp, which is required for using the LLVM backend.
> llvm_wrapper.cpp needs to be linked against the LLVM IPO libary
> and this library is only added to LLVM_LIBS if either opencl or the
> r600-llvm-compiler is enabled.
>
> The NEED_RADEON_GALLIUM conditional is set to true when enabling the
> radeonsi driver, so if the radeonsi and r600 drivers are enabled without
> also enabling opencl or r600-llvm-compiler, llvm_wrapper.cpp will be
> built, but the IPO library won't be added to LLVM_LIBS.  This was
> causing unresolved symbol errors when buiding with this configuration.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=59831

confirmed this fixes the issue.  for the series:

Tested-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/gallium/drivers/r600/Makefile.am | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/r600/Makefile.am b/src/gallium/drivers/r600/Makefile.am
> index 995261b..6de7e0f 100644
> --- a/src/gallium/drivers/r600/Makefile.am
> +++ b/src/gallium/drivers/r600/Makefile.am
> @@ -13,7 +13,8 @@ AM_CFLAGS = \
>  libr600_la_SOURCES = \
>         $(C_SOURCES)
>
> -if NEED_RADEON_GALLIUM
> +if USE_R600_LLVM_COMPILER
> +if HAVE_GALLIUM_COMPUTE
>
>  libr600_la_SOURCES += \
>         $(LLVM_C_SOURCES) \
> @@ -28,6 +29,7 @@ AM_CFLAGS += \
>  AM_CXXFLAGS= \
>         $(LLVM_CXXFLAGS)
>  endif
> +endif
>
>  if USE_R600_LLVM_COMPILER
>  AM_CFLAGS += \
> --
> 1.7.11.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list