From a9d68496a52f324bfa32ee52d46b7ab62353ec38 Mon Sep 17 00:00:00 2001 From: Costin Lupu Date: Sun, 13 Oct 2019 18:03:33 +0300 Subject: [PATCH] Makefile.uk: Skip building types.c and closures.c with Python3 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 Reviewed-by: Felipe Huici --- Makefile.uk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.uk b/Makefile.uk index 276ab1c..d5901e2 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -109,11 +109,13 @@ LIBFFI_CFLAGS-y += -DHAVE_CONFIG_H -fexceptions -Wall \ -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 -- 2.39.5