Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCHv2] micropython: fix build for MIPS64 n32
@ 2015-09-23  8:44 Vicente Olivert Riera
  2015-09-23 21:11 ` Thomas Petazzoni
  2015-09-23 21:12 ` Peter Korsgaard
  0 siblings, 2 replies; 5+ messages in thread
From: Vicente Olivert Riera @ 2015-09-23  8:44 UTC (permalink / raw)
  To: buildroot

This patch applies an upstream patch to fix a compile error like this
one:

modffi.c: In function 'ffifunc_call':
modffi.c:358:25: error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
             values[i] = (ffi_arg)a;

This error can be highlighted when building micropython for MIPS64 n32
because ffi_arg is 64-bit wide and the pointers on MIPS64 n32 are 32-bit
wide, so it's trying to case an integer to a pointer (or vice versa) of
a different size. We should cast first the pointer (or the integer) to a
pointer sized integer (intptr_t) to fix that problem.

This patch was merged upstream as a result of this pull request:

  https://github.com/micropython/micropython/pull/1471

Fixes:

  http://autobuild.buildroot.net/results/e22/e2253de3f96e9a53e75b4cecaf56c1df2950803f/

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
Changes v1 - > v2:
  - Fixed a typo in the commit log: changed 'from' to 'for'
  - Add the patch file to MICROPYTHON_PATCH using '+='. (Chris Packham)

 package/micropython/micropython.mk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/package/micropython/micropython.mk b/package/micropython/micropython.mk
index f2ad5bf..7f401bf 100644
--- a/package/micropython/micropython.mk
+++ b/package/micropython/micropython.mk
@@ -10,6 +10,7 @@ MICROPYTHON_LICENSE = MIT
 MICROPYTHON_LICENSE_FILES = LICENSE
 MICROPYTHON_DEPENDENCIES = host-pkgconf libffi
 MICROPYTHON_PATCH = https://github.com/micropython/micropython/commit/8b4fb4fe140e9cf57fcfa258d0d2d6fe19090fc5.patch
+MICROPYTHON_PATCH += https://github.com/micropython/micropython/commit/587914169cc6ff7f0513bd14c42dcbb275bf77bd.patch
 
 # Use fallback implementation for exception handling on architectures that don't
 # have explicit support.
-- 
1.7.1

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

* [Buildroot] [PATCHv2] micropython: fix build for MIPS64 n32
  2015-09-23  8:44 [Buildroot] [PATCHv2] micropython: fix build for MIPS64 n32 Vicente Olivert Riera
@ 2015-09-23 21:11 ` Thomas Petazzoni
  2015-09-23 21:15   ` Vicente Olivert Riera
  2015-09-23 21:12 ` Peter Korsgaard
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-09-23 21:11 UTC (permalink / raw)
  To: buildroot

Vicente,

On Wed, 23 Sep 2015 09:44:20 +0100, Vicente Olivert Riera wrote:

> diff --git a/package/micropython/micropython.mk b/package/micropython/micropython.mk
> index f2ad5bf..7f401bf 100644
> --- a/package/micropython/micropython.mk
> +++ b/package/micropython/micropython.mk
> @@ -10,6 +10,7 @@ MICROPYTHON_LICENSE = MIT
>  MICROPYTHON_LICENSE_FILES = LICENSE
>  MICROPYTHON_DEPENDENCIES = host-pkgconf libffi
>  MICROPYTHON_PATCH = https://github.com/micropython/micropython/commit/8b4fb4fe140e9cf57fcfa258d0d2d6fe19090fc5.patch
> +MICROPYTHON_PATCH += https://github.com/micropython/micropython/commit/587914169cc6ff7f0513bd14c42dcbb275bf77bd.patch

There's no need to use a += here, using a single assignment for both is
nicer. I've changed that and applied, thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCHv2] micropython: fix build for MIPS64 n32
  2015-09-23  8:44 [Buildroot] [PATCHv2] micropython: fix build for MIPS64 n32 Vicente Olivert Riera
  2015-09-23 21:11 ` Thomas Petazzoni
@ 2015-09-23 21:12 ` Peter Korsgaard
  2015-09-23 23:12   ` Chris Packham
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2015-09-23 21:12 UTC (permalink / raw)
  To: buildroot

