diff --git a/components/libc/SConscript b/components/libc/SConscript index a7913ed7445b09a7984a745324031af515d544b3..5b30515765e21b7982a8ed0ecde9c96b1b9d95a3 100644 --- a/components/libc/SConscript +++ b/components/libc/SConscript @@ -17,7 +17,10 @@ else: if rtconfig.PLATFORM == 'gcc' and rtconfig.ARCH != 'sim': objs = objs + SConscript('minilibc/SConscript') -objs = objs + SConscript('pthreads/SConscript') -objs = objs + SConscript('libdl/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') Return('objs')