summaryrefslogtreecommitdiffhomepage
path: root/project/config
diff options
context:
space:
mode:
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" \