summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/selinux/android-tools/android-tools/core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/selinux/android-tools/android-tools/core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch')
-rw-r--r--dynamic-layers/selinux/android-tools/android-tools/core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools/core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch b/dynamic-layers/selinux/android-tools/android-tools/core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch
new file mode 100644
index 0000000..4ecfa6f
--- /dev/null
+++ b/dynamic-layers/selinux/android-tools/android-tools/core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch
@@ -0,0 +1,52 @@
1From bea40821d787ca31b38d5879fbf751be1dbea622 Mon Sep 17 00:00:00 2001
2From: Etienne Cordonnier <ecordonnier@snap.com>
3Date: Fri, 3 Mar 2023 13:33:30 +0100
4Subject: [PATCH 09/15] patching img2simg.mk to build in yocto environment.
5
6Changes include:
7Introduced an output folder which will keep all the outputs from the
8android-tools.
9
10Adding an include file that is setting the common flags.
11Changed the cppflag to include the headers from other components
12of android-tools
13
14Modified LDflags so that the libraries that are coming from other android-tools
15are searched in the output folder.
16
17Modified the build rule so that it outputs the binary to the OUT_DIR
18
19Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
20
21Upstream-Status: Pending
22---
23 debian/img2simg.mk | 11 ++++++-----
24 1 file changed, 6 insertions(+), 5 deletions(-)
25
26diff --git a/debian/img2simg.mk b/debian/img2simg.mk
27index f1036cef..94772381 100644
28--- a/debian/img2simg.mk
29+++ b/debian/img2simg.mk
30@@ -1,13 +1,14 @@
31+include ../../rules_yocto.mk
32 NAME = img2simg
33 SOURCES = img2simg.cpp
34 SOURCES := $(foreach source, $(SOURCES), libsparse/$(source))
35 CPPFLAGS += -Ilibsparse/include -Iinclude -std=gnu++17
36-LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
37- -Wl,-rpath-link=. \
38- -L. -lsparse
39+LDFLAGS += -Wl,-rpath=$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android \
40+ -Wl,-rpath-link=$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ \
41+ -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ -lsparse
42
43 build: $(SOURCES)
44- $(CXX) $^ -o libsparse/$(NAME) $(CPPFLAGS) $(LDFLAGS)
45+ $(CXX) $^ -o $(OUT_DIR)/usr/bin/$(NAME) $(CPPFLAGS) $(LDFLAGS)
46
47 clean:
48- $(RM) libsparse/$(NAME)
49+ $(RM) $(OUT_DIR)/usr/bin/$(NAME)
50--
512.36.1.vfs.0.0
52