Apart from the missing SPARC parts, two files had to be changed on Solaris:
uname -a
SunOS neptun 5.7 Generic_106541-18 sun4u sparc SUNW,Ultra-Enterprise
gcc -v
[...] Thread model: posix gcc version 3.0.2 In configure.in, change if (test "`basename ${YACC}`x" == "byaccx"); then to if test "`basename ${YACC}`x" = "byaccx" ; then After this, configure works well.
grep DLL ../config.h
#define MKDLL_CMD "gcc -r"
grep UNDERSCORE ../config.h
/* #undef LEADING_UNDERSCORE */
cd .. ; make install_ffi
OK. But why are some files compiled with -O2 and others not? In testScript, change source config to . ./config
cd ../tests ; sh testScript ffi
---------------------------------------------------------------- -- Testing foreign function interface. ---------------------------------------------------------------- -- !!! Testing marshalling of all the basic types -- !!! Testing all the different forms of foreign import -- !!! Testing static, dynamic and wrapped import of trig function -- !!! Testing static, dynamic and wrapped import of trig function /home/spanne/tmp/test/bin/hugs +q +w -pHugs: ffi/Sin.hs < ffi/Sin.input expected stdout not matched by reality *** ffi/Sin.output Tue Jun 18 22:02:08 2002 --- /tmp/runtest17728.3 Tue Jul 9 10:17:01 2002 *************** *** 7,13 **** Testing sin==IO wrapped_sin (should return lots of Trues) - [True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True] - - Testing sin==Id wrapped_sin (should return lots of Trues) - [True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True] Hugs:[Leaving Hugs] --- 7,10 ---- Testing sin==IO wrapped_sin (should return lots of Trues) + ERROR - Foreign export dynamic is not supported on this architecture Hugs:[Leaving Hugs] -- !!! Testing marshalling of strings -- !!! Testing marshalling of strings -- !!! Testing system calls -- !!! Testing system calls /home/spanne/tmp/test/bin/hugs +q +w -pHugs: ffi/FileIO.hs < ffi/FileIO.input expected stdout not matched by reality *** ffi/FileIO.output Sat Jun 22 01:22:01 2002 --- /tmp/runtest17813.3 Tue Jul 9 10:17:10 2002 *************** *** 16,17 **** --- 16,20 ---- + IO Error: User error + Reason: open2: (-1,2) + Hugs:[Leaving Hugs] ---------------------------------------------------------------- Cheers, S.