On 05/04/2012 03:18 PM, Brandon Allbery wrote:
On Fri, May 4, 2012 at 10:11 AM, Vincent Hanquez <[email protected]
<mailto:[email protected]>> wrote:
For the language, i think assembly is a no-no with cabal, as such it need
to be embedded in gcc inline assembly if you want to have something that
works (unless there's a secret way to run assembler in a portable fashion
in cabal).
I don't know if cabal knows this, but assembler files with .s (and maybe .asm
on Windows?) extension are recognized by most C compilers and handed off to
the assembler; as such, simply augmenting cabal's C rules with those
extensions should be sufficient.
That might works, although you might end up with some corner case portability
issues.
Wrapping them in C should be more practical and you could write something like
this for maximum portability (compiler,systems,..):
#if system_that_works_with_inline_asm
asm inline("instr1; instr2;", ....);
#else
/* fallback to C */
#endif
--
Vincent
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe