Alastair Reid wrote:
Tests needing a *target* machine are bad when it comes to
cross-compilation, so we should try to avoid this for GHC. OK, GHC is not
really capable of cross-compilation yet, but we shouldn't make things
worse.


This is a topic I haven't thought about much. What is the recommended way of dealing with it?

Do we cut the autoconf scripts in two and run one half on the source machine and one on the target machine?

Do we replace all those autoconf tests (ugly but accurate) with platform-based tests (simpler but brittle)? [...]

I just had a look at GCC 3.3.1's sources and the way this is handled is effectively based on the name of the target platform (which gets magically mapped to some header in gcc/config). I don't think that this brittle because things like this are hardwired into the platform ABI forever, otherwise one would lose binary compatibility. Furthermore, there seem to be some reasonable defaults for unknown or partly known target platforms (e.g. "no underscores for ELF"). Apart from that, I can't see any other solution for this problem. Doing a runtime test on the build/host platform for a feature of the target platform is simply wrong...

Cheers,
   S.



_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to