diff options
author | midipix <writeonce@midipix.org> | 2019-01-07 09:56:59 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2019-01-09 22:43:16 -0500 |
commit | 15ddf00cde1aacb7593c0bd4cf7b9c32ee321064 (patch) | |
tree | 73f040c05931669ce3ab2e3782817747c6afe686 /project | |
parent | fb33f19fdd71812fb5cc1071aec2c6273d56b8e0 (diff) | |
download | mmglue-15ddf00cde1aacb7593c0bd4cf7b9c32ee321064.tar.bz2 mmglue-15ddf00cde1aacb7593c0bd4cf7b9c32ee321064.tar.xz |
mmglue: modern source-tree support: added atomic_arch.h.
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' \ |