Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msAIP-0003eM-Ga for pgsql-general@arkaria.postgresql.org; Tue, 30 Nov 2021 21:04:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1msAIO-0001Zy-0y for pgsql-general@arkaria.postgresql.org; Tue, 30 Nov 2021 21:04:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msAIN-0001Z3-MY for pgsql-general@lists.postgresql.org; Tue, 30 Nov 2021 21:04:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msAIH-00026h-7i for pgsql-general@lists.postgresql.org; Tue, 30 Nov 2021 21:04:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1AUL42rL1633128; Tue, 30 Nov 2021 16:04:02 -0500 From: Tom Lane To: Daniel Gustafsson cc: Vincas Dargis , pgsql-general , Magnus Hagander , Michael Paquier Subject: Re: Issues cross-compiling libpq 14.x to MacOS armv8 In-reply-to: <47B78E57-3D0F-4616-BF52-C07FA76AF0A7@yesql.se> References: <0dc14a31-acaf-8cae-0df4-a87339b22bd9@gmail.com> <1628170.1638302387@sss.pgh.pa.us> <47B78E57-3D0F-4616-BF52-C07FA76AF0A7@yesql.se> Comments: In-reply-to Daniel Gustafsson message dated "Tue, 30 Nov 2021 21:53:16 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1633126.1638306242.1@sss.pgh.pa.us> Date: Tue, 30 Nov 2021 16:04:02 -0500 Message-ID: <1633127.1638306242@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Gustafsson writes: >> On 30 Nov 2021, at 20:59, Tom Lane 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