diff --git a/repos/libports/lib/mk/spec/arm/libc-gen.mk b/repos/libports/lib/mk/spec/arm/libc-gen.mk index 780beae1f8..41b7ca6e27 100644 --- a/repos/libports/lib/mk/spec/arm/libc-gen.mk +++ b/repos/libports/lib/mk/spec/arm/libc-gen.mk @@ -9,7 +9,14 @@ FILTER_OUT_C += _set_tp.c fabs.c frexp.c modf.c SRC_S += $(filter-out $(FILTER_OUT_S),$(notdir $(wildcard $(LIBC_GEN_ARM_DIR)/*.S))) SRC_C += $(filter-out $(FILTER_OUT_C),$(notdir $(wildcard $(LIBC_GEN_ARM_DIR)/*.c))) -# fix missing include prefix for 'ucontext.h', should be 'sys/ucontext.h' -CC_OPT_makecontext = -I$(call select_from_ports,libc)/include/libc/sys +# +# Fix missing include prefix for 'ucontext.h', should be 'sys/ucontext.h' +# +# The first path is in effect when using the regular build system. The second +# path is in effect when building the libc from a source archive (where the +# ucontext.h header is taken from the libc API archive). +# +CC_OPT_makecontext = -I$(call select_from_ports,libc)/include/libc/sys \ + $(addprefix -I,$(call select_from_repositories,/include/libc/sys)) vpath % $(LIBC_GEN_ARM_DIR)