Libffi on Tru64?

Jay K jayk123@hotmail.com
Sun Jul 4 22:54:44 GMT 2021


Hi. I've built "a lot" of "GNU" software quite recently for Tru64 / OSF/1.
Mostly current but not all.
gcc (3.4.6, 4.7.4) gdb (6.4) sed m4 autoconf make tar gettext tcl diff gawk bzip2 grep etc.

libffi is giving me a bit more pause now.

When I tried with native cc, I saw the following problems:

inline asm
It appears native cc does have a reasonable inline asm feature.
 Basically each instruction is modeled as a function, taking params in a0, a1, etc., 
 and returning in v0, but compiler can rename. There is an intrinsic
 for each return type.

I can likely make easy patches, under #if __GNU__

pointer math on void*.
 I suggest cast to char* first.
 I can provide patches for that later too.

But anyway I tried with gcc instead.
There I also have problems.
In 2014 osf.S got ".macro". This seems to be not a thing with native as. It errors.

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/users/jay/s/libffi-3.3 -I. -I/usr/users/jay/s/libffi-3.3/include -Iinclude -I/usr/users/jay/s/libffi-3.3/src -I. -I/usr/users/jay/s/libffi-3.3/include -Iinclude -I/usr/users/jay/s/libffi-3.3/src -MT src/alpha/osf.lo -MD -MP -MF src/alpha/.deps/osf.Tpo -c /usr/users/jay/s/libffi-3.3/src/alpha/osf.S  -DPIC -o src/alpha/.libs/osf.o
 as0: Error: /usr/users/jay/s/libffi-3.3/src/alpha/osf.S, line 37: undefined assembler operation: .macro

GNU as is not supported. Perhaps we should fix that.

So I went back to before the 2014 commit that added .macro.
I installed autoconf, automake.
That fails with:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/users/jay/s/libffi -I. -I/usr/users/jay/s/libffi/include -Iinclude -I/usr/users/jay/s/libffi/src -I. -I/usr/users/jay/s/libffi/include -Iinclude -I/usr/users/jay/s/libffi/src -MT src/alpha/osf.lo -MD -MP -MF src/alpha/.deps/osf.Tpo -c /usr/users/jay/s/libffi/src/alpha/osf.S  -DPIC -o src/alpha/.libs/osf.o
/usr/users/jay/s/libffi/src/alpha/osf.S:298:2: error: #error "osf.S out of sync with ffi.h"

I'll look more later. Perhaps it was an obvious brief breakage..

Thank you for any tips.
 - Jay


More information about the Libffi-discuss mailing list