-fvia-C for libHSbase, etc.?

I'm building GHC on NetBSD-amd64, and among other things
need to deal with the problem described in #2305 - native
code misses the __RENAME (__asm) directive in NetBSD include
files, and ends up linking to the wrong externals. The
author of #2305 reports that -fvia-C avoids this problem, so
I built the ghc 5/31 distribution I've been working on, with
GhcLibHcOpts=-O -Rghc-timing -fgenerics -fvia-C
(i.e., add -fvia-C compile option for library build.)
Does that seem like a reasonable solution? It does seem to
work, but I'm wondering if there are issues we can expect
with performance etc.?
thanks,
--
Donn Cave

Donn Cave wrote:
I'm building GHC on NetBSD-amd64, and among other things need to deal with the problem described in #2305 - native code misses the __RENAME (__asm) directive in NetBSD include files, and ends up linking to the wrong externals. The author of #2305 reports that -fvia-C avoids this problem, so I built the ghc 5/31 distribution I've been working on, with
GhcLibHcOpts=-O -Rghc-timing -fgenerics -fvia-C
(i.e., add -fvia-C compile option for library build.)
Does that seem like a reasonable solution? It does seem to work, but I'm wondering if there are issues we can expect with performance etc.?
The right fix is to add a C wrapper for the offending function (see my other message, and reply to #2305). Cheers, Simon
participants (2)
-
Donn Cave
-
Simon Marlow