]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
f69507164c6990ff93191d0feb15810e0efb7350
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From 730fe2ee2fb9e08cbe885f370afe83fecb18d048 Mon Sep 17 00:00:00 2001
2 From: Joshua Watt <JPEWhacker@gmail.com>
3 Date: Sun, 26 May 2019 21:26:04 -0500
4 Subject: [PATCH] btrfs-progs: Pass CFLAGS and LDFLAGS to Python
5
6 Adds Make variables EXTRA_PYTHON_CFLAGS and EXTRA_PYTHON_LDFLAGS which
7 can be used to pass CFLAGS and LDFLAGS respectively when building the
8 Python library.
9
10 This is required to support reproducible builds, as there are often
11 compiler and linker flags that must be passed in order to generate
12 reproducible output (e.g. -fdebug-prefix-map)
13
14 Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
15 Upstream-Status: Accepted [https://github.com/kdave/btrfs-progs/pull/176]
16 ---
17 Makefile | 6 +++++-
18 1 file changed, 5 insertions(+), 1 deletion(-)
19
20 diff --git a/Makefile b/Makefile
21 index 505bd9c1..814767a8 100644
22 --- a/Makefile
23 +++ b/Makefile
24 @@ -24,6 +24,10 @@
25 # DEBUG_CFLAGS additional compiler flags for debugging build
26 # EXTRA_CFLAGS additional compiler flags
27 # EXTRA_LDFLAGS additional linker flags
28 +# EXTRA_PYTHON_CFLAGS additional compiler flags to pass when building Python
29 +# library
30 +# EXTRA_PYTHON_LDFLAGS additional linker flags to pass when building Python
31 +# library
32 #
33 # Testing-specific options (see also tests/README.md):
34 # TEST=GLOB run test(s) from directories matching GLOB
35 @@ -439,7 +443,7 @@ ifeq ($(PYTHON_BINDINGS),1)
36 libbtrfsutil_python: libbtrfsutil.so.$(libbtrfsutil_major) libbtrfsutil.so libbtrfsutil/btrfsutil.h
37 @echo " [PY] libbtrfsutil"
38 $(Q)cd libbtrfsutil/python; \
39 - CFLAGS= LDFLAGS= $(PYTHON) setup.py $(SETUP_PY_Q) build_ext -i build
40 + CFLAGS="$(EXTRA_PYTHON_CFLAGS)" LDFLAGS="$(EXTRA_PYTHON_LDFLAGS)" $(PYTHON) setup.py $(SETUP_PY_Q) build_ext -i build
41
42 .PHONY: libbtrfsutil_python
43 endif