Description: Include the multiarch include directory in klcc's path
 The multiarch include directory, /usr/include/<triplet>, needs to be
 explicitly added to klcc's path; without this, klcc is incompatible
 with recent Ubuntu versions of linux-libc-dev and fails to find any asm/
 headers.
 .
 This change is safe to apply on non-multiarch-enabled systems, since
 $(DEB_HOST_MULTIARCH) will evaluate empty.  However, upstreaming should
 probably wait until we have a way to get this path information in a
 vendor-neutral manner.
Author: Steve Langasek <steve.langasek@linaro.org>

Index: klibc-2.0~rc2/klcc/Kbuild
===================================================================
--- klibc-2.0~rc2.orig/klcc/Kbuild	2012-02-11 18:45:42.000000000 +0000
+++ klibc-2.0~rc2/klcc/Kbuild	2012-02-11 19:04:53.000000000 +0000
@@ -26,6 +26,7 @@
 	$(Q)echo 'bindir=$(INSTALLDIR)/$(KCROSS)bin' >> $@
 	$(Q)echo 'libdir=$(INSTALLDIR)/$(KCROSS)lib' >> $@
 	$(Q)echo 'includedir=$(INSTALLDIR)/$(KCROSS)include' >> $@
+	$(Q)echo 'multiarch_path=$(DEB_HOST_MULTIARCH)' >> $@
 
 
 # Generate klcc
Index: klibc-2.0~rc2/klcc/klcc.in
===================================================================
--- klibc-2.0~rc2.orig/klcc/klcc.in	2012-02-11 18:50:21.000000000 +0000
+++ klibc-2.0~rc2/klcc/klcc.in	2012-02-11 19:04:53.000000000 +0000
@@ -7,6 +7,10 @@
 	     "-I${prefix}/${KCROSS}include/bits${BITSIZE}",
 	     "-I${prefix}/${KCROSS}include");
 
+if ($multiarch_path ne '') {
+	unshift(@includes, "-I${prefix}/${KCROSS}include/${multiarch_path}");
+}
+
 # Default optimization options (for compiles without -g)
 @optopt =  @OPTFLAGS;
 @goptopt = ('-O');
