summaryrefslogtreecommitdiff
path: root/sofort
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-05-31 09:06:42 +0000
committermidipix <writeonce@midipix.org>2021-05-31 09:58:18 +0000
commitbf7ba6b7e1a5658a1c38ba74df0086fa7306f1ba (patch)
treeab7430c0634012f2631d01a6454b628a8d4b4e54 /sofort
parent2b311e17dc740d08af3c4b8ed68d3fa2f99e60e5 (diff)
downloadsbpython2-bf7ba6b7e1a5658a1c38ba74df0086fa7306f1ba.tar.bz2
sbpython2-bf7ba6b7e1a5658a1c38ba74df0086fa7306f1ba.tar.xz
build system: ccenv: added ccenv_cc_environment (hosted/freestanding).
Diffstat (limited to 'sofort')
-rw-r--r--sofort/ccenv/ccenv.in1
-rw-r--r--sofort/ccenv/ccenv.sh12
-rw-r--r--sofort/ccenv/ccenv.vars1
-rw-r--r--sofort/config/config.vars1
4 files changed, 12 insertions, 3 deletions
diff --git a/sofort/ccenv/ccenv.in b/sofort/ccenv/ccenv.in
index 61f9897..4037952 100644
--- a/sofort/ccenv/ccenv.in
+++ b/sofort/ccenv/ccenv.in
@@ -28,6 +28,7 @@ CC_ARFMT = @ccenv_cc_arfmt@
CC_SOFMT = @ccenv_cc_sofmt@
CC_BINFMT = @ccenv_cc_binfmt@
CC_UNDERSCORE = @ccenv_cc_underscore@
+CC_ENVIRONMENT = @ccenv_cc_environment@
CC_ARCH_BFD = @ccenv_cc_arch_bfd@
CC_ARCH_LLVM = @ccenv_cc_arch_llvm@
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
diff --git a/sofort/ccenv/ccenv.vars b/sofort/ccenv/ccenv.vars
index 07552af..6cdd547 100644
--- a/sofort/ccenv/ccenv.vars
+++ b/sofort/ccenv/ccenv.vars
@@ -28,6 +28,7 @@ ccenv_cc_arfmt=
ccenv_cc_sofmt=
ccenv_cc_binfmt=
ccenv_cc_underscore=
+ccenv_cc_environment=
ccenv_cc_arch_bfd=
ccenv_cc_arch_llvm=
diff --git a/sofort/config/config.vars b/sofort/config/config.vars
index 903abd5..d8a5b2b 100644
--- a/sofort/config/config.vars
+++ b/sofort/config/config.vars
@@ -52,6 +52,7 @@ compiler
toolchain
zealous
sysroot
+freestanding
cross_compile
shell