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
commitd87e4065425bd43d24c53562de95f3316767f5d4 (patch)
tree9ab14bd8112cfc3d4faba52fa5bfa0be78361dc1 /sofort/ccenv
parent542ea4dee15916641fd469573ae985dca7dea048 (diff)
downloadbcparser-d87e4065425bd43d24c53562de95f3316767f5d4.tar.bz2
bcparser-d87e4065425bd43d24c53562de95f3316767f5d4.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