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

Brian Paul brianp at vmware.com
Tue Jun 23 15:56:35 PDT 2015


On 06/23/2015 04:25 PM, Matt Turner wrote:
> 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?

Thanks for the pointer to the docs!  I forgot this was mentioned there. 
  I basically had my --host and --build mixed up.

Also, I was using "i686-linux-gnu" instead of "i686-pc-linux-gnu" (is 
there really a difference)?

Let me see how far I get now that you set me straight...

-Brian



More information about the mesa-dev mailing list