From 7c3ae02059f68bd6c87f7eb8ef556eeafef28a9f Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 31 May 2021 09:06:42 +0000 Subject: build system: ccenv: added ccenv_cc_environment (hosted/freestanding). --- sofort/ccenv/ccenv.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'sofort/ccenv/ccenv.sh') diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh index 378071f..e180d7e 100644 --- a/sofort/ccenv/ccenv.sh +++ b/sofort/ccenv/ccenv.sh @@ -767,6 +767,12 @@ ccenv_set_cc_underscore() ccenv_create_framework_executable() { + if [ "$ccenv_cfgtype" = 'host' ]; then + if [ "$mb_freestanding" = 'yes' ]; then + return 1 + fi + fi + if [ -f $ccenv_image ]; then mv $ccenv_image $ccenv_image.tmp rm -f $ccenv_image.tmp @@ -779,6 +785,7 @@ ccenv_create_framework_executable() if $ccenv_cc "$ccenv_tmpname" -o $ccenv_image 2>&3; then ccenv_ret=0 + ccenv_cc_environment='hosted' else ccenv_ret=1 fi @@ -812,7 +819,7 @@ ccenv_create_freestanding_executable() -o $ccenv_image \ 2>&3; then ccenv_ret=0 - ccenv_freestd=yes + ccenv_cc_environment='freestanding' else ccenv_ret=1 fi @@ -971,7 +978,7 @@ ccenv_set_cc_binfmt() ccenv_set_os_pe() { - if [ -n "$ccenv_freestd" ]; then + if [ "$ccenv_cc_environment" = 'freestanding' ]; then case "$ccenv_cchost" in *-midipix | *-midipix-* ) ccenv_os='midipix' ;; @@ -1451,7 +1458,6 @@ ccenv_common_init() ccenv_cfgtype=$1 ccenv_cfgfile="$mb_pwd/ccenv/$ccenv_cfgtype.mk" - ccenv_freestd= ccenv_cchost= if [ $ccenv_cfgtype = 'native' ]; then -- cgit v1.2.3