<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:klemensbaum@gmail.com" title="Klemens Baum <klemensbaum@gmail.com>"> <span class="fn">Klemens Baum</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - More robust way of detecting LLVM major and minor versions"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=66029">bug 66029</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #81187 is patch</td>
           <td>
                
           </td>
           <td>1
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - More robust way of detecting LLVM major and minor versions"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=66029#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - More robust way of detecting LLVM major and minor versions"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=66029">bug 66029</a>
              from <span class="vcard"><a class="email" href="mailto:klemensbaum@gmail.com" title="Klemens Baum <klemensbaum@gmail.com>"> <span class="fn">Klemens Baum</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=81187" name="attach_81187" title="Use the new version defines if available">attachment 81187</a> <a href="attachment.cgi?id=81187&action=edit" title="Use the new version defines if available">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=66029&attachment=81187'>[review]</a>
Use the new version defines if available

<span class="quote">>diff --git a/configure.ac b/configure.ac
>index 6832b0d..3cabfe8 100644
>--- a/configure.ac
>+++ b/configure.ac
>@@ -1577,8 +1577,26 @@ if test "x$enable_gallium_llvm" = xyes; then
>     fi</span >
>
<span class="quote">>     if test "x$LLVM_CONFIG" != xno; then
>-   LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
>-   LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'`
>+        LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
>+        LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
>+        LLVM_BINDIR=`$LLVM_CONFIG --bindir`
>+        LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
>+        LLVM_CFLAGS=$LLVM_CPPFLAGS   # CPPFLAGS seem to be sufficient
>+        LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
>+        LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
>+        LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
>+
>+        AC_COMPUTE_INT([LLVM_VERSION_MAJOR], [LLVM_VERSION_MAJOR],
>+            [#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
>+        AC_COMPUTE_INT([LLVM_VERSION_MINOR], [LLVM_VERSION_MINOR],
>+            [#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
>+
>+        if test "x${LLVM_VERSION_MAJOR}" != x; then
>+            LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
>+        else
>+            LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'`
>+        fi
>+
>         LLVM_COMPONENTS="engine bitwriter"
>         if $LLVM_CONFIG --components | grep -q '\<mcjit\>'; then
>             LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
>@@ -1591,17 +1609,10 @@ if test "x$enable_gallium_llvm" = xyes; then
>                 LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader"
>             fi
>         fi
>-   LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
>-   LLVM_BINDIR=`$LLVM_CONFIG --bindir`
>-   LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
>-   LLVM_CFLAGS=$LLVM_CPPFLAGS   # CPPFLAGS seem to be sufficient
>-   LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
>-   LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
>-   LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
>-   DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT"
>-   MESA_LLVM=1
>-
>-   dnl Check for Clang interanl headers
>+        DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT"
>+        MESA_LLVM=1
>+
>+        dnl Check for Clang internal headers
>         if test "x$enable_opencl" = xyes; then
>             if test "x$CLANG_LIBDIR" = x; then
>                 CLANG_LIBDIR=${LLVM_LIBDIR}
>@@ -1611,8 +1622,8 @@ if test "x$enable_gallium_llvm" = xyes; then
>                 AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.]))
>         fi
>     else
>-   MESA_LLVM=0
>-   LLVM_VERSION_INT=0
>+        MESA_LLVM=0
>+        LLVM_VERSION_INT=0
>     fi
> else
>     MESA_LLVM=0</span ></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>