Re: $host_cpu -> $target_cpu in configure?

From: Noah Misch <noah(at)leadboat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: $host_cpu -> $target_cpu in configure?
Date: 2019-06-16 20:33:54
Message-ID: 20190616203354.GA420587@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 16, 2019 at 12:56:52PM -0400, Tom Lane wrote:
> There are a few places in configure and the makefiles that are looking
> at $host_cpu to decide what to do. As far as I can tell, almost all of
> them are wrong and should be looking at $target_cpu instead. (The
> lack of complaints indicates that nobody is trying very hard to test
> cross-compilation.)

https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Specifying-Target-Triplets.html
describes the intended usage. When cross-compiling, $host_cpu is the machine
able to run the resulting PostgreSQL installation, and $build_cpu is the
machine creating that installation. PostgreSQL does not contain a compiler
that emits code as output to the user, so $target_cpu is meaningless. Every
use of $host_cpu looks correct.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-06-16 20:36:06 Re: $host_cpu -> $target_cpu in configure?
Previous Message Stephen Frost 2019-06-16 19:57:46 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)