RE: cvs commit: fptools/hslibs/win32 Makefile.ghc finalizers.h mkGCDep fptools/hslibs/win32/gc-src StdDIS.gc

"Simon Marlow" <[email protected]> Mon, 26 Aug 2002 10:42:51 +0100
Newsgroups gmane.comp.lang.haskell.cvs.hslibs
Message-ID <9584A4A864BD8548932F2F88EB30D1C6060D1FB1@TVP-MSG-01.europe.corp.microsoft.com>
> > It's not supposed to happen, but it's usually harmless if it does.
> > How exactly did you make this happen?  Should I just go and try to
> > build the latest win32, or do you have a smaller test case?
> 
> The only case I have is win32 which is greencard/ffi code and a little
> supporting C code.  Just from the names of the symbols (i.e., I didn't
> look in detail), I think the symbols come from a header file
> %#included into the file.

Oh, do you use 'static inline' by any chance?  That causes gcc to drop a
copy of the inline function into the generated asm, which confuses the
mangler.  I'd recommend using 'extern inline' instead, and generating a
single copy of the inline functions elsewhere.  We do this with some CPP
trickery; see libraries/base/include/HsBase.h and
libraries/base/cbits/PrelIOUtils.c.  (the latter is named for historical
reasons, it should really be called HsBase.c or something).

Cheers,
	Simon