1
Description: Include the multiarch include directory in klcc's path
2
The multiarch include directory, /usr/include/<triplet>, needs to be
3
explicitly added to klcc's path; without this, klcc is incompatible
4
with recent Ubuntu versions of linux-libc-dev and fails to find any asm/
7
This change is safe to apply on non-multiarch-enabled systems, since
8
$(DEB_HOST_MULTIARCH) will evaluate empty. However, upstreaming should
9
probably wait until we have a way to get this path information in a
10
vendor-neutral manner.
11
Author: Steve Langasek <steve.langasek@linaro.org>
13
Index: klibc-1.5.20/klcc/Kbuild
14
===================================================================
15
--- klibc-1.5.20.orig/klcc/Kbuild
16
+++ klibc-1.5.20/klcc/Kbuild
18
$(Q)echo 'bindir=$(INSTALLDIR)/$(KCROSS)bin' >> $@
19
$(Q)echo 'libdir=$(INSTALLDIR)/$(KCROSS)lib' >> $@
20
$(Q)echo 'includedir=$(INSTALLDIR)/$(KCROSS)include' >> $@
21
+ $(Q)echo 'multiarch_path=$(DEB_HOST_MULTIARCH)' >> $@
25
Index: klibc-1.5.20/klcc/klcc.in
26
===================================================================
27
--- klibc-1.5.20.orig/klcc/klcc.in
28
+++ klibc-1.5.20/klcc/klcc.in
30
"-I${prefix}/${KCROSS}include/bits${BITSIZE}",
31
"-I${prefix}/${KCROSS}include");
33
+if ($multiarch_path ne '') {
34
+ unshift(@includes, "-I${prefix}/${KCROSS}include/${multiarch_path}");
37
# Default optimization options (for compiles without -g)