summaryrefslogtreecommitdiffhomepage
path: root/project/config
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-01-09 05:36:56 -0500
committermidipix <writeonce@midipix.org>2019-01-09 22:43:18 -0500
commit0563c2a391adf5a2243de4c7d17c9b976cffff60 (patch)
tree7f27179acc1d96677ece7caa737768a2f2314482 /project/config
parent5dfa329dc24eee15a440a9cf3725bdd78b45a3a8 (diff)
downloadmmglue-0563c2a391adf5a2243de4c7d17c9b976cffff60.tar.bz2
mmglue-0563c2a391adf5a2243de4c7d17c9b976cffff60.tar.xz
project: custom config. bootstrapping: added --no-complex support.
Diffstat (limited to 'project/config')
-rw-r--r--project/config/cfgdefs.in6
-rw-r--r--project/config/cfgdefs.sh13
2 files changed, 19 insertions, 0 deletions
diff --git a/project/config/cfgdefs.in b/project/config/cfgdefs.in
index c2c4e6f..28f9ec4 100644
--- a/project/config/cfgdefs.in
+++ b/project/config/cfgdefs.in
@@ -4,12 +4,18 @@ LIBC_MAJOR = @libc_major@
LIBC_MINOR = @libc_minor@
LIBC_MICRO = @libc_micro@
+# build mode
+LIBC_EXCL_FILES = @libc_excl_files@
+
# port source directory
PORT_DIR = @port_dir@
# source tree (atomic.h vs. atomic_arch.h)
CFLAGS_CONFIG += @libc_source_tree@
+# libgcc, libgcc_eh
+LIBC_DEPS += @libc_deps@
+
# syscall.h
build/syscall_h.tag: build/@libc_syscall_arch@
diff --git a/project/config/cfgdefs.sh b/project/config/cfgdefs.sh
index 928f46a..574577f 100644
--- a/project/config/cfgdefs.sh
+++ b/project/config/cfgdefs.sh
@@ -1,5 +1,8 @@
for arg ; do
case "$arg" in
+ --no-complex )
+ libc_no_complex=yes
+ ;;
*)
error_msg ${arg#}: "unsupported config argument."
exit 2
@@ -81,6 +84,14 @@ cfgdefs_set_libc_options()
else
libc_source_tree='-D__LIBC_LEGACY_SOURCE_TREE'
fi
+
+ if [ _${libc_no_complex:-} = _yes ]; then
+ libc_deps=
+ libc_excl_files='$(filter ./src/complex/%, $(libc_all_files))'
+ else
+ libc_deps='-lgcc -lgcc_eh'
+ libc_excl_files=
+ fi
}
@@ -92,6 +103,8 @@ cfgdefs_output_custom_defs()
-e 's/@libc_major@/'"$libc_major"'/g' \
-e 's/@libc_minor@/'"$libc_minor"'/g' \
-e 's/@libc_micro@/'"$libc_micro"'/g' \
+ -e 's/@libc_deps@/'"$libc_deps"'/g' \
+ -e 's^@libc_excl_files@^'"$libc_excl_files"'^g' \
-e 's/@libc_source_tree@/'"$libc_source_tree"'/g' \
-e 's/@libc_syscall_arch@/'"$libc_syscall_arch"'/g' \
"$mb_project_dir/project/config/cfgdefs.in" \