diff options
Diffstat (limited to 'dynamic-layers/selinux/android-tools/android-tools/0001-libext4_utils.mk-modifications-to-make-it-build-in-y.patch')
-rw-r--r-- | dynamic-layers/selinux/android-tools/android-tools/0001-libext4_utils.mk-modifications-to-make-it-build-in-y.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools/0001-libext4_utils.mk-modifications-to-make-it-build-in-y.patch b/dynamic-layers/selinux/android-tools/android-tools/0001-libext4_utils.mk-modifications-to-make-it-build-in-y.patch new file mode 100644 index 0000000..04592da --- /dev/null +++ b/dynamic-layers/selinux/android-tools/android-tools/0001-libext4_utils.mk-modifications-to-make-it-build-in-y.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From e284ceac2b10133ca916bbae8055f040607b506c Mon Sep 17 00:00:00 2001 | ||
2 | From: Etienne Cordonnier <ecordonnier@snap.com> | ||
3 | Date: Fri, 3 Mar 2023 13:21:49 +0100 | ||
4 | Subject: [PATCH 1/2] libext4_utils.mk: modifications to make it build in yocto | ||
5 | environment | ||
6 | |||
7 | Adding an include file that is setting the common flags. | ||
8 | Changed the cppflag to include the headers from other components | ||
9 | of android-tools | ||
10 | |||
11 | Modified LDflags so that the libraries that are coming from other android-tools | ||
12 | are searched in the output folder. | ||
13 | |||
14 | Modified the build rule so that it outputs the binary and header to the OUT_DIR | ||
15 | |||
16 | Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com> | ||
17 | --- | ||
18 | debian/libext4_utils.mk | 13 ++++++++----- | ||
19 | 1 file changed, 8 insertions(+), 5 deletions(-) | ||
20 | |||
21 | diff --git a/debian/libext4_utils.mk b/debian/libext4_utils.mk | ||
22 | index 868e790..2e93158 100644 | ||
23 | --- a/debian/libext4_utils.mk | ||
24 | +++ b/debian/libext4_utils.mk | ||
25 | @@ -1,3 +1,4 @@ | ||
26 | +include ../../rules_yocto.mk | ||
27 | NAME = libext4_utils | ||
28 | |||
29 | ext4_utils_SOURCES := \ | ||
30 | @@ -17,14 +18,16 @@ CPPFLAGS += \ | ||
31 | -Iext4_utils/include \ | ||
32 | -Ilibfec/include \ | ||
33 | -Isquashfs_utils \ | ||
34 | - -I/usr/include/android \ | ||
35 | + -I/usr/include/android -I$(OUT_DIR)/usr/include \ | ||
36 | -D_GNU_SOURCE -DFEC_NO_KLOG -DSQUASHFS_NO_KLOG -D_LARGEFILE64_SOURCE | ||
37 | LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 \ | ||
38 | -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ | ||
39 | - -L/usr/lib/$(DEB_HOST_MULTIARCH)/android \ | ||
40 | + -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ \ | ||
41 | -lbase -lsparse -lselinux | ||
42 | |||
43 | build: $(SOURCES) | ||
44 | - mkdir --parents $(OUT_DIR) | ||
45 | - $(CC) $^ -o $(OUT_DIR)/$(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) | ||
46 | - ln -s $(NAME).so.0 $(OUT_DIR)/$(NAME).so | ||
47 | + mkdir --parents $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ | ||
48 | + $(CC) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) | ||
49 | + ln -sf $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so | ||
50 | + cp -r ext4_utils/include/* $(OUT_DIR)/usr/include/ | ||
51 | + | ||
52 | -- | ||
53 | 2.36.1.vfs.0.0 | ||
54 | |||