[Mesa-dev] [PATCH 1/2] configure.ac: enable LLVM by default

Marek Olšák maraeo at gmail.com
Sat Apr 23 01:42:27 PDT 2011


On Fri, Apr 22, 2011 at 5:57 PM, Dan Nicholson <dbn.lists at gmail.com> wrote:

> On Fri, Apr 22, 2011 at 8:52 AM, Dan Nicholson <dbn.lists at gmail.com>
> wrote:
> > On Thu, Apr 21, 2011 at 4:39 AM, Marek Olšák <maraeo at gmail.com> wrote:
> >> OpenSUSE is (was?) shipping r300g with LLVM disabled. Can you believe
> it?
> >> Poor users with SWTCL chipsets... and bad reputation for us too.
> >> ---
> >>  configure.ac |    4 ++--
> >>  1 files changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/configure.ac b/configure.ac
> >> index 8989c2b..8e9f73f 100644
> >> --- a/configure.ac
> >> +++ b/configure.ac
> >> @@ -1687,10 +1687,10 @@ dnl Gallium LLVM
> >>  dnl
> >>  AC_ARG_ENABLE([gallium-llvm],
> >>     [AS_HELP_STRING([--enable-gallium-llvm],
> >> -        [build gallium LLVM support @<:@default=disabled@:>@])],
> >> +        [build gallium LLVM support @<:@default=enabled@:>@])],
> >>     [enable_gallium_llvm="$enableval"],
> >>     [enable_gallium_llvm=auto])
> >> -if test "x$enable_gallium_llvm" = xyes; then
> >> +if test "x$enable_gallium_llvm" != xno; then
> >>     if test "x$LLVM_CONFIG" != xno; then
> >>        LLVM_VERSION=`$LLVM_CONFIG --version`
> >>        LLVM_CFLAGS=`$LLVM_CONFIG --cppflags`
>
> Hit send a little too fast. This looks right, although the default is
> really "auto" and will silently continue if the user doesn't have
> LLVM. That's a little different than "enabled". It would be nice for
> the user if configure errors when LLVM_CONFIG=no and
> enable_gallium_llvm=yes.
>

The problem is "auto" is the same as "disabled" in this case.

Since r300g is built by default and it will require LLVM soon (at least on
x86(_64)), the purpose of this patch is not to always fail to configure when
no arguments are provided.

I take the first patch back. Here's an updated patch that enables LLVM on
x86 and x86_64 only:


    configure.ac: enable LLVM by default on x86 and x86_64

diff --git a/configure.ac b/configure.ac
index 77b2d55..d8c50ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1687,9 +1687,14 @@ dnl Gallium LLVM
 dnl
 AC_ARG_ENABLE([gallium-llvm],
     [AS_HELP_STRING([--enable-gallium-llvm],
-        [build gallium LLVM support @<:@default=disabled@:>@])],
+        [build gallium LLVM support @<:@default=enabled on x86/x86_64@
:>@])],
     [enable_gallium_llvm="$enableval"],
     [enable_gallium_llvm=auto])
+if test "x$enable_gallium_llvm" = xauto; then
+    case "$host_cpu" in
+    i*86|x86_64) enable_gallium_llvm=yes;;
+    esac
+fi
 if test "x$enable_gallium_llvm" = xyes; then
     if test "x$LLVM_CONFIG" != xno; then
        LLVM_VERSION=`$LLVM_CONFIG --version`


Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110423/d69445f9/attachment.htm>


More information about the mesa-dev mailing list