clover: Fix linkage of libOpenCL
authorNiels Ole Salscheider <niels_ole@salscheider-online.de>
Thu, 4 Apr 2013 21:26:45 +0000 (23:26 +0200)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 8 Apr 2013 14:08:10 +0000 (07:08 -0700)
Clover needs the irreader component of llvm

v2: Check for irreader component
irreader is only available with LLVM 3.3 >= 177971

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
configure.ac

index 81d4a3f3ea3b6b30115c6573a79c2e7fdd4d394e..fea586845a692bec8ccea46d5c558fd5729cf0c6 100644 (file)
@@ -1650,6 +1650,10 @@ if test "x$enable_gallium_llvm" = xyes; then
 
         if test "x$enable_opencl" = xyes; then
             LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation"
+            # LLVM 3.3 >= 177971 requires IRReader
+            if $LLVM_CONFIG --components | grep -q '\<irreader\>'; then
+                LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader"
+            fi
         fi
        LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
        LLVM_BINDIR=`$LLVM_CONFIG --bindir`