diff options
Diffstat (limited to 'dynamic-layers/selinux/android-tools/android-tools/adb_mk_change_out_dir.patch')
-rw-r--r-- | dynamic-layers/selinux/android-tools/android-tools/adb_mk_change_out_dir.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools/adb_mk_change_out_dir.patch b/dynamic-layers/selinux/android-tools/android-tools/adb_mk_change_out_dir.patch new file mode 100644 index 0000000..8c07e13 --- /dev/null +++ b/dynamic-layers/selinux/android-tools/android-tools/adb_mk_change_out_dir.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | patching adb.mk to build in yocto environment. | ||
2 | |||
3 | Changes include: | ||
4 | Introduced an output folder which will keep all the outputs from the | ||
5 | android-tools. | ||
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 to the OUT_DIR | ||
15 | |||
16 | Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com> | ||
17 | |||
18 | Upstream-Status: Pending | ||
19 | --- git/system/core/debian/adb.mk 2021-04-29 21:11:00.617892503 +0200 | ||
20 | +++ git/system/core/debian/adb.mk 2021-04-29 21:17:33.256016600 +0200 | ||
21 | @@ -1,3 +1,4 @@ | ||
22 | +include ../../rules_yocto.mk | ||
23 | NAME = adb | ||
24 | |||
25 | SOURCES = client/adb_client.cpp \ | ||
26 | @@ -12,10 +13,10 @@ | ||
27 | |||
28 | SOURCES := $(foreach source, $(SOURCES), adb/$(source)) | ||
29 | CXXFLAGS += -std=gnu++2a | ||
30 | -CPPFLAGS += -Iinclude -Iadb -Ibase/include \ | ||
31 | +CPPFLAGS += -Iinclude -Iadb -Ibase/include -I$(OUT_DIR)/usr/include/ \ | ||
32 | -DADB_VERSION='"$(DEB_VERSION)"' -DADB_HOST=1 -D_GNU_SOURCE | ||
33 | -LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android -Wl,-rpath-link=. \ | ||
34 | - -lpthread -L. -ladb -lbase | ||
35 | +LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android -Wl,-rpath-link=$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ \ | ||
36 | + -lpthread -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ -ladb -lbase | ||
37 | |||
38 | # -latomic should be the last library specified | ||
39 | # https://github.com/android/ndk/issues/589 | ||
40 | @@ -24,7 +25,8 @@ | ||
41 | endif | ||
42 | |||
43 | build: $(SOURCES) | ||
44 | - $(CXX) $^ -o adb/$(NAME) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) | ||
45 | + mkdir --parents $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/adb | ||
46 | + $(CXX) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/adb/$(NAME) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) | ||
47 | |||
48 | clean: | ||
49 | - $(RM) adb/$(NAME) | ||
50 | + $(RM) $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/adb/$(NAME) | ||