From: Wolfgang T. <wth...@us...> - 2004-05-13 11:08:42
|
Update of /cvsroot/hoc/hoc/HOC/HOC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7280/HOC/HOC Modified Files: MsgSend.hs Log Message: Make HOC.MsgSend compile via C to work around a bug in GHC 6.2's NCG for PowerPC. The NCG doesn't generate the proper dynamic linker stubs for taking the address of dylib-imported functions. The bug will be fixed in GHC 6.4, so we will be able to remove the -fvia-C flag again then. Compiling via C required adding a new .h file with the prototypes for objc_msgSend and friends; Apple is not helping us here by letting a single line of Objective-C slip into an otherwise plain C header file. Also, removed the previous workaround from HOC/HOC-macos.conf. Index: MsgSend.hs =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC/MsgSend.hs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- MsgSend.hs 3 Nov 2003 10:26:00 -0000 1.4 +++ MsgSend.hs 13 May 2004 11:08:34 -0000 1.5 @@ -1,4 +1,4 @@ -{-# OPTIONS -cpp #-} +{-# OPTIONS -cpp -fvia-C #-} module HOC.MsgSend( sendMessageWithRetval, sendMessageWithStructRetval, @@ -47,9 +47,9 @@ #else -foreign import ccall "objc/objc-runtime.h &objc_msgSend" +foreign import ccall "MsgSend.h &objc_msgSend" objc_msgSendPtr :: FunPtr (Ptr ObjCObject -> SEL -> IO ()) -foreign import ccall "objc/objc-runtime.h &objc_msgSend_stret" +foreign import ccall "MsgSend.h &objc_msgSend_stret" objc_msgSend_stretPtr :: FunPtr (Ptr a -> Ptr ObjCObject -> SEL -> IO ()) sendMessageWithRetval cif args = |