diff options
Diffstat (limited to 'dynamic-layers/selinux/android-tools/android-tools/libunwind_mk_change_out_dir.patch')
-rw-r--r-- | dynamic-layers/selinux/android-tools/android-tools/libunwind_mk_change_out_dir.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools/libunwind_mk_change_out_dir.patch b/dynamic-layers/selinux/android-tools/android-tools/libunwind_mk_change_out_dir.patch new file mode 100644 index 0000000..237d45c --- /dev/null +++ b/dynamic-layers/selinux/android-tools/android-tools/libunwind_mk_change_out_dir.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | patching libundwind 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 | Passing the architecture details($CPU)from the recipe. | ||
17 | |||
18 | Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com> | ||
19 | |||
20 | Upstream-Status: Pending | ||
21 | |||
22 | --- git/external/libunwind/debian/libunwind.mk 2021-05-22 02:29:52.950324653 +0000 | ||
23 | +++ git/external/libunwind/debian/libunwind.mk 2021-05-22 02:30:48.535322846 +0000 | ||
24 | @@ -1,4 +1,4 @@ | ||
25 | -include debian/detect_arch.mk | ||
26 | +include ../../rules_yocto.mk | ||
27 | |||
28 | ARCH_SOURCES = is_fpreg.c \ | ||
29 | regname.c \ | ||
30 | @@ -131,10 +131,12 @@ | ||
31 | CPPFLAGS += -Iinclude -Isrc $($(CPU)_INCLUDES) -Idebian/include | ||
32 | LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 \ | ||
33 | -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ | ||
34 | - -lpthread -nostdlib -lc -lgcc -Ldebian/out -l7z | ||
35 | + -lpthread -nostdlib -lc -lgcc -l7z | ||
36 | |||
37 | build: $(SOURCES) | ||
38 | - mkdir --parents debian/out | ||
39 | - ln -s /usr/lib/p7zip/7z.so debian/out/lib7z.so | ||
40 | - $(CC) $^ -o debian/out/$(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) | ||
41 | - ln -s $(NAME).so.0 debian/out/$(NAME).so | ||
42 | + mkdir --parents $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ | ||
43 | + mkdir --parents $(OUT_DIR)/usr/include/android/libunwind | ||
44 | + $(CC) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -Wno-header-guard -Wno-absolute-value | ||
45 | + ln -s $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so | ||
46 | + cp -r include/* debian/include/* $(OUT_DIR)/usr/include/android/libunwind/ | ||
47 | + | ||