Steve Langasek
2011-Apr-14 20:47 UTC
[klibc] Bug#622814: klibc: patch to make klcc play nice with multiarch linux-libc-dev
Package: klibc Version: 1.5.20-1 Severity: normal Tags: patch User: ubuntu-devel at lists.ubuntu.com Usertags: origin-ubuntu natty ubuntu-patch Hi maks, Since the Ubuntu linux-libc-dev is now installing its asm headers to the multiarch /usr/include/<triplet>/ directory to allow co-installability, I've pushed the attached patch to Ubuntu so klcc knows to include this path when searching for headers. It should be safe to apply in Debian today, in advance of linux-libc-dev switching to multiarch, so I'm forwarding it for your consideration. (And it sounds like Ben is keen to switch l-l-d over soon anyway: http://lists.debian.org/debian-kernel/2011/04/msg00338.html) Note that when linux-libc-dev is switched to multiarch, another patch will also be needed to fix a build failure in klibc. Thanks, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slangasek at ubuntu.com vorlon at debian.org -------------- next part -------------- A non-text attachment was scrubbed... Name: tmpSxoL8E Type: text/x-diff Size: 2159 bytes Desc: not available URL: <http://www.zytor.com/pipermail/klibc/attachments/20110414/efa2233f/attachment.bin>
maximilian attems
2011-May-10 09:56 UTC
[klibc] Bug#622814: klibc: patch to make klcc play nice with multiarch linux-libc-dev
Hello vorlon, thank you for your patch. On Thu, 14 Apr 2011, Steve Langasek wrote:> Hi maks, > > Since the Ubuntu linux-libc-dev is now installing its asm headers to the > multiarch /usr/include/<triplet>/ directory to allow co-installability, I've > pushed the attached patch to Ubuntu so klcc knows to include this path when > searching for headers. It should be safe to apply in Debian today, in > advance of linux-libc-dev switching to multiarch, so I'm forwarding it for > your consideration. (And it sounds like Ben is keen to switch l-l-d over > soon anyway: http://lists.debian.org/debian-kernel/2011/04/msg00338.html) > > Note that when linux-libc-dev is switched to multiarch, another patch will > also be needed to fix a build failure in klibc.hmm, currently I was wondering if your patch is meant for Debian only or upstream? how generic is that DEB_HOST_MULTIARCH thingy? (sorry only watching multilib from distance until now)> diff -Nru klibc-1.5.20/debian/patches/multiarch-include-path klibc-1.5.20/debian/patches/multiarch-include-path > --- klibc-1.5.20/debian/patches/multiarch-include-path 1969-12-31 16:00:00.000000000 -0800 > +++ klibc-1.5.20/debian/patches/multiarch-include-path 2011-04-14 11:47:46.000000000 -0700 > @@ -0,0 +1,39 @@ > +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 at linaro.org> > + > +Index: klibc-1.5.20/klcc/Kbuild > +==================================================================> +--- klibc-1.5.20.orig/klcc/Kbuild > ++++ klibc-1.5.20/klcc/Kbuild > +@@ -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-1.5.20/klcc/klcc.in > +==================================================================> +--- klibc-1.5.20.orig/klcc/klcc.in > ++++ klibc-1.5.20/klcc/klcc.in > +@@ -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'); > diff -Nru klibc-1.5.20/debian/patches/series klibc-1.5.20/debian/patches/series > --- klibc-1.5.20/debian/patches/series 2011-04-11 02:14:17.000000000 -0700 > +++ klibc-1.5.20/debian/patches/series 2011-04-14 11:34:33.000000000 -0700 > @@ -5,3 +5,4 @@ > ppc64-crt0 > arm-thumb2 > arm-size-directives > +multiarch-include-pathcheers -- maks