[Mesa-dev] [Mesa-stable] [PATCH] configure.ac: detect LLVM patch level when built via cmake

Emil Velikov emil.l.velikov at gmail.com
Fri Sep 5 12:48:17 PDT 2014


On 05/09/14 16:43, Jonathan Gray wrote:
> In LLVM 3.4.1 and 3.4.2 the patch level was only set in config.h when
> LLVM was built via autoconf and not when it was built with cmake.
> Fall back to retrieving the patch level from llvm-config --version to
> handle this case.
> 
Hi Jonathan,

Can you please file this with the LLVM people ? Would be nice to have it fixed
at the source, rather than patching every project that uses llvm.

IIRC their cmake build tends to fall behind the autotools one occasionally -
there was a "funny" bug with rtti for quite a while. Reports like this one
will help them notice/fix the issue :)

Thanks
Emil

> Cc: "10.2 10.3" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
> ---
>  configure.ac | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 99ae6ba..98cd938 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1705,6 +1705,15 @@ if test "x$enable_gallium_llvm" = xyes; then
>              [#include "${LLVM_INCLUDEDIR}/llvm/Config/config.h"],
>              LLVM_VERSION_PATCH=0) dnl Default if LLVM_VERSION_PATCH not found
>  
> +        dnl In LLVM 3.4.1 and 3.4.2 the patch level was only set in config.h
> +        dnl for autoconf builds and not cmake builds
> +        if test "$LLVM_VERSION_PATCH" -eq 0; then
> +            LLVM_VERSION_PATCH=`echo $LLVM_VERSION | cut -d. -f3`
> +            if test -z "$LLVM_VERSION_PATCH"; then
> +                LLVM_VERSION_PATCH=0
> +            fi
> +        fi
> +
>          if test -n "${LLVM_VERSION_MAJOR}"; then
>              LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
>          else
> 



More information about the mesa-dev mailing list