[klibc] [klibc:master] Fix errlist.c generation in out-of-tree build

klibc-bot for Ben Hutchings ben at decadent.org.uk
Thu Jan 24 18:57:03 PST 2019


Commit-ID:  81b7c464c5db568edf894bacfc9bee2cec837367
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=81b7c464c5db568edf894bacfc9bee2cec837367
Author:     Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Fri, 25 Jan 2019 00:40:19 +0000
Committer:  Ben Hutchings <ben at decadent.org.uk>
CommitDate: Fri, 25 Jan 2019 02:37:55 +0000

[klibc] Fix errlist.c generation in out-of-tree build

Kbuild expands every -I in the compiler options so that in an
out-of-tree build both the source directory and corresponding
object directory are on the include path.

We currently pass $(KLIBCCPPFLAGS) to makeerrlist.pl, which is not
expanded, so in an out-of-tree buld it only looks in the object
directories and does not find linux/errno.h.  Use the flags macro to
expand $(KLIBCCPPFLAGS).

Signed-off-by: Ben Hutchings <ben at decadent.org.uk>

---
 usr/klibc/Kbuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index 9efbb4e..526442d 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -107,7 +107,8 @@ SOLIBHASH = $(shell cat $(SOLIB).hash)
 # Readable errormessages extracted from src..
 targets += errlist.c
 quiet_cmd_errlist = GEN     $@
-      cmd_errlist = $(PERL) $< $(KLIBCCPPFLAGS) -errlist > $@ || rm -f $@
+      cmd_errlist = $(PERL) $< $(call flags,KLIBCCPPFLAGS) -errlist > $@ \
+                    || rm -f $@
 
 $(obj)/errlist.c: $(srctree)/$(src)/makeerrlist.pl
 	$(call cmd,errlist)


More information about the klibc mailing list