Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/micropython: libffi is optional, not mandatory
@ 2024-01-16 18:36 Fabrice Fontaine
  2024-01-21 15:31 ` Yann E. MORIN
  2024-02-04 21:11 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-01-16 18:36 UTC (permalink / raw)
  To: buildroot; +Cc: Chris Packham, Fabrice Fontaine

libffi is optional, not mandatory since bump to version 1.22.0 in commit
1e12b7dd49d1c64a5195f226e9e4da21e84f5d0c and
https://github.com/micropython/micropython/commit/89b320737652829edbab921e86d7ad3962d86d9e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/micropython/Config.in      | 1 -
 package/micropython/micropython.mk | 9 ++++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/package/micropython/Config.in b/package/micropython/Config.in
index b5dc47279d..30161c8b70 100644
--- a/package/micropython/Config.in
+++ b/package/micropython/Config.in
@@ -2,7 +2,6 @@ config BR2_PACKAGE_MICROPYTHON
 	bool "micropython"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
-	select BR2_PACKAGE_LIBFFI
 	help
 	  Micro Python is a lean and fast implementation of the Python
 	  3 programming language that is optimised to run on a
diff --git a/package/micropython/micropython.mk b/package/micropython/micropython.mk
index 6e0af59f06..c7873ab62a 100644
--- a/package/micropython/micropython.mk
+++ b/package/micropython/micropython.mk
@@ -12,7 +12,7 @@ MICROPYTHON_SOURCE = micropython-$(MICROPYTHON_VERSION).tar.xz
 # and most of the copied code is not used in the unix build.
 MICROPYTHON_LICENSE = MIT, BSD-1-Clause, BSD-3-Clause, Zlib
 MICROPYTHON_LICENSE_FILES = LICENSE
-MICROPYTHON_DEPENDENCIES = host-pkgconf libffi host-python3
+MICROPYTHON_DEPENDENCIES = host-python3
 MICROPYTHON_CPE_ID_VENDOR = micropython
 
 # Use fallback implementation for exception handling on architectures that don't
@@ -36,6 +36,13 @@ MICROPYTHON_MAKE_OPTS += \
 	LDFLAGS_EXTRA="$(TARGET_LDFLAGS)" \
 	CWARN=
 
+ifeq ($(BR2_PACKAGE_LIBFFI),y)
+MICROPYTHON_DEPENDENCIES += host-pkgconf libffi
+MICROPYTHON_MAKE_OPTS += MICROPY_PY_FFI=1
+else
+MICROPYTHON_MAKE_OPTS += MICROPY_PY_FFI=0
+endif
+
 define MICROPYTHON_BUILD_CMDS
 	$(MICROPYTHON_MAKE_ENV) $(MAKE) -C $(@D)/mpy-cross
 	$(MICROPYTHON_MAKE_ENV) $(MAKE) -C $(@D)/ports/unix \
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-02-04 21:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16 18:36 [Buildroot] [PATCH 1/1] package/micropython: libffi is optional, not mandatory Fabrice Fontaine
2024-01-21 15:31 ` Yann E. MORIN
2024-02-04 21:11 ` Peter Korsgaard

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