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/ |
---|
5 | headers. |
---|
6 | . |
---|
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> |
---|
12 | |
---|
13 | Index: klibc-2.0~rc2/klcc/Kbuild |
---|
14 | =================================================================== |
---|
15 | --- klibc-2.0~rc2.orig/klcc/Kbuild 2012-02-11 18:45:42.000000000 +0000 |
---|
16 | +++ klibc-2.0~rc2/klcc/Kbuild 2012-02-11 19:04:53.000000000 +0000 |
---|
17 | @@ -26,6 +26,7 @@ |
---|
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)' >> $@ |
---|
22 | |
---|
23 | |
---|
24 | # Generate klcc |
---|
25 | Index: klibc-2.0~rc2/klcc/klcc.in |
---|
26 | =================================================================== |
---|
27 | --- klibc-2.0~rc2.orig/klcc/klcc.in 2012-02-11 18:50:21.000000000 +0000 |
---|
28 | +++ klibc-2.0~rc2/klcc/klcc.in 2012-02-11 19:04:53.000000000 +0000 |
---|
29 | @@ -7,6 +7,10 @@ |
---|
30 | "-I${prefix}/${KCROSS}include/bits${BITSIZE}", |
---|
31 | "-I${prefix}/${KCROSS}include"); |
---|
32 | |
---|
33 | +if ($multiarch_path ne '') { |
---|
34 | + unshift(@includes, "-I${prefix}/${KCROSS}include/${multiarch_path}"); |
---|
35 | +} |
---|
36 | + |
---|
37 | # Default optimization options (for compiles without -g) |
---|
38 | @optopt = @OPTFLAGS; |
---|
39 | @goptopt = ('-O'); |
---|