From 8b44f7c12be0ab80696ed65002f8f150e9d2d3f1 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 1 Jan 2019 01:04:21 -0500 Subject: build system: ccenv: refined the os detection logic. --- sofort/ccenv/ccenv.sh | 13 +++++++++---- 1 file 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 -- cgit v1.2.3