Libffi on Tru64?

Jay K jayk123@hotmail.com
Mon Jul 5 11:42:12 GMT 2021


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

Building from before complex support succeeds, i.e. building from here:

commit fb25cd08ed5a87640b02f0feeb10a09b37cfddbe (HEAD -> master)
Author: Ehsan Akhgari <ehsan@mozilla.com>
Date:   Wed Jun 11 12:07:24 2014 -0400

    Add support for building with clang-cl

Likely .macro can be replaced with #define, as this assembler by default uses the C preprocessor (not sure about multi-line output..)

 - Jay

________________________________
From: Jay K
Sent: Sunday, July 4, 2021 10:54 PM
To: libffi-discuss@sourceware.org <libffi-discuss@sourceware.org>
Cc: Larkin Nickle <me@larbob.org>
Subject: Libffi on Tru64?

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