Configure: added special osname checks for nto and android
authorBrian Fraser <fraserbn@gmail.com>
Fri, 11 Oct 2013 19:55:08 +0000 (16:55 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Sun, 26 Jan 2014 17:44:22 +0000 (14:44 -0300)
When cross-compiling, for android, anything matching *linux-android*
gets osname=linux-androideabi.  This is to allow compiling to
all three android variants (x86, arm, mips).
For QNX Neutrino, anything matching nto*|*-nto-* gets osname=nto. In
the future, that might change to 'qnx', but right now we don't want
it to pick up the hints file.
For anything else, keep the current behavior, which is to set osname
to the output of `echo $targetarch|sed 's,^[^-]*-,,'`

Configure

index 71fa2d2..7fc99b5 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -3541,7 +3541,19 @@ EOM
         case "$targetarch" in
         '') ;;
         *)  hostarch=$osname
-            osname=`echo $targetarch|sed 's,^[^-]*-,,'`
+            case "$targetarch" in
+                nto*|*-nto-*)
+                    osname=nto
+                    ;;
+                *linux-android*)
+                    # Catch arm-linux-androideabi, mipsel-linux-android,
+                    # and i686-linux-android
+                    osname=linux-android
+                    ;;
+                *)
+                    osname=`echo $targetarch|sed 's,^[^-]*-,,'`
+                ;;
+            esac
             osvers=''
             ;;
         esac