From 54101ea3ab3a4d9826f00cbaed2caeda8a0c16e7 Mon Sep 17 00:00:00 2001 From: Daniel Hams Date: Thu, 31 Oct 2019 16:39:45 +0000 Subject: [PATCH] Ensure only gcc release can be used to build gcc and mipspro for the other one too --- DidbsUtils.pm | 6 ++++-- bootstrap.pl | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/DidbsUtils.pm b/DidbsUtils.pm index 371463e..3dde70b 100644 --- a/DidbsUtils.pm +++ b/DidbsUtils.pm @@ -70,6 +70,7 @@ sub compatibledidbscurrent { my $retVal=1; my $verbose=shift; + my $didbscompiler=shift; my $version=shift; my($scriptMajVer,$scriptGenVer,$scriptMinVer) = $version =~ m/(\d)\.(\d)\.(\d)(.*)/; @@ -88,8 +89,9 @@ sub compatibledidbscurrent my($dirMajVer,$dirGenVer,$dirMinVer,$dirRest) = $dirBehindLink =~ m/(\d)_(\d)_(\d)[^_]*(_.+)/; $verbose && didbsprint "Matched $dirMajVer $dirGenVer $dirMinVer $dirRest\n"; - if( rindex($dirRest,"_n32_mips3_") == 0 ) { - $verbose && didbsprint "Elf width, ISA OK\n"; + my $expectedWidthIsaCompiler = "_n32_mips3_" . $didbscompiler; + if( rindex($dirRest,$expectedWidthIsaCompiler) == 0 ) { + $verbose && didbsprint "Elf width, ISA, Compiler OK\n"; # Version check min is 0.1.7 (starting from 0.1.7) # due to the need for a particular didbs perl version. # max is current script minus one diff --git a/bootstrap.pl b/bootstrap.pl index 7f3e58e..c2ecebc 100755 --- a/bootstrap.pl +++ b/bootstrap.pl @@ -266,12 +266,12 @@ sub writeconfig usage(true); } -my $compatibleDidbsCurrent = compatibledidbscurrent($verbose,$version); +my $compatibleDidbsCurrent = compatibledidbscurrent($verbose,$didbscompiler,$version); if( !$compatibleDidbsCurrent ) { print <