Обсуждение: $host_cpu -> $target_cpu in configure?

Поиск
Список
Период
Сортировка

$host_cpu -> $target_cpu in configure?

От
Tom Lane
Дата:
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.)

I'm not too sure about this case in makefiles/Makefile.hpux:

ifeq ($(host_cpu), ia64)
   DLSUFFIX = .so
else
   DLSUFFIX = .sl
endif

Does HPUX even support cross-compiling, and if so what shlib extension
do you get in that case?

The other references seem definitely wrong ...

            regards, tom lane



Re: $host_cpu -> $target_cpu in configure?

От
Noah Misch
Дата:
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.



Re: $host_cpu -> $target_cpu in configure?

От
Tom Lane
Дата:
Noah Misch <noah@leadboat.com> writes:
> 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.

Hmph ... okay, but that's sure a confusing usage of "host".

            regards, tom lane