public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Ryan Hill <rhill@gentoo.org>
To: libffi-discuss@sourceware.org
Subject: Re: Tidy powerpc*-linux support
Date: Fri, 30 May 2014 05:10:00 -0000	[thread overview]
Message-ID: <20140529230424.52720c3f@caribou.gateway.pace.com> (raw)
In-Reply-To: <20131120073825.GH22514@bubble.grove.modra.org>

[-- Attachment #1: Type: text/plain, Size: 2924 bytes --]

On Wed, 20 Nov 2013 18:08:25 +1030
Alan Modra <amodra@gmail.com> wrote:

> As threatened.
> 
> This separates the 32-bit sysv/linux/bsd code from the 64-bit linux
> code, and makes it possible to link code compiled with different
> options to those used to compile libffi.  For example, a
> -mlong-double-128 libffi can be used with -mlong-double-64 code.
> 
> Tested powerpc-linux, powerpc64-linux, powerpc64le-linux, and the
> hacky powerpc-freebsd simulated setup I used earlier.  I've tried a
> few combinations of ABI variations; -mlong-double-64/-mlong-double-128
> and -msvr4-struct-return/-maix-struct-return pass the testuite with 
> flying colours.  Testing -msoft-float ran into lack of soft-float
> multilibs on my system, but I looked at some testcases under gdb and
> they seemed to do the right thing.
> 
> 	* Makefile.am (EXTRA_DIST): Add new src/powerpc files.
> 	(nodist_libffi_la_SOURCES <POWERPC, POWERPC_FREEBSD>): Likewise.
> 	* configure.ac (HAVE_LONG_DOUBLE_VARIANT): Define for powerpc.
> 	* include/ffi.h.in (ffi_prep_types): Declare.
> 	* src/prep_cif.c (ffi_prep_cif_core): Call ffi_prep_types.
> 	* src/types.c (FFI_NONCONST_TYPEDEF): Define and use for
> 	HAVE_LONG_DOUBLE_VARIANT.
> 	* src/powerpc/ffi_powerpc.h: New file.
> 	* src/powerpc/ffi.c: Split into..
> 	* src/powerpc/ffi_sysv.c: ..new file, and..
> 	* src/powerpc/ffi_linux64.c: ..new file, rewriting parts.
> 	* src/powerpc/ffitarget.h (enum ffi_abi): Rewrite powerpc ABI
> 	selection as bits controlling features.
> 	* src/powerpc/linux64.S: For consistency, use POWERPC64 rather
> 	than __powerpc64__.
> 	* src/powerpc/linux64_closure.S: Likewise.
> 	* src/powerpc/ppc_closure.S: Likewise.  Move .note.FNU-stack
> 	inside guard.
> 	* src/powerpc/sysv.S: Likewise.
> 	* configure: Regenerate.
> 	* fficonfig.h.in: Regenerate.
> 	* Makefile.in: Regenerate.

[...] 

> --- a/include/ffi.h.in
> +++ b/include/ffi.h.in
> @@ -221,6 +221,11 @@ typedef struct {
>  #endif
>  } ffi_cif;
>  
> +#if HAVE_LONG_DOUBLE_VARIANT
> +/* Used to adjust size/alignment of ffi types.  */
> +void ffi_prep_types (ffi_abi abi);
> +# endif
> +
>  /* Used internally, but overridden by some architectures */
>  ffi_status ffi_prep_cif_core(ffi_cif *cif,
>  			     ffi_abi abi,

This is an installed header and including it now causes a warning:

  In file included from ./include/parrot/parrot.h:94:0,
                   from src/string/api.c:27:
  /usr/lib64/libffi-3.1/include/ffi.h:224:5: error: "HAVE_LONG_DOUBLE_VARIANT"
  is not defined [-Werror=undef] #if HAVE_LONG_DOUBLE_VARIANT
                                     ^
  cc1: some warnings being treated as errors

Did you mean to use @HAVE_LONG_DOUBLE_VARIANT@?


-- 
Ryan Hill                        psn: dirtyepic_sk
   gcc-porting/toolchain/wxwidgets @ gentoo.org

47C3 6D62 4864 0E49 8E9E  7F92 ED38 BD49 957A 8463

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

      reply	other threads:[~2014-05-30  5:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-17  3:17 Straying #endif in ppc_closure.S Alan Modra
2013-11-18 11:38 ` Anthony Green
2013-11-19  0:14   ` Alan Modra
2013-11-20  7:35     ` PowerPC64 ELFv2 fix 2 of 2 Alan Modra
2013-11-20  7:38     ` Tidy powerpc*-linux support Alan Modra
2014-05-30  5:10       ` Ryan Hill [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=20140529230424.52720c3f@caribou.gateway.pace.com \
    --to=rhill@gentoo.org \
    --cc=libffi-discuss@sourceware.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).