Akim Demaille wrote:
>
> >>>>> "Ralf" == Ralf Corsepius <[EMAIL PROTECTED]> writes:
>
> Ralf> Hmm, I think we might be talking past each other:
>
> Ralf> All I am trying to say is: This check checks for a tool which is
> Ralf> not applicable/illegal to use for cross compilation (/lib/cpp is
> Ralf> a native build-host tool). As a side-effect of this it will
> Ralf> silently pick up a wrong tool instead of complaining/aborting if
> Ralf> $CC -E fails.
>
> Aaah! Thanks, indeed, I completely missed your point!
>
> What would you suggest? Fail when lib/cpp is chosen but
> cross_compiling?
I think excluding /lib/cpp from the list to check for CPP for cross
compiliation would be a feasable way.
> Look for $target dependent tools?
Are you thinking about something in analogy to AC_CHECK_TOOL
($target-cpp or similar?). At least the gnu toolchain does not have
such a beast, but it might be worth checking for in the cross
compilation case.
BTW: Why isn't 'cpp' on this list?
> In fact, I guess that cross-compilers are good compilers, so it is
> surprising that they are rejected with -E.
Well, for cross-compilation it's not unusual to have other flags
added to CC (eg. multilib flags), to use compiler wrapper-scripts or
to use strange compilers with weird non-standard options.
Consequently, specifying something invalid via CC can cause CC -E to
break.
> Do you think our test is bad?
>
> I'm really lost. What is the best thing you think we should do?
For the moment I'd say excluding /lib/cpp from the check if host !=
build is sufficient.
Ralf
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
(FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:[EMAIL PROTECTED] FAX: +49/731/501-999
http://www.faw.uni-ulm.de