Python3 comes with its own types and closures when enabling the _ctypes
extension. We currently check if the extension is enabled, but a more
generic symbol should be defined at some point.
Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
-Wno-implicit-function-declaration -Wno-sign-compare \
-Wno-unused-parameter -Wno-empty-body -Wno-implicit-fallthrough
+ifneq ($(CONFIG_LIBPYTHON3_EXTENSION_CTYPES),y)
+LIBFFI_SRCS-y += $(LIBFFI_EXTRACTED)/src/types.c
LIBFFI_SRCS-y += $(LIBFFI_EXTRACTED)/src/closures.c
+endif
LIBFFI_SRCS-y += $(LIBFFI_EXTRACTED)/src/java_raw_api.c
LIBFFI_SRCS-y += $(LIBFFI_EXTRACTED)/src/prep_cif.c
LIBFFI_SRCS-y += $(LIBFFI_EXTRACTED)/src/raw_api.c
-LIBFFI_SRCS-y += $(LIBFFI_EXTRACTED)/src/types.c
LIBFFI_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBFFI_EXTRACTED)/src/x86/ffi64.c
LIBFFI_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBFFI_EXTRACTED)/src/x86/unix64.S