[Mesa-dev] [PATCH 1/2] configure: error out when building radeonsi without gallium-llvm

Tom Stellard tom at stellard.net
Mon Feb 10 08:03:06 PST 2014


On Sat, Feb 08, 2014 at 03:52:29PM +0000, Emil Velikov wrote:
> --enable-gallium-llvm is required by radeonsi. Currently we
> check only for LLVM_VERSION_INT which is 0, whenever gallium-llvm
> is disabled explicitly.
> 
> ./configure --with-gallium-drivers=r600,radeonsi --disable-gallium-llvm
>

I think this flag was originally intended to enable/disable llvmpipe,
but I can see the value in having a flag that guarantees you won't
pick up an unwanted LLVM dependencies.


 
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>  configure.ac | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 8bf9b94..56d5c8e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1731,10 +1731,13 @@ gallium_require_drm_loader() {
>  }
>  
>  radeon_llvm_check() {
> +    if test "x$enable_gallium_llvm" != "xyes"; then
> +        AC_MSG_ERROR([--enable_gallium_llvm is required when building $1])
> +    fi

Did you mean to use underscores '_' in the configure option?  Shouldn't it be:
--enable-gallium-llvm


-Tom
>      LLVM_REQUIRED_VERSION_MAJOR="3"
>      LLVM_REQUIRED_VERSION_MINOR="3"
>      if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
> -        AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required for r600g and radeonsi.])
> +        AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required for $1])
>      fi
>      if test true && $LLVM_CONFIG --targets-built | grep -qvw 'R600' ; then
>          AC_MSG_ERROR([LLVM R600 Target not enabled.  You can enable it when building the LLVM
> @@ -1744,7 +1747,7 @@ radeon_llvm_check() {
>      LLVM_COMPONENTS="${LLVM_COMPONENTS} r600 bitreader ipo"
>      NEED_RADEON_LLVM=yes
>      AC_CHECK_LIB([elf], [elf_memory], [ELF_LIB=-lelf],
> -                                 [AC_MSG_ERROR([radeonsi and r600g require libelf when using LLVM])])
> +                                 [AC_MSG_ERROR([$1 requires libelf when using LLVM])])
>  }
>  
>  dnl Gallium drivers
> @@ -1797,7 +1800,7 @@ if test "x$with_gallium_drivers" != x; then
>              gallium_require_drm_loader
>              GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
>              if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then
> -                radeon_llvm_check
> +                radeon_llvm_check "r600g"
>                  LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
>              fi
>              if test "x$enable_r600_llvm" = xyes; then
> @@ -1814,7 +1817,7 @@ if test "x$with_gallium_drivers" != x; then
>              PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
>              gallium_require_drm_loader
>              GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS radeonsi"
> -            radeon_llvm_check
> +            radeon_llvm_check "radeonsi"
>              gallium_check_st "radeon/drm" "radeonsi/dri" "" "" "radeonsi/vdpau" "radeonsi/omx"
>              DRICOMMON_NEED_LIBDRM=yes
>              ;;
> -- 
> 1.8.5.2
> 
> _______________________________________________
> 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