public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* Cross-compiling libffi on ppc 603e
@ 2016-02-03 10:22 Frédéric
  2016-02-09  8:02 ` Frédéric
  0 siblings, 1 reply; 5+ messages in thread
From: Frédéric @ 2016-02-03 10:22 UTC (permalink / raw)
  To: libffi-discuss

Hi!

I cross-compiled Python 2.5.3 for an embedded VME card running a 32bits ppc
603e processor:

    http://www.dpie.com/vme/cpu-powerpc/men-mikro-a15c

All worked fine, except the _ctypes python module, using libffi, which
failed with the following error:

In file included from Modules/_ctypes/libffi/src/prep_cif.c:26:
build/temp.linux2-powerpc-2.7/libffi/include/ffi.h:153:
  #error "no 64-bit data type supported"

(python 2.5.3 uses libffi 3.0.13).

Any idea why I can't cross-compile on this platform? I can see that ppc
32bits is supported. I may need to give an additional env. var. to my
toolchain?

Thanks for your help.

-- 
    Frédéric

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cross-compiling libffi on ppc 603e
  2016-02-03 10:22 Cross-compiling libffi on ppc 603e Frédéric
@ 2016-02-09  8:02 ` Frédéric
  2016-02-09 10:41   ` Andrew Haley
  0 siblings, 1 reply; 5+ messages in thread
From: Frédéric @ 2016-02-09  8:02 UTC (permalink / raw)
  To: libffi-discuss

Le 03/02/2016, Frédéric a écrit :

> I cross-compiled Python 2.5.3 for an embedded VME card running a 32bits
> ppc 603e processor:
> 
>     http://www.dpie.com/vme/cpu-powerpc/men-mikro-a15c
> 
> All worked fine, except the _ctypes python module, using libffi, which
> failed with the following error:
> 
> In file included from Modules/_ctypes/libffi/src/prep_cif.c:26:
> build/temp.linux2-powerpc-2.7/libffi/include/ffi.h:153:
>   #error "no 64-bit data type supported"
> 
> (python 2.5.3 uses libffi 3.0.13).
> 
> Any idea why I can't cross-compile on this platform? I can see that ppc
> 32bits is supported. I may need to give an additional env. var. to my
> toolchain?

No idea?

-- 
    Frédéric

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cross-compiling libffi on ppc 603e
  2016-02-09  8:02 ` Frédéric
@ 2016-02-09 10:41   ` Andrew Haley
  2016-02-09 12:45     ` Frédéric
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Haley @ 2016-02-09 10:41 UTC (permalink / raw)
  To: Frédéric, libffi-discuss

On 09/02/16 08:02, Frédéric wrote:
>> > Any idea why I can't cross-compile on this platform? I can see that ppc
>> > 32bits is supported. I may need to give an additional env. var. to my
>> > toolchain?
> No idea?

Look for where FFI_LONG_LONG_MAX is defined.  Check that it is correct.
Patch if necessary.  Send us the patch.

Thanks,

Andrew.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cross-compiling libffi on ppc 603e
  2016-02-09 10:41   ` Andrew Haley
@ 2016-02-09 12:45     ` Frédéric
  2016-02-09 13:57       ` Andrew Haley
  0 siblings, 1 reply; 5+ messages in thread
From: Frédéric @ 2016-02-09 12:45 UTC (permalink / raw)
  To: libffi-discuss

Le 09/02/2016, Andrew a écrit :

> Look for where FFI_LONG_LONG_MAX is defined.  Check that it is correct.
> Patch if necessary.  Send us the patch.

There is something I don't understand: how could the lib be compiled on a
32bits system if FFI_LONG_LONG_MAX must equals FFI_64_BIT_MAX?

-- 
    Frédéric

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cross-compiling libffi on ppc 603e
  2016-02-09 12:45     ` Frédéric
@ 2016-02-09 13:57       ` Andrew Haley
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Haley @ 2016-02-09 13:57 UTC (permalink / raw)
  To: Frédéric, libffi-discuss

On 09/02/16 12:44, Frédéric wrote:
> There is something I don't understand: how could the lib be compiled on a
> 32bits system if FFI_LONG_LONG_MAX must equals FFI_64_BIT_MAX?

Most, if not all, 32-bit systems have some kind of 64-bit integer
type which occupies two machine words.

Andrew.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-09 13:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 10:22 Cross-compiling libffi on ppc 603e Frédéric
2016-02-09  8:02 ` Frédéric
2016-02-09 10:41   ` Andrew Haley
2016-02-09 12:45     ` Frédéric
2016-02-09 13:57       ` Andrew Haley

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).