summaryrefslogtreecommitdiffhomepage
path: root/sofort
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-01-02 22:18:23 -0500
committermidipix <writeonce@midipix.org>2019-01-02 22:21:10 -0500
commit3b58c797aab399877064597cf1fa2c8953a4f4b3 (patch)
treefd55f4bb75d4998ed114702902a50424d94a6979 /sofort
parentd3070f6e65dc3b94024f608232dea33d9e1b31c6 (diff)
downloaddalist-3b58c797aab399877064597cf1fa2c8953a4f4b3.tar.bz2
dalist-3b58c797aab399877064597cf1fa2c8953a4f4b3.tar.xz
build system: moved handling of pe-specific variables to ccenv.
Diffstat (limited to 'sofort')
-rw-r--r--sofort/ccenv/ccenv.sh30
-rw-r--r--sofort/ccenv/ccenv.vars4
-rw-r--r--sofort/ccenv/pedefs.in4
-rw-r--r--sofort/config/config.vars4
4 files changed, 39 insertions, 3 deletions
diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh
index d6876c7..83b5daa 100644
--- a/sofort/ccenv/ccenv.sh
+++ b/sofort/ccenv/ccenv.sh
@@ -903,11 +903,30 @@ ccenv_set_os_dso_patterns()
esac
}
+ccenv_set_os_pe_switches()
+{
+ if [ "$ccenv_os" = 'PE' ] && [ -z "$ccenv_pe_subsystem" ]; then
+ case "$ccenv_os" in
+ midipix | mingw )
+ ccenv_pe_subsystem='windows'
+ ;;
+ * )
+ ccenv_pe_subsystem='console'
+ ;;
+ esac
+ fi
+}
+
ccenv_output_defs()
{
ccenv_in="$mb_project_dir/sofort/ccenv/ccenv.in"
ccenv_mk="$mb_pwd/ccenv/$ccenv_cfgtype.mk"
+ if [ "$ccenv_cc_binfmt" = 'PE' ]; then
+ ccenv_pe="$mb_project_dir/sofort/ccenv/pedefs.in"
+ ccenv_in="$ccenv_in $ccenv_pe"
+ fi
+
if [ $ccenv_cfgtype = 'native' ]; then
ccenv_tmp=$(mktemp)
@@ -919,7 +938,7 @@ ccenv_output_defs()
-e 's/NATIVE_#/#/g' \
-e 's/ =/=/g' \
-e 's/ +=/+=/g' \
- "$ccenv_in" > "$ccenv_tmp"
+ $ccenv_in > "$ccenv_tmp"
ccenv_in="$ccenv_tmp"
fi
@@ -935,7 +954,7 @@ ccenv_output_defs()
"$__var" "'/g' "; \
done)"
- eval sed $ccenv_sed_substs "$ccenv_in" \
+ eval sed $ccenv_sed_substs $ccenv_in \
| sed -e 's/[ \t]*$//g' \
> "$ccenv_mk"
@@ -1015,12 +1034,18 @@ ccenv_common_init()
ccenv_cc="$mb_user_cc"
ccenv_cpp="$mb_user_cpp"
ccenv_cxx="$mb_user_cxx"
+
+ ccenv_pe_subsystem="$mb_pe_subsystem"
+ ccenv_pe_image_base="$mb_pe_image_base"
else
ccenv_tflags=
ccenv_cflags="$mb_native_cflags"
ccenv_cc="$mb_native_cc"
ccenv_cpp="$mb_native_cpp"
ccenv_cxx="$mb_native_cxx"
+
+ ccenv_pe_subsystem="$mb_native_pe_subsystem"
+ ccenv_pe_image_base="$mb_native_pe_image_base"
fi
}
@@ -1048,6 +1073,7 @@ ccenv_set_toolchain_variables()
ccenv_set_os_dso_exrules
ccenv_set_os_dso_linkage
ccenv_set_os_dso_patterns
+ ccenv_set_os_pe_switches
ccenv_output_defs
ccenv_clean_up
diff --git a/sofort/ccenv/ccenv.vars b/sofort/ccenv/ccenv.vars
index 1d68357..4775b37 100644
--- a/sofort/ccenv/ccenv.vars
+++ b/sofort/ccenv/ccenv.vars
@@ -80,3 +80,7 @@ ccenv_windrc=
# cflags
ccenv_cflags_os=
ccenv_cflags_pic=
+
+# pe
+ccenv_pe_subsystem=
+ccenv_pe_image_base=
diff --git a/sofort/ccenv/pedefs.in b/sofort/ccenv/pedefs.in
new file mode 100644
index 0000000..300d990
--- /dev/null
+++ b/sofort/ccenv/pedefs.in
@@ -0,0 +1,4 @@
+# @ccenv_cfgtype@ pe switches
+PE_SUBSYSTEM = @ccenv_pe_subsystem@
+PE_IMAGE_BASE = @ccenv_pe_image_base@
+
diff --git a/sofort/config/config.vars b/sofort/config/config.vars
index 5cbc0e0..80d8535 100644
--- a/sofort/config/config.vars
+++ b/sofort/config/config.vars
@@ -92,7 +92,6 @@ user_cxx
pe_subsystem
pe_image_base
-pe_config_defs
native_cc
native_cpp
@@ -103,6 +102,9 @@ native_cfghost
native_cflags
native_ldflags
+native_pe_subsystem
+native_pe_image_base
+
all_shared
all_static
disable_frontend