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

Re: [RFC] GNU autoconf and dpkg-architecture



On Tue, Feb 05, 2002 at 10:58:36AM +0100, Michael Piefel wrote:
> Am  4.02.02 um 22:29:58 schrieb Steve M. Robbins:
> > One thing that "configure" does differently when you specify --host=foo
> > is that it will use "foo-gcc" in preference to "gcc", and similar with
> > other build tools.  Presumably no-one has a compiler named "foo-gcc",
> > but you never know.  There could be nasty surprises in store.
> 
> I have. I regularly provide Windows versions of some tools we develop by
> cross-compiling them with mingw32. It has a whole bunch of binaries that
> look like foo-gcc.

Err, yes.  I guess I should have said " ... no-one has a compiler named
i386-pc-linux-gnu-gcc on an i386 system."  In other words, it is improbable
that someone is going to have a "foo-targeted" cross compiler on a "foo"
system.

Then again, don't discount Murphy's law.


On Tue, Feb 05, 2002 at 02:03:09PM +0100, Marcus Brinkmann wrote:
> On Mon, Feb 04, 2002 at 11:59:08PM -0200, Henrique de Moraes Holschuh wrote:
> > > I am not so sure about specifying --build and --host unconditionally, but
> > > you gave good arguments and I am not aware of a situation were it would
> > > reasonably fail.
> > 
> > And as always, the 0.1% of the packages that need to do it differently can
> > simply do so -- their maintainers should have no problems at all convincing
> > us about that, if it is indeed true.
> 
> Ok, I asked RMS, who is responsible for such things (at least whenever he
> likes to be :).

It's probably Akim Demaille that you should ask about this.


> There might be some issues with some packages if you
> specify --build although you are not actually cross compiling.
> 
> So, the recommended way is to do
> 
> $ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)
>   confflags += $(DEB_HOT_GNU_TYPE)
> else
>   confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
> endif

I think you (or RMS) have got it backwards.  If you are NOT going to
cross-compile, it is --build that you want to specify.  To cross-compile
specify both --build and --host.

Note also that all this host/build/target stuff got changed in the recent
(within a year or two) past.  It may be that you are remembering the old
semantics.  One more reason to dig through the autoconf archives or
ask Akim about it.  You wouldn't want to find out that you're giving the
wrong arguments to old configure scripts.

You know, all this is just way too fiddly.  I can imagine that a
debian/rules file gets busted by a typo.  Maybe the best thing to do
is shove it all into a helper script --- dh_configure anyone?

-S

-- 
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants



Reply to: