summaryrefslogtreecommitdiff
path: root/sofort/ccenv
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-01-01 01:04:21 -0500
committermidipix <writeonce@midipix.org>2019-01-01 01:07:39 -0500
commitfa286ef29e1e63c3fd39ef93b9964ab7f70d0299 (patch)
tree1bb91a9c146f4bb4aa8fd149945bace2da4db900 /sofort/ccenv
parent11d31dab269e9756a2e57614c5781906d4f551e3 (diff)
downloadbfirm-fa286ef29e1e63c3fd39ef93b9964ab7f70d0299.tar.bz2
bfirm-fa286ef29e1e63c3fd39ef93b9964ab7f70d0299.tar.xz
build system: ccenv: refined the os detection logic.
Diffstat (limited to 'sofort/ccenv')
-rw-r--r--sofort/ccenv/ccenv.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh
index 31b7dd5..c786f90 100644
--- a/sofort/ccenv/ccenv.sh
+++ b/sofort/ccenv/ccenv.sh
@@ -700,14 +700,19 @@ ccenv_set_os()
case "$ccenv_cchost" in
*-*-*-* )
- ccenv_tip=${ccenv_host%-*}
+ ccenv_tip=${ccenv_cchost%-*}
ccenv_os=${ccenv_tip#*-*-}
;;
-
- *-*-* )
- ccenv_tip=${ccenv_host%-*}
+ *-*-musl | *-*-gnu )
+ ccenv_tip=${ccenv_cchost%-*}
ccenv_os=${ccenv_tip#*-}
;;
+ *-*-* )
+ ccenv_os=${ccenv_cchost#*-*-}
+ ;;
+ *-* )
+ ccenv_os=${ccenv_cchost#*-}
+ ;;
esac
if [ -z "$ccenv_os" ]; then