diff options
| author | mysterywolf <[email protected]> | 2020-09-08 13:16:49 +0800 |
|---|---|---|
| committer | mysterywolf <[email protected]> | 2020-09-08 13:16:49 +0800 |
| commit | ff097f0467fb0041817846f2472343b7b9c098c4 (patch) | |
| tree | 4d8ba3e5cd42efc7c7fff55f6301b85d34db60be /components/libc | |
| parent | 0607ff84ab4cf9a8b6ed92ce17776bd852d9bc62 (diff) | |
增加 __GNUC__宏定义 和sconscript的平台识别以避免重复定义
Diffstat (limited to 'components/libc')
| -rw-r--r-- | components/libc/compilers/common/SConscript | 3 | ||||
| -rw-r--r-- | components/libc/compilers/minilibc/SConscript | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/components/libc/compilers/common/SConscript b/components/libc/compilers/common/SConscript index 718f05743c..a5f4a3fda6 100644 --- a/components/libc/compilers/common/SConscript +++ b/components/libc/compilers/common/SConscript @@ -16,6 +16,7 @@ else: if GetDepend('RT_USING_POSIX') == False: SrcRemove(src, ['unistd.c']) -group = DefineGroup('libc', src, depend = [''], CPPPATH = CPPPATH) +if not GetDepend('RT_USING_MINILIBC') and GetDepend('RT_USING_LIBC'): + group = DefineGroup('libc', src, depend = [''], CPPPATH = CPPPATH) Return('group') diff --git a/components/libc/compilers/minilibc/SConscript b/components/libc/compilers/minilibc/SConscript index 518d800571..dec657028f 100644 --- a/components/libc/compilers/minilibc/SConscript +++ b/components/libc/compilers/minilibc/SConscript @@ -8,7 +8,7 @@ group = [] CPPPATH = [cwd] CPPDEFINES = ['RT_USING_MINILIBC'] -if rtconfig.PLATFORM == 'gcc' and rtconfig.ARCH != 'sim' and not GetDepend('RT_USING_LIBC'): +if rtconfig.PLATFORM == 'gcc' and rtconfig.ARCH != 'sim' and not GetDepend('RT_USING_LIBC') and GetDepend('RT_USING_MINILIBC'): group = DefineGroup('libc', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) |
