public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: u-xsnf@aetey.se
To: Richard Henderson <rth@redhat.com>
Cc: libffi-discuss@sourceware.org
Subject: Re: showstopper bug on x86 (Re: libffi does not follow proper ABI on ia32)
Date: Sat, 03 Jan 2015 10:15:00 -0000	[thread overview]
Message-ID: <20150103101457.GP14316@example.net> (raw)
In-Reply-To: <54A719A6.9050008@redhat.com>

On Fri, Jan 02, 2015 at 02:20:22PM -0800, Richard Henderson wrote:
> On 01/02/2015 10:56 AM, u-xsnf@aetey.se wrote:
> > Looking at the source I wonder if this has to do with the reliance
> > on the fastcall attribute, which pcc does not support.
> 
> Ah, well, that could well be.  Since fastcall is a standard Windows
> calling convention, I sort of assume every decent compiler supports it.
> 
> In which case I'm going to suggest not building libffi with pcc.
> An executable built with pcc should work with a library built with
> gcc or clang.

Oh that's too bad.

As long as C code is concerned it would be a burden to build and
eventually maintain either gcc or clang for the sole purpose to compile
libffi.

Is it hard to make libffi implementation compatible with cdecl?
The calling conventions is exactly what the library is competent about. 

If the internal use of fastcall is desirable in certain cases, then
a compile time choice between fastcall and cdecl would alleviate the
problem and make one-compiler-shops with pcc (or even something else
like tcc?) happy.

Rune

  reply	other threads:[~2015-01-03 10:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-22 19:36 libffi does not follow proper ABI on ia32 (?) u-xsnf
2014-12-24 13:58 ` showstopper bug on x86 (Re: libffi does not follow proper ABI on ia32) u-xsnf
2014-12-24 16:31   ` Richard Henderson
2014-12-24 21:35     ` u-xsnf
2014-12-31 16:12     ` Richard Henderson
2015-01-02 18:57       ` u-xsnf
2015-01-02 22:20         ` Richard Henderson
2015-01-03 10:15           ` u-xsnf [this message]
2015-01-03 10:36             ` u-xsnf
2015-01-05 21:34             ` Richard Henderson
2015-01-06 10:21               ` u-xsnf
2015-01-06 12:46                 ` libffi vs pcc (was: showstopper bug on x86 / " u-xsnf
2015-01-06 16:20                 ` showstopper bug on x86 (Re: " Richard Henderson
2015-01-06 16:52                   ` u-xsnf

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=20150103101457.GP14316@example.net \
    --to=u-xsnf@aetey.se \
    --cc=libffi-discuss@sourceware.org \
    --cc=rth@redhat.com \
    /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).