>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com> writes:

 > This patch applies an upstream patch to fix a compile error like this
 > one:

 > modffi.c: In function 'ffifunc_call':
 > modffi.c:358:25: error: cast from pointer to integer of different size
 > [-Werror=pointer-to-int-cast]
 >              values[i] = (ffi_arg)a;

 > This error can be highlighted when building micropython for MIPS64 n32
 > because ffi_arg is 64-bit wide and the pointers on MIPS64 n32 are 32-bit
 > wide, so it's trying to case an integer to a pointer (or vice versa) of
 > a different size. We should cast first the pointer (or the integer) to a
 > pointer sized integer (intptr_t) to fix that problem.

 > This patch was merged upstream as a result of this pull request:

 >   https://github.com/micropython/micropython/pull/1471

 > Fixes:

 >   http://autobuild.buildroot.net/results/e22/e2253de3f96e9a53e75b4cecaf56c1df2950803f/

 > Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Committed, thanks.

If we need to apply any more patches then I think it makes more sense to
get the sources from git (or convince upstream to make a new release).

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2] micropython: fix build for MIPS64 n32
  2015-09-23 21:11 ` Thomas Petazzoni
@ 2015-09-23 21:15   ` Vicente Olivert Riera
  0 siblings, 0 replies; 5+ messages in thread
From: Vicente Olivert Riera @ 2015-09-23 21:15 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 23/09/15 22:11, Thomas Petazzoni wrote:
> Vicente,
>
> On Wed, 23 Sep 2015 09:44:20 +0100, Vicente Olivert Riera wrote:
>
>> diff --git a/package/micropython/micropython.mk b/package/micropython/micropython.mk
>> index f2ad5bf..7f401bf 100644
>> --- a/package/micropython/micropython.mk
>> +++ b/package/micropython/micropython.mk
>> @@ -10,6 +10,7 @@ MICROPYTHON_LICENSE = MIT
>>   MICROPYTHON_LICENSE_FILES = LICENSE
>>   MICROPYTHON_DEPENDENCIES = host-pkgconf libffi
>>   MICROPYTHON_PATCH = https://github.com/micropython/micropython/commit/8b4fb4fe140e9cf57fcfa258d0d2d6fe19090fc5.patch
>> +MICROPYTHON_PATCH += https://github.com/micropython/micropython/commit/587914169cc6ff7f0513bd14c42dcbb275bf77bd.patch
>
> There's no need to use a += here, using a single assignment for both is
> nicer. I've changed that and applied, thanks!

Noted. I will do it in that way from now on :-)

Thanks!

Vincent.

> Thomas
>

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

* [Buildroot] [PATCHv2] micropython: fix build for MIPS64 n32
  2015-09-23 21:12 ` Peter Korsgaard
@ 2015-09-23 23:12   ` Chris Packham
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Packham @ 2015-09-23 23:12 UTC (permalink / raw)
  To: buildroot

Hi Peter,

On Thu, Sep 24, 2015 at 9:12 AM, Peter Korsgaard <peter@korsgaard.com> wrote:
>>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com> writes:
>
>  > This patch applies an upstream patch to fix a compile error like this
>  > one:
>
>  > modffi.c: In function 'ffifunc_call':
>  > modffi.c:358:25: error: cast from pointer to integer of different size
>  > [-Werror=pointer-to-int-cast]
>  >              values[i] = (ffi_arg)a;
>
>  > This error can be highlighted when building micropython for MIPS64 n32
>  > because ffi_arg is 64-bit wide and the pointers on MIPS64 n32 are 32-bit
>  > wide, so it's trying to case an integer to a pointer (or vice versa) of
>  > a different size. We should cast first the pointer (or the integer) to a
>  > pointer sized integer (intptr_t) to fix that problem.
>
>  > This patch was merged upstream as a result of this pull request:
>
>  >   https://github.com/micropython/micropython/pull/1471
>
>  > Fixes:
>
>  >   http://autobuild.buildroot.net/results/e22/e2253de3f96e9a53e75b4cecaf56c1df2950803f/
>
>  > Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>
> Committed, thanks.
>
> If we need to apply any more patches then I think it makes more sense to
> get the sources from git (or convince upstream to make a new release).
>

I think they heard you :) 1.4.6 was just released. I'll send a patch
through for that shortly.

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

end of thread, other threads:[~2015-09-23 23:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-23  8:44 [Buildroot] [PATCHv2] micropython: fix build for MIPS64 n32 Vicente Olivert Riera
2015-09-23 21:11 ` Thomas Petazzoni
2015-09-23 21:15   ` Vicente Olivert Riera
2015-09-23 21:12 ` Peter Korsgaard
2015-09-23 23:12   ` Chris Packham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox