diff options
author | midipix <writeonce@midipix.org> | 2019-01-01 01:04:21 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2019-01-01 01:07:41 -0500 |
commit | 18920bb512c1835da4e1c7f9e2d7f177f6607736 (patch) | |
tree | 9fa470d36d091a7defd3b434ae9179633c6281f8 | |
parent | cd2145f89b45d0a1511de17dbd3be9983830ed80 (diff) | |
download | sbpython2-18920bb512c1835da4e1c7f9e2d7f177f6607736.tar.bz2 sbpython2-18920bb512c1835da4e1c7f9e2d7f177f6607736.tar.xz |
build system: ccenv: refined the os detection logic.
-rw-r--r-- | sofort/ccenv/ccenv.sh | 13 |
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 |