CONFIG_LIB_SYSCALL is also useful in FLAT build in some special case because calling kernel function through syscall can avoid to patch the relocation table(like ROMFS+NXFLAT).
> -----Original Message----- > From: Gregory Nutt <spudan...@gmail.com> > Sent: Sunday, May 31, 2020 12:07 AM > To: dev@nuttx.apache.org > Subject: Re: Duplicate task_spawn() > > > > Any static should be conditioned on CONFIG_LIB_SYSCALL for the > > task_spawn() version in sched/task/task_spawn.c, however, that is not > > really necessary either because that version is not linked into the > > same binary as is the version in libs/libc/spawn. > > > > I suppose a user could enable CONFIG_LIB_SYSCALL in a FLAT build. Then > > both would be linked into the same blob, but that is kind of a useless > > configuration. > > > So, I think the preferred fix would simply to make CONFIG_LIB_SYSCALL > dependent on !CONFIG_BUILD_FLAT in the Kconfig file. >