nuttx/arch
Marco Casaroli 5f9edeb6e6 arch/x86_64: define the missing CONFIG_ARCH_HAVE_SYSCALL.
794c325947 ("arch/x64:Syscall support is enabled by default", 2025-05-27)
changed nine guards from CONFIG_LIB_SYSCALL to CONFIG_ARCH_HAVE_SYSCALL but
never added the Kconfig symbol.  Only ARCH_HAVE_SYSCALL_HOOKS exists in tree;
ARCH_HAVE_SYSCALL itself is defined nowhere, so it is always unset and since
that commit x86_64 has had no x86_64_syscall_entry(), no x86_64_syscall(), no
IA32_LSTAR/IA32_STAR programming and no syscall stub layer in any
configuration:

  arch/x86_64/src/common/Make.defs:37     x86_64_syscall.c not compiled
  arch/x86_64/src/common/CMakeLists.txt:41           likewise
  arch/x86_64/include/irq.h:86
  arch/x86_64/src/intel64/intel64_cpu.c:247, :386
  arch/x86_64/src/intel64/intel64_head.S:83, :351, :538
  arch/x86_64/src/intel64/intel64_saveusercontext.S:108

qemu-intel64:knsh_romfs and qemu-intel64:knsh_romfs_pci are the two
CONFIG_BUILD_KERNEL configurations in tree, and neither can have worked in
that time.  They still link -- nothing references the missing pieces, so
libstubs.a is simply never pulled in -- and then die the first time user code
executes SYSCALL.

Define the symbol with the condition the code had before that commit, which
is LIB_SYSCALL:  every protected and every kernel build needs the interface,
and a flat build is left exactly as it is today.

Impact: restores the system call interface for CONFIG_BUILD_KERNEL and
CONFIG_BUILD_PROTECTED on x86_64.  CONFIG_BUILD_FLAT is unaffected --
qemu-intel64:nsh still builds with ARCH_HAVE_SYSCALL unset.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-08-04 01:43:41 +08:00
..
arm tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
arm64 tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
avr tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
ceva tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
dummy
hc tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
mips tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
misoc tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
or1k tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
renesas tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
risc-v tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
sim tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
sparc tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
tricore tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
x86 tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
x86_64 arch/x86_64: do not demand a TSC frequency for a clock that has none. 2026-08-04 01:43:41 +08:00
xtensa tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
z16 tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
z80 style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
CMakeLists.txt
Kconfig arch/x86_64: define the missing CONFIG_ARCH_HAVE_SYSCALL. 2026-08-04 01:43:41 +08:00