This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 4f73de0e2968b316640760f3cc999b97b6c39605
Author: Marco Casaroli <[email protected]>
AuthorDate: Sun Sep 27 10:04:48 2026 +0200

    examples/nxflat: Build the test modules that do build.
    
    The Makefile said "Most of these do no build yet" and built three of the 
nine.
    Eight build and convert: errno, hello, longjmp, mutex, pthread, signal, 
struct
    and task.  What had kept most of them out was read-only data reached
    PC-relative, which the tree now compiles GOT-relative.
    
    BUILD_SUBDIRS was assigned but never read, so mutex, pthread and task stayed
    out even where the configuration allowed them.  The conditionals now append 
to
    SUBDIRS, which the recipes walk.
    
    longjmp is built only where CONFIG_ARCH_SETJMP_H is set.  It imports 
setjmp()
    and longjmp(), which the firmware exports only when it supplies its own
    implementation; without the guard the kernel link fails on two undefined
    references.
    
    hello++ stays out: two of its four modules convert, the third needs
    R_ARM_TARGET1 from the converter and the fourth needs an iostream.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 examples/nxflat/tests/Makefile | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/examples/nxflat/tests/Makefile b/examples/nxflat/tests/Makefile
index 0f83f5137..814eb1801 100644
--- a/examples/nxflat/tests/Makefile
+++ b/examples/nxflat/tests/Makefile
@@ -22,16 +22,24 @@
 
 include $(APPDIR)/Make.defs
 
-# Most of these do no build yet
-#SUBDIRS       = errno hello hello++ longjmp mutex pthread signal task struct
-SUBDIRS                = errno hello struct
+# hello++ is left out: two of its four modules convert, the third needs
+# R_ARM_TARGET1 from the converter and the fourth needs an iostream.
+
+SUBDIRS                = errno hello signal struct
+
+# longjmp imports setjmp() and longjmp(), which the symbol table exports only
+# where NuttX supplies them itself.
+
+ifeq ($(CONFIG_ARCH_SETJMP_H),y)
+SUBDIRS                += longjmp
+endif
 
 ifneq ($(CONFIG_DISABLE_PTHREAD),y)
-BUILD_SUBDIRS += mutex pthread
+SUBDIRS                += mutex pthread
 endif
 
 ifneq ($(CONFIG_ARCH_ADDRENV),y)
-BUILD_SUBDIRS += task
+SUBDIRS                += task
 endif
 
 NXFLAT_DIR     = $(APPDIR)/examples/nxflat

Reply via email to