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

Re: Long-term mass bug filing for crossbuild support



On Tue, Nov 06, 2007 at 07:23:39PM +0000, Neil Williams wrote:
> On Tue, 6 Nov 2007 19:35:41 +0100
> Mike Hommey <mh@glandium.org> wrote:

> > On Tue, Nov 06, 2007 at 01:04:48PM +0000, Neil Williams wrote:

> > > The most common change is simply to retrieve the cross-building
> > > metadata from dpkg-architecture in debian/rules:
> > > http://wiki.debian.org/EmdebianGuide

> > > DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
> > > DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

> > > Depending on whether the package uses ./configure:
> > > ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
> > > CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
> > > else
> > > CROSS=
> > > endif

> > Shouldn't packages be using these --build and --host arguments already
> > even if not cross-building ?

> No. There is no need to specify --build and --host if not cross-compiling.

Er, no.  There *is* a need to specify --build when not cross-compiling, if
your upstream build rules do clever things when the architecture is
detected as "i686" instead of "i386".  This was the point in my previous
comment.

There is no need to specify --host when not cross-compiling, and specifying
it will result in autoconf believing that the compiler should be invoked as
a cross-compiler.  Sometimes this has strange side effects as well.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/



Reply to: