Skip to content

Commit b637101

Browse files
committed
Cope with cross-compiling when checking for a random-number source.
Commit 16f96c7 neglected to consider the possibility of cross-compiling, causing cross-compiles to fail at the configure stage unless you'd selected --with-openssl. Since we're now more or less assuming that /dev/urandom is available everywhere, it seems reasonable to assume that the cross-compile target has it too, rather than failing. Per complaint from Vincas Dargis. Back-patch to v14 where this came in. Discussion: https://postgr.es/m/0dc14a31-acaf-8cae-0df4-a87339b22bd9@gmail.com
1 parent 4bdfe68 commit b637101

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

configure

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10474,7 +10474,7 @@ $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
1047410474

1047510475
fi
1047610476

10477-
if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
10477+
if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
1047810478
if test -z "$ZIC"; then
1047910479
for ac_prog in zic
1048010480
do
@@ -18679,6 +18679,9 @@ $as_echo "OpenSSL" >&6; }
1867918679
elif test x"$PORTNAME" = x"win32" ; then
1868018680
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
1868118681
$as_echo "Windows native" >&6; }
18682+
elif test x"$cross_compiling" = x"yes"; then
18683+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18684+
$as_echo "assuming /dev/urandom" >&6; }
1868218685
else
1868318686
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
1868418687
$as_echo "/dev/urandom" >&6; }

configure.ac

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ if test "$with_python" = yes; then
11321132
PGAC_CHECK_PYTHON_EMBED_SETUP
11331133
fi
11341134

1135-
if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
1135+
if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
11361136
PGAC_PATH_PROGS(ZIC, zic)
11371137
if test -z "$ZIC"; then
11381138
AC_MSG_ERROR([
@@ -2287,6 +2287,8 @@ if test x"$with_ssl" = x"openssl" ; then
22872287
AC_MSG_RESULT([OpenSSL])
22882288
elif test x"$PORTNAME" = x"win32" ; then
22892289
AC_MSG_RESULT([Windows native])
2290+
elif test x"$cross_compiling" = x"yes"; then
2291+
AC_MSG_RESULT([assuming /dev/urandom])
22902292
else
22912293
AC_MSG_RESULT([/dev/urandom])
22922294
AC_CHECK_FILE([/dev/urandom], [], [])

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy