-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On a biarch machine like Fedora llvm-config defaults to outputting the values for a 64bit build. With a recent patch to llvm-devel there are now arch specific versions of llvm-config and this patch should use them properly. With this patch I the proper llvm-config is used for 64 bit and 32bit builds. There may be a better way to do this, so this is an example that worked for me.
diff --git a/configure.ac b/configure.ac index ea58dae..e3d9d5a 100644 - - --- a/configure.ac +++ b/configure.ac @@ -1745,7 +1745,15 @@ 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]) + fi + if test "x$enable_64" = xyes; then + AC_PATH_PROG([LLVM_CONFIG], [llvm-config-64], [no]) + 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` However, when building the 32 bit version of mesa (--enable-32-bit) it seems that the CFLAGS are not properly passed to the llvmpipe Makefile. So I had to manually add in the compiler flags as follows, which is incorrect for 64bit. diff --git a/src/gallium/drivers/llvmpipe/Makefile b/src/gallium/drivers/llvmpip index f930135..047fbf6 100644 - - --- a/src/gallium/drivers/llvmpipe/Makefile +++ b/src/gallium/drivers/llvmpipe/Makefile @@ -70,7 +70,8 @@ PROGS_DEPS := ../../auxiliary/libgallium.a lp_tile_soa.c: lp_tile_soa.py ../../auxiliary/util/u_format_parse.py ../../auxi $(PYTHON2) $(PYTHON_FLAGS) lp_tile_soa.py ../../auxiliary/util/u_format. - - -LDFLAGS += $(LLVM_LDFLAGS) +CFLAGS += -m32 +LDFLAGS += -m32 $(LLVM_LDFLAGS) LIBS += -L../../auxiliary/ -lgallium libllvmpipe.a $(LLVM_LIBS) $(GL_LIB_DEPS) LD=$(CXX) So some work needs to be done to llvmpipe to properly include the CFLAGS/LDFLAGS Hope this is useful, Kevin - -- Get my public GnuPG key from http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5VGfYACgkQ6w2kMH0L1dEAIgCfatRZMboQ13CbgnpnBcCM+Hch Fs4AnifZlyMtc7l065qkbIz95hV47Au5 =94Cy -----END PGP SIGNATURE----- _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev