mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-17 07:12:06 +08:00
Squashed commit of the following:
Author: anchao <anchao@pinecone.net> apps/, most main() function: Correct CONFIG_BUILD_LOADABLE usage Loadable apps/: Correct loadable symbol table generate apps/system/ubloxmodem: Fix build break apps/examples/ostest: start restart/waitpid/user test from main loop apps/nshlib: Expand reboot and poweroff commands to include a second, optional mode argument Author: Gregory Nutt <gnutt@nuttx.org> An attempt to fix build issues. Does not work. apps/examples/ostest: Fix some inappropriate renaming of static functions introduced with recent patches. apps/builtin/exec_builtin.c: Fix a error introduced by recent comments. Found in build testing. Author: anchao <anchao@pinecone.net> apps/builtin/exec_builtin.c: Try posix_spawn if builtin apps do not have have an entry point. apps/Application.mk: introduce MODULE config to simplify tristate(m) apps/nsh: Change the nuttx shell module type to tristate apps: Add loadable application support script/mksymtab: Generate symbol table name by default apps/builtin: Allow loadable applications can register with apps/builtin.
This commit is contained in:
@@ -128,7 +128,7 @@ config EXAMPLES_MODULE_NOSTRIP
|
||||
config EXAMPLES_MODULE_LIBC
|
||||
bool "Link with LIBC"
|
||||
default n
|
||||
depends on !BUILD_KERNEL && EXPERIMENTAL
|
||||
depends on !BUILD_LOADABLE && EXPERIMENTAL
|
||||
---help---
|
||||
Link with the C library (and also math library if it was built).
|
||||
By default, all undefined symbols must be provided via a symbol
|
||||
@@ -147,6 +147,6 @@ config EXAMPLES_MODULE_LIBC
|
||||
config EXAMPLES_MODULE_LIBGCC
|
||||
bool "Link with LIBGCC"
|
||||
default n
|
||||
depends on !BUILD_KERNEL && EXPERIMENTAL
|
||||
depends on !BUILD_LOADABLE && EXPERIMENTAL
|
||||
|
||||
endif
|
||||
|
@@ -64,7 +64,7 @@ MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
|
||||
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
||||
OBJS = $(AOBJS) $(COBJS)
|
||||
|
||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
||||
ifneq ($(CONFIG_BUILD_LOADABLE),y)
|
||||
OBJS += $(MAINOBJ)
|
||||
endif
|
||||
|
||||
@@ -116,7 +116,7 @@ really_build: $(OBJS)
|
||||
@$(MAKE) -C drivers TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)
|
||||
@$(MAKE) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" really_build
|
||||
|
||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
||||
ifeq ($(CONFIG_BUILD_LOADABLE),y)
|
||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
||||
@echo "LD: $(PROGNAME)"
|
||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ)
|
||||
@@ -131,7 +131,7 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
||||
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
|
||||
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(if $(CONFIG_BUILD_LOADABLE),,$(APPNAME)_main))
|
||||
|
||||
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
|
||||
else
|
||||
|
@@ -147,7 +147,7 @@ extern const int g_mod_nexports;
|
||||
* Name: module_main
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
#ifdef BUILD_MODULE
|
||||
int main(int argc, FAR char *argv[])
|
||||
#else
|
||||
int module_main(int argc, char *argv[])
|
||||
|
Reference in New Issue
Block a user