diff options
Diffstat (limited to 'project')
-rw-r--r-- | project/config/cfgdefs.in | 3 | ||||
-rw-r--r-- | project/config/cfgdefs.sh | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/project/config/cfgdefs.in b/project/config/cfgdefs.in index ef94670..c2c4e6f 100644 --- a/project/config/cfgdefs.in +++ b/project/config/cfgdefs.in @@ -7,6 +7,9 @@ LIBC_MICRO = @libc_micro@ # port source directory PORT_DIR = @port_dir@ +# source tree (atomic.h vs. atomic_arch.h) +CFLAGS_CONFIG += @libc_source_tree@ + # syscall.h build/syscall_h.tag: build/@libc_syscall_arch@ diff --git a/project/config/cfgdefs.sh b/project/config/cfgdefs.sh index 3a2965e..928f46a 100644 --- a/project/config/cfgdefs.sh +++ b/project/config/cfgdefs.sh @@ -75,6 +75,12 @@ cfgdefs_set_libc_options() else libc_syscall_arch='syscall-copy.tag' fi + + if [ -f $mb_source_dir/arch/x86_64/atomic_arch.h ]; then + libc_source_tree='-D__LIBC_MODERN_SOURCE_TREE' + else + libc_source_tree='-D__LIBC_LEGACY_SOURCE_TREE' + fi } @@ -86,6 +92,7 @@ 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_source_tree@/'"$libc_source_tree"'/g' \ -e 's/@libc_syscall_arch@/'"$libc_syscall_arch"'/g' \ "$mb_project_dir/project/config/cfgdefs.in" \ | sed -e 's/[ \t]*$//g' \ |