[Mesa-dev] [PATCH] configure.ac: Prevent build of radeon llvm backend with llvm 3.2

2012-11-02 Thread Vincent Lejeune
---
 configure.ac | 18 +-
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6b97a26..45d1510 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1748,15 +1748,23 @@ gallium_require_drm_loader() {
 }
 
 radeon_llvm_check() {
-LLVM_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
-if test $LLVM_VERSION_MAJOR -lt 3 -o x$LLVM_VERSION = x3.0; then
-AC_MSG_ERROR([LLVM 3.1 or newer is required for the r600/radeonsi llvm 
compiler.])
+LLVM_REQUIRED_VERSION_MAJOR=3
+LLVM_REQUIRED_VERSION_MINOR=2
+LLVM_AVAILABLE_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
+LLVM_AVAILABLE_VERSION_MINOR=`echo $LLVM_VERSION | cut -d. -f2`
+if test $LLVM_AVAILABLE_VERSION_MAJOR -lt $LLVM_REQUIRED_VERSION_MAJOR 
-o [ $LLVM_AVAILABLE_VERSION_MAJOR -eq $LLVM_REQUIRED_VERSION_MAJOR -a 
$LLVM_AVAILABLE_VERSION_MINOR -lt $LLVM_REQUIRED_VERSION_MINOR ] ; then
+AC_MSG_ERROR([LLVM 
$LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer with AMDGPU 
target enabled is required.
+ To use the r600/radeonsi LLVM backend, you need to fetch 
the LLVM source from:
+ git://people.freedesktop.org/~tstellar/llvm master
+ and build with --enable-experimental-targets=AMDGPU])
 fi
-if test $LLVM_VERSION_MAJOR -ge 3 -a x$LLVM_VERSION != x3.1  
$LLVM_CONFIG --targets-built | grep -qv '\AMDGPU\' ; then
-AC_MSG_ERROR([To use the r600/radeonsi LLVM backend with LLVM 3.2 and 
newer, you need to fetch the LLVM source from:
+if test true  $LLVM_CONFIG --targets-built | grep -qv '\AMDGPU\' ; then
+AC_MSG_ERROR([LLVM AMDGPU Target not enabled.
+  To use the r600/radeonsi LLVM backend, you need to fetch 
the LLVM source from:
   git://people.freedesktop.org/~tstellar/llvm master
   and build with --enable-experimental-targets=AMDGPU])
 fi
+AC_MSG_WARN([Please ensure you use the latest llvm tree from 
git://people.freedesktop.org/~tstellar/llvm master before submitting a bug])
 if test x$LLVM_VERSION = x3.2; then
 LLVM_LIBS=$LLVM_LIBS `$LLVM_CONFIG --libs amdgpu`
 fi
-- 
1.7.11.7

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] configure.ac: Prevent build of radeon llvm backend with llvm 3.2

2012-11-02 Thread Tom Stellard
On Fri, Nov 02, 2012 at 03:46:20PM +0100, Vincent Lejeune wrote:
 ---

Reviewed-by: Tom Stellard thomas.stell...@amd.com
  configure.ac | 18 +-
  1 file changed, 13 insertions(+), 5 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
 index 6b97a26..45d1510 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -1748,15 +1748,23 @@ gallium_require_drm_loader() {
  }
  
  radeon_llvm_check() {
 -LLVM_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
 -if test $LLVM_VERSION_MAJOR -lt 3 -o x$LLVM_VERSION = x3.0; then
 -AC_MSG_ERROR([LLVM 3.1 or newer is required for the r600/radeonsi 
 llvm compiler.])
 +LLVM_REQUIRED_VERSION_MAJOR=3
 +LLVM_REQUIRED_VERSION_MINOR=2
 +LLVM_AVAILABLE_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
 +LLVM_AVAILABLE_VERSION_MINOR=`echo $LLVM_VERSION | cut -d. -f2`
 +if test $LLVM_AVAILABLE_VERSION_MAJOR -lt 
 $LLVM_REQUIRED_VERSION_MAJOR -o [ $LLVM_AVAILABLE_VERSION_MAJOR -eq 
 $LLVM_REQUIRED_VERSION_MAJOR -a $LLVM_AVAILABLE_VERSION_MINOR -lt 
 $LLVM_REQUIRED_VERSION_MINOR ] ; then
 +AC_MSG_ERROR([LLVM 
 $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer with 
 AMDGPU target enabled is required.
 + To use the r600/radeonsi LLVM backend, you need to 
 fetch the LLVM source from:
 + git://people.freedesktop.org/~tstellar/llvm master
 + and build with --enable-experimental-targets=AMDGPU])
  fi
 -if test $LLVM_VERSION_MAJOR -ge 3 -a x$LLVM_VERSION != x3.1  
 $LLVM_CONFIG --targets-built | grep -qv '\AMDGPU\' ; then
 -AC_MSG_ERROR([To use the r600/radeonsi LLVM backend with LLVM 3.2 
 and newer, you need to fetch the LLVM source from:
 +if test true  $LLVM_CONFIG --targets-built | grep -qv '\AMDGPU\' ; 
 then
 +AC_MSG_ERROR([LLVM AMDGPU Target not enabled.
 +  To use the r600/radeonsi LLVM backend, you need to 
 fetch the LLVM source from:
git://people.freedesktop.org/~tstellar/llvm master
and build with --enable-experimental-targets=AMDGPU])
  fi
 +AC_MSG_WARN([Please ensure you use the latest llvm tree from 
 git://people.freedesktop.org/~tstellar/llvm master before submitting a bug])
  if test x$LLVM_VERSION = x3.2; then
  LLVM_LIBS=$LLVM_LIBS `$LLVM_CONFIG --libs amdgpu`
  fi
 -- 
 1.7.11.7
 
 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] configure.ac: Prevent build of radeon llvm backend with llvm 3.2

2012-11-01 Thread Tom Stellard
Hi Vincent,

Thanks for doing this.

On Wed, Oct 31, 2012 at 09:03:49PM +0100, Vincent Lejeune wrote:
 ---
  configure.ac | 14 +-
  1 file changed, 9 insertions(+), 5 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
 index 6b97a26..b916b38 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -1748,15 +1748,19 @@ gallium_require_drm_loader() {
  }
  
  radeon_llvm_check() {
 -LLVM_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
 -if test $LLVM_VERSION_MAJOR -lt 3 -o x$LLVM_VERSION = x3.0; then
 -AC_MSG_ERROR([LLVM 3.1 or newer is required for the r600/radeonsi 
 llvm compiler.])
 +LLVM_REQUIRED_VERSION_MAJOR=3
 +LLVM_REQUIRED_VERSION_MINOR=2
 +LLVM_AVAILABLE_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
 +LLVM_AVAILABLE_VERSION_MINOR=`echo $LLVM_VERSION | cut -d. -f2`
 +if test $LLVM_AVAILABLE_VERSION_MAJOR -lt 
 $LLVM_REQUIRED_VERSION_MAJOR -o $LLVM_AVAILABLE_VERSION_MINOR -lt  
 $LLVM_REQUIRED_VERSION_MINOR; then

If the minimum required version is 3.2, then this if statement will
prevent building with 4.0.  I think it needs to be:

 +if test $LLVM_AVAILABLE_VERSION_MAJOR -lt 
$LLVM_REQUIRED_VERSION_MAJOR -o ($LLVM_AVAILABLE_VERSION_MAJOR -eq 
$LLVM_REQUIRED_VERSION_MAJOR -a ( $LLVM_AVAILABLE_VERSION_MINOR -lt  
$LLVM_REQUIRED_VERSION_MINOR )); then


 +AC_MSG_ERROR([LLVM 
 $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is 
 required for the r600/radeonsi llvm compiler.])

This error message should mention where to get the code from.

  fi
 -if test $LLVM_VERSION_MAJOR -ge 3 -a x$LLVM_VERSION != x3.1  
 $LLVM_CONFIG --targets-built | grep -qv '\AMDGPU\' ; then
 -AC_MSG_ERROR([To use the r600/radeonsi LLVM backend with LLVM 3.2 
 and newer, you need to fetch the LLVM source from:
 +if test true  $LLVM_CONFIG --targets-built | grep -qv '\AMDGPU\' ; 
 then
 +AC_MSG_ERROR([To use the r600/radeonsi LLVM backend, you need to 
 fetch the LLVM source from:
git://people.freedesktop.org/~tstellar/llvm master
and build with --enable-experimental-targets=AMDGPU])
  fi
 +AC_MSG_WARN([Please ensure you use the latest llvm tree from 
 git://people.freedesktop.org/~tstellar/llvm master before submitting a bug])

I think most people never see these warnings, but I suppose it doesn't
hurt to have.

  if test x$LLVM_VERSION = x3.2; then
  LLVM_LIBS=$LLVM_LIBS `$LLVM_CONFIG --libs amdgpu`
  fi

-Tom
 -- 
 1.7.11.7
 
 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] configure.ac: Prevent build of radeon llvm backend with llvm 3.2

2012-10-31 Thread Vincent Lejeune
---
 configure.ac | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6b97a26..b916b38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1748,15 +1748,19 @@ gallium_require_drm_loader() {
 }
 
 radeon_llvm_check() {
-LLVM_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
-if test $LLVM_VERSION_MAJOR -lt 3 -o x$LLVM_VERSION = x3.0; then
-AC_MSG_ERROR([LLVM 3.1 or newer is required for the r600/radeonsi llvm 
compiler.])
+LLVM_REQUIRED_VERSION_MAJOR=3
+LLVM_REQUIRED_VERSION_MINOR=2
+LLVM_AVAILABLE_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
+LLVM_AVAILABLE_VERSION_MINOR=`echo $LLVM_VERSION | cut -d. -f2`
+if test $LLVM_AVAILABLE_VERSION_MAJOR -lt $LLVM_REQUIRED_VERSION_MAJOR 
-o $LLVM_AVAILABLE_VERSION_MINOR -lt  $LLVM_REQUIRED_VERSION_MINOR; then
+AC_MSG_ERROR([LLVM 
$LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required 
for the r600/radeonsi llvm compiler.])
 fi
-if test $LLVM_VERSION_MAJOR -ge 3 -a x$LLVM_VERSION != x3.1  
$LLVM_CONFIG --targets-built | grep -qv '\AMDGPU\' ; then
-AC_MSG_ERROR([To use the r600/radeonsi LLVM backend with LLVM 3.2 and 
newer, you need to fetch the LLVM source from:
+if test true  $LLVM_CONFIG --targets-built | grep -qv '\AMDGPU\' ; then
+AC_MSG_ERROR([To use the r600/radeonsi LLVM backend, you need to fetch 
the LLVM source from:
   git://people.freedesktop.org/~tstellar/llvm master
   and build with --enable-experimental-targets=AMDGPU])
 fi
+AC_MSG_WARN([Please ensure you use the latest llvm tree from 
git://people.freedesktop.org/~tstellar/llvm master before submitting a bug])
 if test x$LLVM_VERSION = x3.2; then
 LLVM_LIBS=$LLVM_LIBS `$LLVM_CONFIG --libs amdgpu`
 fi
-- 
1.7.11.7

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev