From 7fd6d6ce0e8f02b02c3f7a3571d7d6090212b297 Mon Sep 17 00:00:00 2001 From: midipix Date: Jan 01 2019 06:07:40 +0000 Subject: build system: ccenv: refined the os detection logic. --- 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