diff options
author | Viktor Szakats <vszakats@users.noreply.github.com> | 2021-08-27 12:22:15 +0000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-11-15 11:11:18 +0100 |
commit | bbd254d598c63a10364c5dc49f73129336541d48 (patch) | |
tree | b336ea2f4a2ae6410c30e0f34b6c05d2036428ab /Configure | |
parent | 15b83e04a5e125ab873ace1e474790a4a5b44647 (diff) |
Configure: do not check for an absolute prefix in cross-builds
The check is always made according to the host platform's rules, which may
not be true for true when the target platform is different, e.g. when
cross-building for Windows on a Linux machine. So skip this check when
used together with the `--cross-compile-prefix=` option.
Fixes https://github.com/openssl/openssl/issues/9520
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22723)
(cherry picked from commit 4ea752997df83c2a694fdb157aab07908303fc90)
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -933,8 +933,6 @@ while (@argvcopy) if (/^--prefix=(.*)$/) { $config{prefix}=$1; - die "Directory given with --prefix MUST be absolute\n" - unless file_name_is_absolute($config{prefix}); } elsif (/^--api=(.*)$/) { @@ -1377,6 +1375,11 @@ foreach (keys %useradd) { # At this point, we can forget everything about %user and %useradd, # because it's now all been merged into the corresponding $config entry +if ($config{prefix} && !$config{CROSS_COMPILE}) { + die "Directory given with --prefix MUST be absolute\n" + unless file_name_is_absolute($config{prefix}); +} + if (grep { $_ =~ /(?:^|\s)-static(?:\s|$)/ } @{$config{LDFLAGS}}) { disable('static', 'pic', 'threads'); } |