micropython: fix build for MIPS64 n32
PATCH 1/1 micropython: fix build for MIPS64 n32
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 from 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/
--- package/micropython/micropython.mk | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
package/micropython/micropython.mk +1 -0
@@ -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.
Signature · 1 line
1.7.1
PATCH 1/1 micropython: fix build for MIPS64 n32
Maintainer, please:
Quoted 9 lines · Vicente Olivert Riera
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 from MIPS64 n32
s/from/for/
Thanks in advance,
Vincent.
Quoted 31 lines
because
ffi_argis 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 <[email protected]>--- package/micropython/micropython.mk | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)package/micropython/micropython.mk +1
-0@@ -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.
PATCH 1/1 micropython: fix build for MIPS64 n32
In reply to Vicente Olivert RieraHi Vincent,
Quoted 32 lines · Vicente Olivert Riera
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 from MIPS64 n32 because
ffi_argis 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 <[email protected]>--- package/micropython/micropython.mk | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)package/micropython/micropython.mk +0
-0
package/micropython/micropython.mk MICROPYTHON_LICENSE = MIT · line 13
Quoted 4 lines
package/micropython/micropython.mk +1
-0@@ -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
Does this need to be MICROPYTHON_PATCH += ? or is there something that makes the assignment work.
Quoted 6 lines
package/micropython/micropython.mk +0
-1# Use fallback implementation for exception handling on architectures that don't # have explicit support. --1.7.1