diff options
Diffstat (limited to 'meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0002-android-tools-modifications-to-make-it-build-in-yoct.patch')
-rw-r--r-- | meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0002-android-tools-modifications-to-make-it-build-in-yoct.patch | 106 |
1 files changed, 92 insertions, 14 deletions
diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0002-android-tools-modifications-to-make-it-build-in-yoct.patch b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0002-android-tools-modifications-to-make-it-build-in-yoct.patch index b719acec4c..a35428b5b4 100644 --- a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0002-android-tools-modifications-to-make-it-build-in-yoct.patch +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/0002-android-tools-modifications-to-make-it-build-in-yoct.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From fe211cbc305a9316c1d4da2f086d6a50f1c92188 Mon Sep 17 00:00:00 2001 | 1 | From 194513bababa9707ec54bc7119613a0d5eca9f79 Mon Sep 17 00:00:00 2001 |
2 | From: Etienne Cordonnier <ecordonnier@snap.com> | 2 | From: Etienne Cordonnier <ecordonnier@snap.com> |
3 | Date: Fri, 17 Mar 2023 10:33:11 +0100 | 3 | Date: Fri, 17 Mar 2023 10:33:11 +0100 |
4 | Subject: [PATCH] android-tools: modifications to make it build in yocto | 4 | Subject: [PATCH] android-tools: modifications to make it build in yocto |
@@ -12,27 +12,47 @@ Subject: [PATCH] android-tools: modifications to make it build in yocto | |||
12 | 12 | ||
13 | Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> | 13 | Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> |
14 | 14 | ||
15 | --- | 15 | - fix warning: library search path "/usr/lib/p7zip" is unsafe for cross-compilation |
16 | Upstream-Status: Pending | ||
17 | 16 | ||
17 | - fix error: include location "/usr/include/android" is unsafe for cross-compilation | ||
18 | |||
19 | Upstream-Status: Pending | ||
20 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
21 | --- | ||
22 | debian/development/etc1tool.mk | 1 - | ||
18 | debian/external/boringssl/libcrypto.mk | 1 + | 23 | debian/external/boringssl/libcrypto.mk | 1 + |
24 | debian/libnativehelper/libnativehelper.mk | 1 - | ||
25 | debian/system/core/adb.mk | 1 - | ||
19 | debian/system/core/append2simg.mk | 2 +- | 26 | debian/system/core/append2simg.mk | 2 +- |
20 | debian/system/core/fastboot.mk | 2 +- | 27 | debian/system/core/fastboot.mk | 3 +-- |
21 | debian/system/core/img2simg.mk | 2 +- | 28 | debian/system/core/img2simg.mk | 2 +- |
22 | debian/system/core/libbacktrace.mk | 8 ++++---- | 29 | debian/system/core/libbacktrace.mk | 10 ++++------ |
23 | debian/system/core/libbase.mk | 5 +++-- | 30 | debian/system/core/libbase.mk | 5 +++-- |
24 | debian/system/core/libcutils.mk | 5 +++-- | 31 | debian/system/core/libcutils.mk | 5 +++-- |
25 | debian/system/core/liblog.mk | 3 ++- | 32 | debian/system/core/liblog.mk | 3 ++- |
26 | debian/system/core/libsparse.mk | 5 +++-- | 33 | debian/system/core/libsparse.mk | 5 +++-- |
27 | debian/system/core/libutils.mk | 2 +- | 34 | debian/system/core/libutils.mk | 4 ++-- |
28 | debian/system/core/libziparchive.mk | 5 +++-- | 35 | debian/system/core/libziparchive.mk | 5 +++-- |
29 | debian/system/core/simg2img.mk | 2 +- | 36 | debian/system/core/simg2img.mk | 2 +- |
30 | debian/system/core/simg2simg.mk | 2 +- | 37 | debian/system/core/simg2simg.mk | 2 +- |
38 | debian/system/extras/libext4_utils.mk | 1 - | ||
31 | frameworks/native/libs/adbd_auth/adbd_auth.cpp | 2 ++ | 39 | frameworks/native/libs/adbd_auth/adbd_auth.cpp | 2 ++ |
32 | system/core/adb/adb_listeners.cpp | 12 ++++++------ | 40 | system/core/adb/adb_listeners.cpp | 12 ++++++------ |
33 | system/core/adb/transport_local.cpp | 2 +- | 41 | system/core/adb/transport_local.cpp | 2 +- |
34 | 16 files changed, 34 insertions(+), 26 deletions(-) | 42 | 20 files changed, 35 insertions(+), 34 deletions(-) |
35 | 43 | ||
44 | diff --git a/debian/development/etc1tool.mk b/debian/development/etc1tool.mk | ||
45 | index 2d787e98bb86..e03ac5f0048c 100644 | ||
46 | --- a/debian/development/etc1tool.mk | ||
47 | +++ b/debian/development/etc1tool.mk | ||
48 | @@ -4,7 +4,6 @@ SOURCES = development/tools/etc1tool/etc1tool.cpp | ||
49 | |||
50 | CXXFLAGS += -std=gnu++2a | ||
51 | CPPFLAGS += \ | ||
52 | - -I/usr/include/android \ | ||
53 | -Idevelopment/include \ | ||
54 | -Iframeworks/native/opengl/include \ | ||
55 | |||
36 | diff --git a/debian/external/boringssl/libcrypto.mk b/debian/external/boringssl/libcrypto.mk | 56 | diff --git a/debian/external/boringssl/libcrypto.mk b/debian/external/boringssl/libcrypto.mk |
37 | index c0ea54f4..b3a77bfd 100644 | 57 | index c0ea54f4..b3a77bfd 100644 |
38 | --- a/debian/external/boringssl/libcrypto.mk | 58 | --- a/debian/external/boringssl/libcrypto.mk |
@@ -45,6 +65,38 @@ index c0ea54f4..b3a77bfd 100644 | |||
45 | -Iexternal/boringssl/src/crypto \ | 65 | -Iexternal/boringssl/src/crypto \ |
46 | -Iexternal/boringssl/src/include \ | 66 | -Iexternal/boringssl/src/include \ |
47 | 67 | ||
68 | diff --git a/debian/libnativehelper/libnativehelper.mk b/debian/libnativehelper/libnativehelper.mk | ||
69 | index 7a0c94a6b7b5..880b2fdf9154 100644 | ||
70 | --- a/debian/libnativehelper/libnativehelper.mk | ||
71 | +++ b/debian/libnativehelper/libnativehelper.mk | ||
72 | @@ -11,7 +11,6 @@ OBJECTS = $(SOURCES:.cpp=.o) | ||
73 | |||
74 | CXXFLAGS += -std=gnu++2a | ||
75 | CPPFLAGS += \ | ||
76 | - -I/usr/include/android \ | ||
77 | -Ilibnativehelper/header_only_include \ | ||
78 | -Ilibnativehelper/include \ | ||
79 | -Ilibnativehelper/include_jni \ | ||
80 | diff --git a/debian/system/core/adb.mk b/debian/system/core/adb.mk | ||
81 | index 9769b68ab793..58c9a63bd225 100644 | ||
82 | --- a/debian/system/core/adb.mk | ||
83 | +++ b/debian/system/core/adb.mk | ||
84 | @@ -19,7 +19,6 @@ CPPFLAGS += \ | ||
85 | -D_GNU_SOURCE \ | ||
86 | -DADB_HOST=1 \ | ||
87 | -DADB_VERSION='"$(DEB_VERSION)"' \ | ||
88 | - -I/usr/include/android \ | ||
89 | -Iexternal/boringssl/include \ | ||
90 | -Isystem/core/adb \ | ||
91 | -Isystem/core/base/include \ | ||
92 | @@ -28,7 +27,6 @@ CPPFLAGS += \ | ||
93 | LDFLAGS += \ | ||
94 | -Ldebian/out/system/core \ | ||
95 | -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ | ||
96 | - -fuse-ld=gold \ | ||
97 | -lbase \ | ||
98 | -lcutils \ | ||
99 | -lpthread \ | ||
48 | diff --git a/debian/system/core/append2simg.mk b/debian/system/core/append2simg.mk | 100 | diff --git a/debian/system/core/append2simg.mk b/debian/system/core/append2simg.mk |
49 | index 1599bdb8..598c751d 100644 | 101 | index 1599bdb8..598c751d 100644 |
50 | --- a/debian/system/core/append2simg.mk | 102 | --- a/debian/system/core/append2simg.mk |
@@ -62,15 +114,24 @@ diff --git a/debian/system/core/fastboot.mk b/debian/system/core/fastboot.mk | |||
62 | index d5c9a285..a59ba1a4 100644 | 114 | index d5c9a285..a59ba1a4 100644 |
63 | --- a/debian/system/core/fastboot.mk | 115 | --- a/debian/system/core/fastboot.mk |
64 | +++ b/debian/system/core/fastboot.mk | 116 | +++ b/debian/system/core/fastboot.mk |
65 | @@ -49,7 +49,7 @@ CPPFLAGS += \ | 117 | @@ -30,7 +30,6 @@ CXXFLAGS += -std=gnu++2a -fpermissive |
118 | CPPFLAGS += \ | ||
119 | -D_FILE_OFFSET_BITS=64 \ | ||
120 | -DPLATFORM_TOOLS_VERSION='"$(PLATFORM_TOOLS_VERSION)"' \ | ||
121 | - -I/usr/include/android \ | ||
122 | -Iexternal/boringssl/include \ | ||
123 | -Iexternal/avb \ | ||
124 | -Isystem/core/adb \ | ||
125 | @@ -49,8 +48,7 @@ CPPFLAGS += \ | ||
66 | 126 | ||
67 | LDFLAGS += \ | 127 | LDFLAGS += \ |
68 | -Ldebian/out/system/core \ | 128 | -Ldebian/out/system/core \ |
69 | - -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ | 129 | - -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ |
130 | - -fuse-ld=gold \ | ||
70 | + -Wl,-rpath='$$ORIGIN/../lib/android' \ | 131 | + -Wl,-rpath='$$ORIGIN/../lib/android' \ |
71 | -fuse-ld=gold \ | ||
72 | -lbase \ | 132 | -lbase \ |
73 | -lcutils \ | 133 | -lcutils \ |
134 | -lpthread \ | ||
74 | diff --git a/debian/system/core/img2simg.mk b/debian/system/core/img2simg.mk | 135 | diff --git a/debian/system/core/img2simg.mk b/debian/system/core/img2simg.mk |
75 | index 11adf014..8baf5ba5 100644 | 136 | index 11adf014..8baf5ba5 100644 |
76 | --- a/debian/system/core/img2simg.mk | 137 | --- a/debian/system/core/img2simg.mk |
@@ -85,7 +146,7 @@ index 11adf014..8baf5ba5 100644 | |||
85 | -llog \ | 146 | -llog \ |
86 | -lpthread \ | 147 | -lpthread \ |
87 | diff --git a/debian/system/core/libbacktrace.mk b/debian/system/core/libbacktrace.mk | 148 | diff --git a/debian/system/core/libbacktrace.mk b/debian/system/core/libbacktrace.mk |
88 | index e3411d76..86e69874 100644 | 149 | index e3411d76..e7dd984c 100644 |
89 | --- a/debian/system/core/libbacktrace.mk | 150 | --- a/debian/system/core/libbacktrace.mk |
90 | +++ b/debian/system/core/libbacktrace.mk | 151 | +++ b/debian/system/core/libbacktrace.mk |
91 | @@ -1,4 +1,4 @@ | 152 | @@ -1,4 +1,4 @@ |
@@ -94,9 +155,11 @@ index e3411d76..86e69874 100644 | |||
94 | 155 | ||
95 | NAME = libbacktrace | 156 | NAME = libbacktrace |
96 | 157 | ||
97 | @@ -83,10 +84,9 @@ CPPFLAGS += \ | 158 | @@ -81,12 +81,10 @@ CPPFLAGS += \ |
159 | -Isystem/core/libunwindstack/include \ | ||
160 | |||
98 | LDFLAGS += \ | 161 | LDFLAGS += \ |
99 | -L/usr/lib/p7zip \ | 162 | - -L/usr/lib/p7zip \ |
100 | -Ldebian/out/system/core \ | 163 | -Ldebian/out/system/core \ |
101 | - -Wl,-rpath=/usr/lib/p7zip \ | 164 | - -Wl,-rpath=/usr/lib/p7zip \ |
102 | - -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ | 165 | - -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ |
@@ -107,7 +170,7 @@ index e3411d76..86e69874 100644 | |||
107 | -lbase \ | 170 | -lbase \ |
108 | -llog \ | 171 | -llog \ |
109 | -lpthread \ | 172 | -lpthread \ |
110 | @@ -101,7 +101,7 @@ endif | 173 | @@ -101,7 +99,7 @@ endif |
111 | build: $(OBJECTS_CXX) $(OBJECTS_ASSEMBLY) debian/out/external/libunwind/libunwind.a | 174 | build: $(OBJECTS_CXX) $(OBJECTS_ASSEMBLY) debian/out/external/libunwind/libunwind.a |
112 | mkdir -p debian/out/system/core | 175 | mkdir -p debian/out/system/core |
113 | $(CXX) $^ -o debian/out/system/core/$(NAME).so.0 $(LDFLAGS) | 176 | $(CXX) $^ -o debian/out/system/core/$(NAME).so.0 $(LDFLAGS) |
@@ -216,7 +279,7 @@ index c2b2694c..2da12b8e 100644 | |||
216 | $(OBJECTS): %.o: %.cpp | 279 | $(OBJECTS): %.o: %.cpp |
217 | $(CXX) -c -o $@ $< $(CXXFLAGS) $(CPPFLAGS) | 280 | $(CXX) -c -o $@ $< $(CXXFLAGS) $(CPPFLAGS) |
218 | diff --git a/debian/system/core/libutils.mk b/debian/system/core/libutils.mk | 281 | diff --git a/debian/system/core/libutils.mk b/debian/system/core/libutils.mk |
219 | index c37b1d2d..332492c1 100644 | 282 | index c37b1d2d..0c748c8b 100644 |
220 | --- a/debian/system/core/libutils.mk | 283 | --- a/debian/system/core/libutils.mk |
221 | +++ b/debian/system/core/libutils.mk | 284 | +++ b/debian/system/core/libutils.mk |
222 | @@ -1,4 +1,4 @@ | 285 | @@ -1,4 +1,4 @@ |
@@ -287,6 +350,18 @@ index ed53b04c..646ab030 100644 | |||
287 | -lbase \ | 350 | -lbase \ |
288 | -llog \ | 351 | -llog \ |
289 | -lpthread \ | 352 | -lpthread \ |
353 | diff --git a/debian/system/extras/libext4_utils.mk b/debian/system/extras/libext4_utils.mk | ||
354 | index 264bb95ad36a..99125097c8e3 100644 | ||
355 | --- a/debian/system/extras/libext4_utils.mk | ||
356 | +++ b/debian/system/extras/libext4_utils.mk | ||
357 | @@ -25,7 +25,6 @@ CPPFLAGS += \ | ||
358 | -D_LARGEFILE64_SOURCE \ | ||
359 | -DFEC_NO_KLOG \ | ||
360 | -DSQUASHFS_NO_KLOG \ | ||
361 | - -I/usr/include/android \ | ||
362 | -Isystem/core/base/include \ | ||
363 | -Isystem/core/libcutils/include \ | ||
364 | -Isystem/core/libsparse/include \ | ||
290 | diff --git a/frameworks/native/libs/adbd_auth/adbd_auth.cpp b/frameworks/native/libs/adbd_auth/adbd_auth.cpp | 365 | diff --git a/frameworks/native/libs/adbd_auth/adbd_auth.cpp b/frameworks/native/libs/adbd_auth/adbd_auth.cpp |
291 | index a9c23110..6ca334ba 100644 | 366 | index a9c23110..6ca334ba 100644 |
292 | --- a/frameworks/native/libs/adbd_auth/adbd_auth.cpp | 367 | --- a/frameworks/native/libs/adbd_auth/adbd_auth.cpp |
@@ -373,3 +448,6 @@ index c7261860..5988ec4d 100644 | |||
373 | auto it = local_transports.find(adb_port); | 448 | auto it = local_transports.find(adb_port); |
374 | if (it == local_transports.end()) { | 449 | if (it == local_transports.end()) { |
375 | return nullptr; | 450 | return nullptr; |
451 | -- | ||
452 | 2.34.1 | ||
453 | |||