nuttx/libs/libc
Liam Hickey 13ba91a33f arch/*/src/Makefile: Avoid uncessary relinking of the nuttx binary.
The goal is to only execute recipes when there is an actual change in
the prerequisites.

There are several issues which cause the nuttx binary target to be
re-made every time the top level make is run.

1. Previously the target nuttx$(EXEEXT), was used, but make resolved
this in the relative directory make -C $(ARCH_SRC), and couldn’t find
it (need an absolute path: `$(TOPDIR)/..).

2. The .tmp prerequisite for nuttx was always deleted

3. libboard's recipe had a sub-make which may or may not update that
target. This was a phony target, and was therefore always considered out
of date.

These issues were causing the nuttx recipe to be run every make, which
was hiding some missing prerequisites:

1. the .config is a prerequisite for the .tmp target
2. libapps.a (and other linklibs) are pre-requisites for nuttx

Changes:

The changes are only in the build system, and only for arm.

Track nuttx$(EXEEXT) via vpath so Make knows when it's already up to
date without an explicit path. Add $(TOPDIR)/.config as a dependency
to the linker script preprocessing so config changes trigger
re-preprocessing.

Keep the .tmp linker script on disk (clean already removes it) so
timestamp-based dependency checking works across builds. These .tmp
files need to be added to the gitignore or the CI will complain.

Use FORCE pattern for board/libboard to ensure it's always checked
but use the actual library file as the link dependency so nuttx is
only re-linked when library content changes. Add staging libs as
dependency to nuttx link rule so changed app libs trigger re-link.

Signed-off-by: Liam Hickey <williamhickey@geotab.com>
2026-05-18 09:33:58 +02:00
..
aio include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
assert lib_stackchk.c: a duplicate implementation error reported during compilation 2026-02-02 13:22:07 +08:00
audio include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
builtin libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
ctype style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
dirent cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
dlfcn include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
elf include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
errno libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
eventfd libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
fdt libs/libc/fdt/Make.defs: cannot move due to directory not empty bugfix 2024-10-09 15:42:17 +08:00
fixedmath libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
gdbstub arch/arm64: fix backtrace register access and gdbstub config guard 2026-01-16 08:55:47 -03:00
gnssutils libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
grp libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
hex2bin include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
inttypes libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
libgen libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
locale style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
lzf libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
machine arm: memcpy: add NEON paths for aligned copies 2026-05-09 09:46:43 +08:00
misc arch/*/src/Makefile: Avoid uncessary relinking of the nuttx binary. 2026-05-18 09:33:58 +02:00
net include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdb libs/netdb: Fix dns_recv_response() to dns_answer_s size 2026-05-04 12:16:50 -03:00
obstack include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
pthread include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
pwd libs/libc/unistd: add getspnam function 2024-10-16 11:15:25 +08:00
queue libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
regex libs/libc/regex: remove logically dead code in regcomp.c 2026-01-24 19:28:56 +08:00
sched include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
search libc/search: add foreach api for hcreate_data 2025-12-25 09:39:03 +08:00
semaphore pthread: move pthread_cond to userspace 2026-01-26 16:26:39 +08:00
signal sched/signal: Add support for disabling all signal functions 2026-01-18 08:24:13 -03:00
spawn include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
stdio include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
stdlib libc: Add Kconfig option to disable hex-string to float parsing 2026-01-08 02:37:21 +08:00
stream libc/syslograwstream: Use memrchr to locate the newline character 2026-01-01 17:03:50 +08:00
string libc_bsd:add missing SPDX-License 2026-02-04 03:02:04 +08:00
symtab include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
syslog drivers/syslog: Add RFC 5424 protocol support 2025-06-13 20:26:57 +08:00
termios libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
time include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
tls libc/tls: update preprocessor condition comment to match implementation 2026-01-31 02:49:10 +08:00
uio move readv/writev to the kernel 2024-10-30 17:07:54 +08:00
unistd include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
userfs include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
uuid libc: Refine the arc4random_buf implementation 2024-10-26 18:04:21 -03:00
wchar style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
wctype libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
wqueue wqueue: fix the config typo error 2026-01-14 09:24:00 +08:00
zoneinfo Makefile: Remove make depend files by make distclean 2026-02-16 16:27:57 +01:00
.gitignore libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
CMakeLists.txt libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
Kconfig libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
libc.csv sched/signal: Add support for disabling all signal functions 2026-01-18 08:24:13 -03:00
libc.h libc/machine:Add prefixes to libc functions implemented by arch 2024-10-31 18:11:16 +08:00
Makefile Makefile: Remove make depend files by make distclean 2026-02-16 16:27:57 +01:00