[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Toolchain data



On 2007-03-13 20:24 +0000, Neil Williams wrote:
> On Tue, 13 Mar 2007 14:50:54 +0100
> "Hector Oron" <hector.oron@gmail.com> wrote:
> 
> > Wookey,
> >
> >   About armel toolchain, I fail to build binutils... (applying
> > Nikita's and Lennert's armel patches)
> 
> I've also failed to build an emchain for armel, so far - but progress
> is being made. I'm using current CVS for dpkg-cross, built with
> cvs-buildpackage; current SVN for apt-cross, built using
> svn-buildpackage and current SVN for emdebian-tools. I get a failure in
> dpkg-buildpackage because the appropriate dpkg-cross binutils for armel
> is not found - instead of the dependency being, say,
> binutils-arm-linux-gnu, the gcc debian/control file (auto generated
> within the build from dpkg-cross data) tries to specify a dependency on
> binutils- (note the terminal dash indicating that a cross dependency
> was required but the expected variable was empty).

Hmm. I had that once too. I failed to appreciate the significance. 

You don't mention dpkg and dpkg-dev above. You definately need both of
those, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=414087


> dpkg-architecture -tarmel-linux-gnu  -qDEB_HOST_GNU_TYPE
> dpkg-architecture: warning: Default GNU system type arm-linux-gnu for
> Debian arch arm does not match specified GNU system type
> armel-linux-gnu dpkg-architecture: warning: Specified GNU system type
> armel-linux-gnu does not match gcc system type x86_64-linux-gnu.
> armel-linux-gnu

armel-linux-gnu is not a valid gnu type. The gnu type is
arm-linux-gnueabi, the debian type (DEB_HOST_ARCH) is armel (which is shorthand for
armel-linux-gnu I suppose).

> I'm now trying again with the intention to set
> DEB_HOST_GNU_TYPE=armel-linux-gnu within emchain so that I can build an
> armel toolchain. If that works, 

It shouldn't - it's wrong.

> I'll sort out some form of support for
> passing environment variables to the emchain script for this kind of
> eventuality. (gcc takes note of DEB_TARGET_GNU_TYPE if it is set within
> the build environment).
> 
> Is there another way? Can dpkg-cross provide a new Debian architecture
> or does that change have to be made within dpkg itself?

dpkg-cross can have new arches (see discussion of win32-i586 with mr
grabasch). But I think gcc needs dpkg-architecture to give the right
answers, so I don;t know what happens if only dpkg-cross knows about
the new arch. 'badness' I would expect.

> It looks like libc6, linux-kernel-headers and libdb1-compat will need
> to be built for armel before dpkg-cross can install them as
> dependencies on the build host (amd64/powerpc). My iBook still has
> problems with the computational load of building gcc. My amd64 doesn't
> even flinch.
> 
> So far, I can build gcc manually for armel with the environment
> addition above. The best emchain can hope to do in this situation is
> probably to document how to "help the script along".
> 
> The current build command is:
> DEB_HOST_GNU_TYPE=armel-linux-gnu GCC_TARGET=armel \
> DEB_CROSS_INDEPENDENT=yes dpkg-buildpackage -rfakeroot -etc.

And that works? hmm.

> Question: Is it acceptable to add the -linux-gnu suffix to the
> user-specified 'armel', i.e. reinforce the assumption that we are using
> a linux kernel and a gnu environment? dpkg-cross currently has a long
> standing bug report about it being too linux-specific. I'm thinking
> that if emchain only does this for "new" architectures (defined as
> architectures unknown to Debian but known to dpkg-cross) and with
> appropriate warnings in the manpage and program output that this is the
> assumption being used, it should be OK. (This discussion should
> probably move to the debian-embedded list.)

Debian arch nmaes often have an implicit -linux-gnu. dpkg-cross can
copy this when there is only one part of a triplet provided, but in
general I think Guillem is right and we should try to avoid any
discrepancy between dpkg and dpkg-cross. 

> > checking whether vsnprintf is declared... yes
> > *** BFD does not support target armel-unknown-none.
> > *** Look in bfd/config.bfd for supported targets.
> > make[2]: *** [configure-bfd] Error 1
> > make[2]: Leaving directory
> > `/home/zumbi/build-mine/buildcross/branch/armel-man/binutils-2.17-3/builddir-armel'
> > make[1]: *** [all] Error 2
> > make[1]: Leaving directory
> > `/home/zumbi/build-mine/buildcross/branch/armel-man/binutils-2.17-3/builddir-armel'
> > make: *** [build-armel-stamp] Error 2
> >
> >   Do you know why is that ? Do i need upgraded tools ?

I think it's because you are confusing debian arch names and gnu arch
names, although I think BFD is yet another namespace (things like
elf32-littlearm) (see objdump -i, arm-linux-gnu-objdump -i, etc)

> emchain has been able to build binutils-armel-linux-gnu - 

I think it should be  binutils-arm-linux-gnueabi

> but only by
> using dpkg-cross CVS, apt-cross SVN and emdebian-tools SVN.
> 
> If I can work out how to support new toolchains, like armel, I will
> document it in the manpage and then release emdebian-tools and
> apt-cross. If the armel toolchain builds OK, I'll also probably release
> dpkg-cross with Wookey's patch.
> 
> > Versions
> > Debian `dpkg' package management program version 1.13.25 (i386).
> > dpkg-cross version 1.29 (but it really is 1.35)
> 
> CVS is 1.36 and includes Wookey's patches for armel support.

Ah, OK you do have the dpkg patch.

Wookey
-- 
Principal hats:  Balloonz - Toby Churchill - Aleph One - Debian
http://wookware.org/

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



Reply to: