Configure - don't trust $1 to stick around, save its value away
authorRichard Levitte <levitte@openssl.org>
Thu, 10 Mar 2016 18:33:11 +0000 (19:33 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 10 Mar 2016 19:13:01 +0000 (20:13 +0100)
Reviewed-by: Stephen Henson <steve@openssl.org>
Configure

index 2b621f5ba06d9085d50c45da7a478fa66a3aabb6..9b14579f5b95bdb21a8b07b5378938b9b19b9388 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1105,9 +1105,11 @@ if ($^O ne "VMS" && !$disabled{makedepend}) {
     while ( <PIPE> ) {
         # Find the version number and save the major.
         m|(?:.*)\b(\d+)\.\d+\.\d+\b(?:.*)|;
+        my $compiler_major = $1;
         # We know that GNU C version 3 and up as well as all clang
         # versions support dependency generation
-        $config{makedepprog} = $ccpcc if /clang/ || (/gcc/ && $1 > 3);
+        $config{makedepprog} = $ccpcc
+            if /clang/ || (/gcc/ && $compiler_major > 3);
         $ecc = "clang" if /clang/;
         $ecc = "gcc" if /gcc/;
     }