summaryrefslogtreecommitdiffhomepage
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:40 -0500
commit54622d7ac43fafa1bc8304e59913a91bbe5abee0 (patch)
treeb9abd6b066174191403d4356df8f355f724443f3
parent6afb060ab8ae38f40262d4e408ef626b29d30058 (diff)
downloadmdso-54622d7ac43fafa1bc8304e59913a91bbe5abee0.tar.bz2
mdso-54622d7ac43fafa1bc8304e59913a91bbe5abee0.tar.xz
build system: ccenv: refined the os detection logic.
-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