1From a99b74f25c7f786e26b5400218090d86596d4541 Mon Sep 17 00:00:00 2001 2From: Etienne Cordonnier <ecordonnier@snap.com> 3Date: Fri, 3 Mar 2023 13:40:32 +0100 4Subject: [PATCH 14/15] patching libbacktrace.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/libbacktrace.mk | 14 +++++++------- 24 1 file changed, 7 insertions(+), 7 deletions(-) 25 26diff --git a/debian/libbacktrace.mk b/debian/libbacktrace.mk 27index 330d211c..229b39d9 100644 28--- a/debian/libbacktrace.mk 29+++ b/debian/libbacktrace.mk 30@@ -1,5 +1,5 @@ 31 32-include /usr/share/dpkg/architecture.mk 33+include ../../rules_yocto.mk 34 35 NAME = libbacktrace 36 37@@ -88,11 +88,11 @@ CPPFLAGS += \ 38 -Ilibprocinfo/include \ 39 -Ilibunwindstack/include \ 40 -I/usr/include/android/lzma \ 41- -I/usr/include/android/unwind 42+ -I$(OUT_DIR)/usr/include/android/libunwind 43 LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 \ 44 -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ 45- -L/usr/lib/$(DEB_HOST_MULTIARCH)/android -lunwind \ 46- -L. -lbase -llog -lpthread -l7z 47+ -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android -lunwind \ 48+ -lbase -llog -lpthread -l7z 49 50 # -latomic should be the last library specified 51 # https://github.com/android/ndk/issues/589 52@@ -104,11 +104,11 @@ ifeq ($(DEB_HOST_ARCH), mipsel) 53 endif 54 55 build: $(COBJECTS) $(CXXOBJECTS) $(OBJECTS_ASSEMBLY) 56- $(CXX) $^ -o $(NAME).so.0 $(LDFLAGS) 57- ln -s $(NAME).so.0 $(NAME).so 58+ $(CXX) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(LDFLAGS) 59+ ln -sf $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(NAME).so 60 61 clean: 62- $(RM) $(COBJECTS) $(CXXOBJECTS) $(NAME).so* 63+ $(RM) $(COBJECTS) $(CXXOBJECTS) $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so* 64 65 $(CXXOBJECTS): %.o: %.cpp 66 $(CXX) $< -o $@ $(CXXFLAGS) $(CPPFLAGS) 67-- 682.36.1.vfs.0.0 69 70