From 1df7b047fe437708c70cbd2262557d19e40022a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 27 Jun 2024 17:32:37 +0200 Subject: [PATCH] pylibfdt/Makefile.pylibfdt: use project's flags to compile the extension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seems the project's CFLAGS are not used when compiling the python extension's C code via the setup.py script. Some default flags are used instead. Thus pass the CFLAGS explicitly. Unfortunately the SWIG generated code is not clean and requires -Wno-error override to compile successfully, because -Werror is used in the project's flags. Signed-off-by: Dan HorĂ¡k Signed-off-by: David Gibson --- pylibfdt/Makefile.pylibfdt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylibfdt/Makefile.pylibfdt b/pylibfdt/Makefile.pylibfdt index 73c8b76..d20659c 100644 --- a/pylibfdt/Makefile.pylibfdt +++ b/pylibfdt/Makefile.pylibfdt @@ -17,7 +17,7 @@ endif $(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_archive) $(SETUP) @$(VECHO) PYMOD $@ - $(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext + CFLAGS="$(CFLAGS) -Wno-error" $(PYTHON) $(SETUP) $(SETUPFLAGS) build_ext install_pylibfdt: $(PYMODULE) @$(VECHO) INSTALL-PYLIB