patching libundwind to build in yocto environment.
|
|
Changes include:
|
Introduced an output folder which will keep all the outputs from the
|
android-tools.
|
|
Adding an include file that is setting the common flags.
|
Changed the cppflag to include the headers from other components
|
of android-tools
|
|
Modified LDflags so that the libraries that are coming from other android-tools
|
are searched in the output folder.
|
|
Modified the build rule so that it outputs the binary to the OUT_DIR
|
|
Passing the architecture details($CPU)from the recipe.
|
|
Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
|
|
Upstream-Status: Pending
|
|
--- git/external/libunwind/debian/libunwind.mk 2021-05-22 02:29:52.950324653 +0000
|
+++ git/external/libunwind/debian/libunwind.mk 2021-05-22 02:30:48.535322846 +0000
|
@@ -1,4 +1,4 @@
|
-include debian/detect_arch.mk
|
+include ../../rules_yocto.mk
|
|
ARCH_SOURCES = is_fpreg.c \
|
regname.c \
|
@@ -131,10 +131,12 @@
|
CPPFLAGS += -Iinclude -Isrc $($(CPU)_INCLUDES) -Idebian/include
|
LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 \
|
-Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
|
- -lpthread -nostdlib -lc -lgcc -Ldebian/out -l7z
|
+ -lpthread -nostdlib -lc -lgcc -l7z
|
|
build: $(SOURCES)
|
- mkdir --parents debian/out
|
- ln -s /usr/lib/p7zip/7z.so debian/out/lib7z.so
|
- $(CC) $^ -o debian/out/$(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
- ln -s $(NAME).so.0 debian/out/$(NAME).so
|
+ mkdir --parents $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/
|
+ mkdir --parents $(OUT_DIR)/usr/include/android/libunwind
|
+ $(CC) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -Wno-header-guard -Wno-absolute-value
|
+ ln -s $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so
|
+ cp -r include/* debian/include/* $(OUT_DIR)/usr/include/android/libunwind/
|
+
|