Fix detection of ARM architectures in c_check.
authorSébastien Villemot <sebastien@debian.org>
Wed, 29 Apr 2015 16:14:21 +0000 (18:14 +0200)
committerSébastien Villemot <sebastien@debian.org>
Wed, 29 Apr 2015 16:14:21 +0000 (18:14 +0200)
This is necessary to avoid the false detection of a cross-compiling environment.

c_check

diff --git a/c_check b/c_check
index fbe9c9f..99de070 100644 (file)
--- a/c_check
+++ b/c_check
@@ -4,6 +4,8 @@
 $hostos   = `uname -s | sed -e s/\-.*//`;    chop($hostos);
 $hostarch = `uname -m | sed -e s/i.86/x86/`;chop($hostarch);
 $hostarch = "x86_64" if ($hostarch eq "amd64");
+$hostarch = "arm" if ($hostarch =~ /^arm.*/);
+$hostarch = "arm64" if ($hostarch eq "aarch64");
 
 $binary = $ENV{"BINARY"};