Fix klibc Debian specific build trouble
authorBen Hutchings <ben@decadent.org.uk>
Sun, 14 Mar 2010 18:41:56 +0000 (18:41 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 6 Jan 2019 19:33:01 +0000 (19:33 +0000)
Simply remove the headers_install invocation and rely on linux-libc-dev.

With these changes:

(the extra chmod was needed to allow for umask > 022) I could compile,
link and run this program:

#include <unistd.h>

int main(void)
{
write(1, "Hello world\n", 12);
return 0;
}

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[ added multi arch support ]
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: maximilian attems <max@stro.at>
[ fixed cross building ]
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Gbp-Pq: Name klibc-linux-libc-dev

scripts/Kbuild.install

index 78c30aae0edd6b3eac118fd480fe47d5de4d7a0d..93c0396ce69fb25f86625528be3d9158c62de99d 100644 (file)
@@ -95,7 +95,12 @@ header:
        $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
        $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
        $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
-       $(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install
+       $(Q)for x in /usr/include/linux /usr/include/asm*; do \
+               ln -s $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \
+       done
+       $(Q)if [ -n "$(DEB_HOST_MULTIARCH)" ]; then \
+               ln -sf /usr/include/$(DEB_HOST_MULTIARCH)/asm $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \
+       fi
        $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
        $(Q)chmod -R a+rX $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
        $(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1