[Mesa-dev] [PATCH] configure: use $target_cpu, not $host_cpu when setting asm_arch

Matt Turner mattst88 at gmail.com
Tue Jun 23 15:25:25 PDT 2015


On Tue, Jun 23, 2015 at 3:04 PM, Brian Paul <brianp at vmware.com> wrote:
> Otherwise, if we're trying to build a 32-bit Mesa on a 64-bit host
> we wind up with -DUSE_X86_64_ASM, which is incorrect.
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index ddc757e..b12f5f9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -605,7 +605,7 @@ if test "x$enable_asm" = xyes -a "x$cross_compiling" = xyes; then
>  fi
>  # check for supported arches
>  if test "x$enable_asm" = xyes; then
> -    case "$host_cpu" in
> +    case "$target_cpu" in
>      i?86)
>          case "$host_os" in
>          linux* | *freebsd* | dragonfly* | *netbsd* | openbsd* | gnu*)
> --
> 1.9.1

According to [1], host is "the machine that you are building for" and
target is "the machine that GCC will produce code for". In the context
of building GCC, I think this means that the resulting GCC binaries
will run on $host and will produce code for $target. In the context of
Mesa, I can't come up with a way that host != target makes sense.

docs/autoconf.html suggests using --build=x86_64-pc-linux-gnu
--host=i686-pc-linux-gnu to build on x86_64 for i686. Is that what
you're doing?

[1] https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html


More information about the mesa-dev mailing list