[PATCH] fix out-of-tree build with UCLIBC_HAS_CONTEXT_FUNCS

Max Filippov <[email protected]> Wed, 24 Apr 2024 04:36:23 -0700
Newsgroups gmane.comp.lib.uclibc.general
Message-ID <[email protected]>
When building libc out-of-tree *context functions cannot find generated
header ucontext_i.h:

  libc/sysdeps/linux/xtensa/setcontext.S:19:10:
    fatal error: ucontext_i.h: No such file or directory

Fix that by adding include path to the build directory with that file to
the compiler flags.

Signed-off-by: Max Filippov <[email protected]>
---
 Rules.mak | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Rules.mak b/Rules.mak
index f2e5791e3d89..27c80f924505 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -606,6 +606,7 @@ CFLAGS := $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \
 	-nostdinc -I$(top_builddir)include \
 	-I$(top_srcdir)include -include libc-symbols.h \
 	-I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
+	-I$(top_builddir)libc/sysdeps/linux/$(TARGET_ARCH) \
 	-I$(top_srcdir)libc/sysdeps/linux \
 	-I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
 	-I$(top_srcdir)ldso/include -I.
-- 
2.39.2