public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jay K <jayk123@hotmail.com>
To: "libffi-discuss@sourceware.org" <libffi-discuss@sourceware.org>
Cc: Larkin Nickle <me@larbob.org>
Subject: Re: Libffi on Tru64?
Date: Mon, 5 Jul 2021 11:42:12 +0000	[thread overview]
Message-ID: <MWHPR1401MB1951C3AF327B447C23F8295BE61C9@MWHPR1401MB1951.namprd14.prod.outlook.com> (raw)
In-Reply-To: <MWHPR1401MB195125CBBD16B0E60A9BB255E61D9@MWHPR1401MB1951.namprd14.prod.outlook.com>

> 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

      reply	other threads:[~2021-07-05 11:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04 22:54 Jay K
2021-07-05 11:42 ` Jay K [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MWHPR1401MB1951C3AF327B447C23F8295BE61C9@MWHPR1401MB1951.namprd14.prod.outlook.com \
    --to=jayk123@hotmail.com \
    --cc=libffi-discuss@sourceware.org \
    --cc=me@larbob.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).