summaryrefslogtreecommitdiff
path: root/components/libc
diff options
context:
space:
mode:
authorbernard <[email protected]>2017-06-15 14:38:39 +0800
committerbernard <[email protected]>2017-06-15 14:38:39 +0800
commitb47994cb4201e158bc745bf260a47ae2dd1c497a (patch)
tree15c17a8d06e538df8a3328a09dede882835b8260 /components/libc
parent6515dc238c38ebf8084d0304b97dce2a644f7b1b (diff)
Add more checking for SConscript files of libc.
Diffstat (limited to 'components/libc')
-rw-r--r--components/libc/SConscript11
1 files changed, 6 insertions, 5 deletions
diff --git a/components/libc/SConscript b/components/libc/SConscript
index 5b30515765..aa86bdee86 100644
--- a/components/libc/SConscript
+++ b/components/libc/SConscript
@@ -5,21 +5,22 @@ Import('rtconfig')
from building import *
objs = []
+cwd = GetCurrentDir()
if GetDepend('RT_USING_LIBC'):
- if rtconfig.PLATFORM == 'gcc':
+ if os.path.isfile(os.path.join(cwd, 'newlib/SConscript')) and rtconfig.PLATFORM == 'gcc':
objs = objs + SConscript('newlib/SConscript')
- elif rtconfig.PLATFORM == 'armcc':
+ elif os.path.isfile(os.path.join(cwd, 'armlibc/SConscript')) and rtconfig.PLATFORM == 'armcc':
objs = objs + SConscript('armlibc/SConscript')
- elif rtconfig.PLATFORM == 'iar':
+ elif os.path.isfile(os.path.join(cwd, 'dlib/SConscript')) and rtconfig.PLATFORM == 'iar':
objs = objs + SConscript('dlib/SConscript')
else:
- if rtconfig.PLATFORM == 'gcc' and rtconfig.ARCH != 'sim':
+ if os.path.isfile(os.path.join(cwd, 'minilibc/SConscript')) and rtconfig.PLATFORM == 'gcc' and rtconfig.ARCH != 'sim':
objs = objs + SConscript('minilibc/SConscript')
if GetDepend('RT_USING_LIBC') and GetDepend('RT_USING_PTHREADS'):
objs = objs + SConscript('pthreads/SConscript')
-
+
if GetDepend('RT_USING_MODULE') and GetDepend('RT_USING_LIBDL'):
objs = objs + SConscript('libdl/SConscript')