summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2016-05-09 15:35:55 +0200
committerAndy Polyakov <appro@openssl.org>2016-05-10 09:15:10 +0200
commitf58a0acb79292a9b8c615fe8522693e6458ad6f6 (patch)
tree35856307cd83d463c0054e62dee09dfa2cb0ce1c /Configure
parentc145d19771d7197cda69c38ab74e7d269322b34d (diff)
Configure: adhere to $(CROSS_COMPILE)ranlib.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure10
1 files changed, 7 insertions, 3 deletions
diff --git a/Configure b/Configure
index 43a326a7c1..62f5c3d221 100755
--- a/Configure
+++ b/Configure
@@ -909,7 +909,9 @@ $config{cross_compile_prefix} = $ENV{'CROSS_COMPILE'}
# Allow overriding the names of some tools. USE WITH CARE
$config{perl} = $ENV{'PERL'} || ($^O ne "VMS" ? $^X : "perl");
$target{cc} = $ENV{'CC'} || $target{cc} || "cc";
-$target{ranlib} = $ENV{'RANLIB'} || $target{ranlib} || which("ranlib") || "true";
+$target{ranlib} = $ENV{'RANLIB'} || $target{ranlib} ||
+ (which("$config{cross_compile_prefix}ranlib") ?
+ "\$(CROSS_COMPILE)ranlib" : "true");
$target{ar} = $ENV{'AR'} || $target{ar} || "ar";
$target{nm} = $ENV{'NM'} || $target{nm} || "nm";
@@ -1873,7 +1875,7 @@ print OUT "1;\n";
close(OUT);
-print "CC =$target{cc}\n";
+print "CC =$config{cross_compile_prefix}$target{cc}\n";
print "CFLAG =$target{cflags} $config{cflags}\n";
print "SHARED_CFLAG =$target{shared_cflag}\n";
print "DEFINES =",join(" ", @{$target{defines}}, @{$config{defines}}),"\n";
@@ -1901,7 +1903,9 @@ print "CHACHA_ENC =$target{chacha_obj}\n";
print "POLY1305_OBJ =$target{poly1305_obj}\n";
print "BLAKE2_OBJ =$target{blake2_obj}\n";
print "PROCESSOR =$config{processor}\n";
-print "RANLIB =$target{ranlib}\n";
+print "RANLIB =", $target{ranlib} eq '$(CROSS_COMPILE)ranlib' ?
+ "$config{cross_compile_prefix}ranlib" :
+ "$target{ranlib}", "\n";
print "ARFLAGS =$target{arflags}\n";
print "PERL =$config{perl}\n";
print "\n";