summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2019-05-29 21:41:09 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-30 12:37:03 +0100
commit41bd3fee9db390d4d5e885aed007cb54c3d9bed5 (patch)
treeea3a4bdd12a4cdb37e1ddf24b814cc9f49eb67ed
parent570938d845f2ce4208c6f004ab3b72e8be1ce40b (diff)
downloadpoky-41bd3fee9db390d4d5e885aed007cb54c3d9bed5.tar.gz
btrfs-tools: Pass DEBUG_MAP_PREFIX flags to Python
The DEBUG_MAP_PREFIX flags need to be passed when building the Python library to prevent these non-reproducible paths from being encoded into the library. The patch that does this was accepted upstream and supersedes part of a previous patch that passed LDFLAGS to the Python library in favor of passing EXTRA_PYTHON_LDFLAGS, so the patch and recipe has been updated to reflect this. (From OE-Core rev: 04bb44c1b97c3183739e4836588a93dc34af8806) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch19
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/0003-btrfs-progs-Pass-CFLAGS-and-LDFLAGS-to-Python.patch43
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools_5.1.bb6
3 files changed, 53 insertions, 15 deletions
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch
index a8fcfc0f73..e23be32599 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch
@@ -1,4 +1,4 @@
1From eecc48ecad359cd4fab650ce49cfe57e99d1859d Mon Sep 17 00:00:00 2001 1From c384fa875c5128009ac8b6ba11a54a6bd4de575a Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 17 May 2018 12:21:31 +0300 3Date: Thu, 17 May 2018 12:21:31 +0300
4Subject: [PATCH] Add LDFLAGS when building libbtrfsutil.so and python 4Subject: [PATCH] Add LDFLAGS when building libbtrfsutil.so and python
@@ -8,14 +8,14 @@ Upstream-Status: Pending
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9 9
10--- 10---
11 Makefile | 4 ++-- 11 Makefile | 2 +-
12 1 file changed, 2 insertions(+), 2 deletions(-) 12 1 file changed, 1 insertion(+), 1 deletion(-)
13 13
14diff --git a/Makefile b/Makefile 14diff --git a/Makefile b/Makefile
15index 10f0e3b0..1697794c 100644 15index e25e256f..6df00186 100644
16--- a/Makefile 16--- a/Makefile
17+++ b/Makefile 17+++ b/Makefile
18@@ -402,7 +402,7 @@ libbtrfsutil/%.o: libbtrfsutil/%.c 18@@ -424,7 +424,7 @@ libbtrfsutil/%.o: libbtrfsutil/%.c
19 19
20 libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects) 20 libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects)
21 @echo " [LD] $@" 21 @echo " [LD] $@"
@@ -24,12 +24,3 @@ index 10f0e3b0..1697794c 100644
24 -shared -Wl,-soname,libbtrfsutil.so.$(libbtrfsutil_major) -o $@ 24 -shared -Wl,-soname,libbtrfsutil.so.$(libbtrfsutil_major) -o $@
25 25
26 libbtrfsutil.a: $(libbtrfsutil_objects) 26 libbtrfsutil.a: $(libbtrfsutil_objects)
27@@ -417,7 +417,7 @@ ifeq ($(PYTHON_BINDINGS),1)
28 libbtrfsutil_python: libbtrfsutil.so.$(libbtrfsutil_major) libbtrfsutil.so libbtrfsutil/btrfsutil.h
29 @echo " [PY] libbtrfsutil"
30 $(Q)cd libbtrfsutil/python; \
31- CFLAGS= LDFLAGS= $(PYTHON) setup.py $(SETUP_PY_Q) build_ext -i build
32+ CFLAGS= $(PYTHON) setup.py $(SETUP_PY_Q) build_ext -i build
33
34 .PHONY: libbtrfsutil_python
35 endif
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0003-btrfs-progs-Pass-CFLAGS-and-LDFLAGS-to-Python.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0003-btrfs-progs-Pass-CFLAGS-and-LDFLAGS-to-Python.patch
new file mode 100644
index 0000000000..f69507164c
--- /dev/null
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0003-btrfs-progs-Pass-CFLAGS-and-LDFLAGS-to-Python.patch
@@ -0,0 +1,43 @@
1From 730fe2ee2fb9e08cbe885f370afe83fecb18d048 Mon Sep 17 00:00:00 2001
2From: Joshua Watt <JPEWhacker@gmail.com>
3Date: Sun, 26 May 2019 21:26:04 -0500
4Subject: [PATCH] btrfs-progs: Pass CFLAGS and LDFLAGS to Python
5
6Adds Make variables EXTRA_PYTHON_CFLAGS and EXTRA_PYTHON_LDFLAGS which
7can be used to pass CFLAGS and LDFLAGS respectively when building the
8Python library.
9
10This is required to support reproducible builds, as there are often
11compiler and linker flags that must be passed in order to generate
12reproducible output (e.g. -fdebug-prefix-map)
13
14Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
15Upstream-Status: Accepted [https://github.com/kdave/btrfs-progs/pull/176]
16---
17 Makefile | 6 +++++-
18 1 file changed, 5 insertions(+), 1 deletion(-)
19
20diff --git a/Makefile b/Makefile
21index 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
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.1.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.1.bb
index 8b4178d6de..89cc1bfe20 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.1.bb
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.1.bb
@@ -18,6 +18,7 @@ SRCREV = "43013422dbce4bcc9ed77cfe65b294caa0985ec8"
18SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ 18SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
19 file://0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch \ 19 file://0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch \
20 file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ 20 file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
21 file://0003-btrfs-progs-Pass-CFLAGS-and-LDFLAGS-to-Python.patch \
21 " 22 "
22 23
23inherit autotools-brokensep pkgconfig manpages distutils3-base 24inherit autotools-brokensep pkgconfig manpages distutils3-base
@@ -27,7 +28,10 @@ CLEANBROKEN = "1"
27PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native" 28PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native"
28EXTRA_OECONF = " --disable-zstd" 29EXTRA_OECONF = " --disable-zstd"
29EXTRA_OECONF_append_libc-musl = " --disable-backtrace " 30EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
30EXTRA_OEMAKE = "V=1" 31EXTRA_PYTHON_CFLAGS = "${DEBUG_PREFIX_MAP}"
32EXTRA_PYTHON_CFLAGS_class-native = ""
33EXTRA_PYTHON_LDFLAGS = "${LDFLAGS}"
34EXTRA_OEMAKE = "V=1 'EXTRA_PYTHON_CFLAGS=${EXTRA_PYTHON_CFLAGS}' 'EXTRA_PYTHON_LDFLAGS=${EXTRA_PYTHON_LDFLAGS}'"
31 35
32do_configure_prepend() { 36do_configure_prepend() {
33 # Upstream doesn't ship this and autoreconf won't install it as automake isn't used. 37 # Upstream doesn't ship this and autoreconf won't install it as automake isn't used.