PACKAGE NAME ------------ neko_libffi DESCRIPTION ----------- A library to act as an interface for calling functions from foreign program languages. Compilers for high level languages generate code that follows certain conventions. These conventions are necessary, in part, for separate compilation to work. One such convention is the "calling convention". The "calling convention" is a set of assumptions made by the compiler about where function arguments will be found on entry to a function. A "calling convention" also specifies where the return value for a function is found. Some programs may not know at the time of compilation what arguments are to be passed to a function. For instance, an interpreter may be told at run-time about the number and types of arguments used to call a given function. Libffi can be used in such programs to provide a bridge from the interpreter program to compiled code. The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run-time. FFI stands for Foreign Function Interface. A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language. The libffi library really only provides the lowest, machine dependent layer of a fully featured foreign function interface. A layer must exist above libffi that handles type conversions for values passed between the two languages. For more info, see https://sourceware.org/libffi/ SOURCE/VERSION -------------- libffi-3.2.1 / 3 IRIX/MIPSPRO VERSION -------------------- 6.5.22m / 7.4.4m ENVIRONMENT VARIABLES --------------------- setenv CC 'c99 -woff 1185,1552,3968,3970' setenv CFLAGS '-O2 -mips4 -n32 -diag_error 1035' setenv CXX 'CC -woff 3970' setenv CXXFLAGS '-O2 -mips4 -n32 -diag_error 1035' setenv CPPFLAGS -I/usr/nekoware/include setenv LDFLAGS -L/usr/nekoware/lib setenv PERL /usr/nekoware/bin/perl For building on mips3 systems, use: setenv CFLAGS '-O2 -mips3 -n32 -diag_error 1035' setenv CXXFLAGS '-O2 -mips3 -n32 -diag_error 1035' CONFIGURE --------- patch -p0 < libffi-3.2.1_irix.patch ./configure --prefix=/usr/nekoware BUILD ----- gmake gmake check cd mips-sgi-irix6.5 ln -s ../install-sh install-sh cd .. gmake install KNOWN DEPENDENCIES ------------------ gmake to build the package nekoware's expect and dejagnu to run the test suite. It will not work with sgitcl_eoe.sw.expect (/usr/bin/expect) ERRORS/MISCELLANEOUS -------------------- I think there is a problem with the Makefile scripts and IRIX' korn shell, because i see failed install scripts due to missing install-sh, so i fixed this by adding a symlink to the actual install-sh. And include files should be in /usr/nekoware/include and not in /usr/nekoware/lib/libffi-3.2.1/include , what the hell. Corrected libffi.pc as well for this change. The patch fixes several test failures, some of them are important for packages that depend on this library. Running ../../testsuite/libffi.call/call.exp ... XPASS: libffi.call/cls_double_va.c output pattern test XPASS: libffi.call/cls_longdouble_va.c output pattern test FAIL: libffi.call/unwindtest_ffi_call.cc execution test === libffi Summary === # of expected passes 370 # of unexpected failures 1 # of unexpected successes 2 gmake[3]: *** [check-DEJAGNU] Error 1 There is only one test failure, the exception handling in the unwindtest_ffi_call C++ test program. This is because there is no exception handling for MIPSPro compilers, but only for GCC/GAS. It needs to be added in the n32.S file, but it is not clear how to add this extra _MIPS_eh_region section, since the information on doing this is limited. See the MIPSpro™ N32 ABI Handbook (07-2816-004) for more info on how to proceed. You can still use this library for C++ code, provided that you either refrain from using exceptions or compile with -LANG:exceptions=OFF This package has dual support for both mips3 and mips4 architecture, controlled by the mach(CPUARCH=R4000) switch for libraries and executables. PACKAGED BY ----------- S/N VER PORTER Date --------------------------------------------------------------- 2 3.0.11 Rainer Canavan (nekoware@canavan.de) 30-12-2012 3 3.2.1 Frank Everdij (dexter1@gmail.com) 11-07-2019