lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] odd/multiarch adf0725 04/10: Validate $LMI_COMPILER


From: Greg Chicares
Subject: [lmi-commits] [lmi] odd/multiarch adf0725 04/10: Validate $LMI_COMPILER as well as $LMI_TRIPLET
Date: Wed, 15 May 2019 17:59:55 -0400 (EDT)

branch: odd/multiarch
commit adf072500fa4f5bda7ce8c81df8ae8ad6f75ee4d
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Validate $LMI_COMPILER as well as $LMI_TRIPLET
---
 set_arch.sh | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/set_arch.sh b/set_arch.sh
index c51cd44..95d4c18 100755
--- a/set_arch.sh
+++ b/set_arch.sh
@@ -137,16 +137,29 @@ case "$lmi_build_type" in
 esac
 }
 
-# test compiler similarly
+case "$LMI_COMPILER" in
+    (gcc) ;;
+    (*)
+        # This script is to be sourced, so it can't use a builtin
+        # command like 'print' here. Similarly, 'exit' would have
+        # a surprising effect.
+        echo "Changed nothing because compiler is untested."
+        return 2;
+        ;;
+esac
+
 case "$LMI_TRIPLET" in
-    (i686-w64-mingw32)   foo ;;
-    (x86_64-w64-mingw32) foo ;;
+    (i686-w64-mingw32)   ;;
+    (x86_64-w64-mingw32) ;;
     (*)
         # This script is to be sourced, so it can't use a builtin
         # command like 'print' here. Similarly, 'exit' would have
         # a surprising effect.
-        echo "Untested host triplet. Expect surprises."
+        echo "Changed nothing because host triplet is untested."
+        return 3;
         ;;
 esac
 
+foo
+
 unset -f foo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]