diff --git a/bin/mklib b/bin/mklib index 56e0b36..e0808be 100755 --- a/bin/mklib +++ b/bin/mklib @@ -239,7 +239,7 @@ do ;; -*) echo "mklib: Unknown option: " $1 ; - exit 1 + shift 1 ;; *) # This should be the first object file, stop parsing diff --git a/configure.ac b/configure.ac index 316c715..1fdc398 100644 --- a/configure.ac +++ b/configure.ac @@ -1762,14 +1762,25 @@ if test "x$enable_gallium_llvm" = xauto; then esac fi if test "x$enable_gallium_llvm" = xyes; then - AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) + if test "x$enable_32bit" = xyes; then + AC_PATH_PROG([LLVM_CONFIG], [llvm-config-32], [no]) + LLVM_LDFLAGS_ADD="-m32" + fi + if test "x$enable_64" = xyes; then + AC_PATH_PROG([LLVM_CONFIG], [llvm-config-64], [no]) + LLVM_LDFLAGS_ADD="-m64" + fi + if test "x$LLVM_CONFIG" = x; then + AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) + fi if test "x$LLVM_CONFIG" != xno; then LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'` - LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g'` + LLVM_CFLAGS=`$LLVM_CONFIG --cxxflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g'` LLVM_LIBS="`$LLVM_CONFIG --libs engine bitwriter`" LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags` + LLVM_LDFLAGS="$LLVM_LDFLAGS $LLVM_LDFLAGS_ADD" DEFINES="$DEFINES -D__STDC_CONSTANT_MACROS" MESA_LLVM=1 else