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: Ralf Wildenhues
Subject: Re: [FYI] {maint} testsuite: be more cross-compile friendly
Date: Sun, 15 May 2011 16:15:02 +0200

* 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?  In the latter case, it would be prudent to
mention this in the comment.

Thanks,
Ralf



reply via email to

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