Fixed cross-suffix detection for path that contains dashes when the compiler itself doesn't
This commit is contained in:
parent
6f43310de5
commit
20b0ed1da5
16
c_check
16
c_check
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
# Checking cross compile
|
# Checking cross compile
|
||||||
$hostos = `uname -s | sed -e s/\-.*//`; chop($hostos);
|
$hostos = `uname -s | sed -e s/\-.*//`; chop($hostos);
|
||||||
$hostarch = `uname -m | sed -e s/i.86/x86/`;chop($hostarch);
|
$hostarch = `uname -m | sed -e s/i.86/x86/`;chop($hostarch);
|
||||||
|
@ -26,14 +28,12 @@ if ($?) {
|
||||||
|
|
||||||
$cross_suffix = "";
|
$cross_suffix = "";
|
||||||
|
|
||||||
if ($ARGV[0] =~ /(.*)(-[.\d]+)/) {
|
if (dirname($compiler_name) ne ".") {
|
||||||
if ($1 =~ /(.*-)(.*)/) {
|
$cross_suffix .= dirname($compiler_name) . "/";
|
||||||
$cross_suffix = $1;
|
}
|
||||||
}
|
|
||||||
} else {
|
if (basename($compiler_name) =~ /(.*-)(.*)/) {
|
||||||
if ($ARGV[0] =~ /([^\/]*-)([^\/]*$)/) {
|
$cross_suffix .= $1;
|
||||||
$cross_suffix = $1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$compiler = "";
|
$compiler = "";
|
||||||
|
|
Loading…
Reference in New Issue