automake-patches
[Top][All Lists]
Advanced

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

Re: [FYI] {maint} testsuite: be more cross-compile friendly


From: Stefano Lattarini
Subject: Re: [FYI] {maint} testsuite: be more cross-compile friendly
Date: Sun, 15 May 2011 16:32:16 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Sunday 15 May 2011, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Sun, May 15, 2011 at 03:48:43PM CEST:
> > I've applied the attached patch to 'maint', rather than to 'testsuite-work',
> > only to make it easier to (potentially) backport tests for future bugfixing.
> > I plan to check in fixes tests that don't currently work in cross-compile
> > mode only in the 'testsuite-work' branch, to avoid excessive churn on
> > 'maint' and 'master'.
> 
> > Subject: [PATCH] testsuite: be more cross-compile friendly
> > 
> > * tests/defs.in (cross_compiling): New subroutine.
> > (am__tool_prefix): New internal variable.
> > (gcc, g++, gcj): Force the use of the correct "tool prefix"
> > when cross compiling.
> > (gfortran, g77, non-cross): New requirements.
> 
> > --- a/tests/defs.in
> > +++ b/tests/defs.in
> > @@ -148,6 +148,23 @@ fail_ () { warn_ "$me: failed test: $@"; Exit 1; }
> >  skip_ () { warn_ "$me: skipped test: $@"; Exit 77; }
> >  framework_failure_ () { warn_ "$me: set-up failure: $@"; Exit 99; }
> >  
> > +# cross_compiling
> > +# ---------------
> > +# Tell whether we are cross-compiling.  This is especially useful to skip
> > +# tests (or portions of them) that requires a native compiler.
> > +cross_compiling ()
> > +{
> > +  test x"$host_alias" != x
> > +}
> 
> FWIW, this condition isn't the same as the one configure uses in order
> to determine whether cross compilation is enabled or not.  Is that an
> oversight or on purpose?
>
Oversight, sorry (it's basically the first time I'm doing cross-compilation,
if that's any excuse).  What condition should I use instead?

I will do the fix in a follow-up patch.

> In the latter case, it would be prudent to mention this in the comment.
>
> Thanks,
> Ralf
> 

Thanks, and sorry for the noise,
  Stefano



reply via email to

[Prev in Thread] Current Thread [Next in Thread]