Re: Issues cross-compiling libpq 14.x to MacOS armv8

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Vincas Dargis <vindrg(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Issues cross-compiling libpq 14.x to MacOS armv8
Date: 2021-11-30 21:04:02
Message-ID: 1633127.1638306242@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
>> On 30 Nov 2021, at 20:59, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> AFAICS this is the only test in our configure script that is a hard
>> fail when cross-compiling, and I don't see a reason for it to be that.
>> We could just assume that /dev/urandom will be available --- that's no
>> worse than a lot of the other optimistic assumptions that configure
>> makes in that mode.

> Agreed, I don't see a problem with that. I'm not terribly familiar with
> supporting cross compilation in autoconf, would a reasonable approach be to
> just remove the check altogether like the below sketch?

It seems like a useful test when *not* cross compiling, which is most
of the time. I'd just wrap that bit in

if test "$cross_compiling" = no; then
...
fi

(I'm a bit surprised that the AC_CHECK_FILE macro doesn't provide
an action-if-cross-compiling option, but it apparently doesn't.)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-11-30 21:33:14 Re: Issues cross-compiling libpq 14.x to MacOS armv8
Previous Message Daniel Gustafsson 2021-11-30 20:53:16 Re: Issues cross-compiling libpq 14.x to MacOS armv8