~ubuntu-branches/ubuntu/oneiric/klibc/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/multiarch-include-path

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-04-14 12:17:13 UTC
  • Revision ID: james.westby@ubuntu.com-20110414121713-x997po2k4oiq7jl9
Tags: 1.5.20-1ubuntu6
debian/patches/multiarch-include-path: Include the multiarch include
directory in klcc's path.  This fixes a build failure with rootskel
against the current linux-libc-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-1.5.20/klcc/Kbuild
 
14
===================================================================
 
15
--- klibc-1.5.20.orig/klcc/Kbuild
 
16
+++ klibc-1.5.20/klcc/Kbuild
 
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-1.5.20/klcc/klcc.in
 
26
===================================================================
 
27
--- klibc-1.5.20.orig/klcc/klcc.in
 
28
+++ klibc-1.5.20/klcc/klcc.in
 
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');