diff options
Diffstat (limited to 'project/config')
-rw-r--r-- | project/config/cfgdefs.in | 3 | ||||
-rw-r--r-- | project/config/cfgdefs.sh | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/project/config/cfgdefs.in b/project/config/cfgdefs.in index d8b3bb5..95db393 100644 --- a/project/config/cfgdefs.in +++ b/project/config/cfgdefs.in @@ -23,6 +23,9 @@ CFLAGS_CONFIG += @libc_source_tree@ # libgcc, libgcc_eh LIBC_DEPS += @libc_deps@ +# mallocng */ +MALLOC_SUBDIR = @malloc_subdir@ + # syscall.h build/syscall_h.tag: build/@libc_syscall_arch@ diff --git a/project/config/cfgdefs.sh b/project/config/cfgdefs.sh index 994ef54..a9cb7c4 100644 --- a/project/config/cfgdefs.sh +++ b/project/config/cfgdefs.sh @@ -126,6 +126,16 @@ cfgdefs_set_libc_cflags() } +cfgdefs_set_malloc_options() +{ + if [ -d $mb_source_dir/src/malloc/mallocng ]; then + malloc_subdir='src/malloc/mallocng' + else + malloc_subdir='src/malloc/oldmalloc' + fi +} + + cfgdefs_output_custom_defs() { sed \ @@ -140,6 +150,7 @@ cfgdefs_output_custom_defs() -e 's/@libc_syscall_arch@/'"$libc_syscall_arch"'/g' \ -e 's/@libc_td_tid_addr@/'"$libc_td_tid_addr"'/g' \ -e 's!@alltypes_sed@!'"$alltypes_sed"'!g' \ + -e 's!@malloc_subdir@!'"$malloc_subdir"'!g' \ "$mb_project_dir/project/config/cfgdefs.in" \ | sed -e 's/[ \t]*$//g' \ >> "$mb_pwd/cfgdefs.mk" @@ -158,6 +169,9 @@ cfgdefs_set_libc_options # libc (variant-specific) cflags cfgdefs_set_libc_cflags +# malloc implementation variant +cfgdefs_set_malloc_options + # cfgdefs.in --> cfgdefs.mk cfgdefs_output_custom_defs |