summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dynamic-layers/selinux/android-tools/android-tools/core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch12
-rw-r--r--dynamic-layers/selinux/android-tools/android-tools/core/0010-patching-simg2img.mk-to-build-in-yocto-environment.patch12
2 files changed, 16 insertions, 8 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools/core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch b/dynamic-layers/selinux/android-tools/android-tools/core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch
index ad9b8dd..8ecfdbc 100644
--- a/dynamic-layers/selinux/android-tools/android-tools/core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch
+++ b/dynamic-layers/selinux/android-tools/android-tools/core/0009-patching-img2simg.mk-to-build-in-yocto-environment.patch
@@ -16,7 +16,12 @@ are searched in the output folder.
16 16
17Modified the build rule so that it outputs the binary to the OUT_DIR 17Modified the build rule so that it outputs the binary to the OUT_DIR
18 18
19Update LDFLAGS to use a relative rpath instead of a fixed location
20to ensure libraries are found at runtime relative to binary location.
21Link additional libraries which might help with dependency resolution.
22
19Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com> 23Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
24Signed-off-by: Bindu.Bhabu <bindu.bhabu@kpit.com>
20 25
21Upstream-Status: Pending 26Upstream-Status: Pending
22--- 27---
@@ -34,11 +39,10 @@ index f1036cef..94772381 100644
34 SOURCES := $(foreach source, $(SOURCES), libsparse/$(source)) 39 SOURCES := $(foreach source, $(SOURCES), libsparse/$(source))
35 CPPFLAGS += -Ilibsparse/include -Iinclude -std=gnu++17 40 CPPFLAGS += -Ilibsparse/include -Iinclude -std=gnu++17
36-LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ 41-LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
37- -Wl,-rpath-link=. \ 42+LDFLAGS += -Wl,-rpath='$$ORIGIN/../lib/android' \
43 -Wl,-rpath-link=. \
38- -L. -lsparse 44- -L. -lsparse
39+LDFLAGS += -Wl,-rpath=$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android \ 45+ -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ -lbase -llog -lpthread -lsparse
40+ -Wl,-rpath-link=$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ \
41+ -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ -lsparse
42 46
43 build: $(SOURCES) 47 build: $(SOURCES)
44- $(CXX) $^ -o libsparse/$(NAME) $(CPPFLAGS) $(LDFLAGS) 48- $(CXX) $^ -o libsparse/$(NAME) $(CPPFLAGS) $(LDFLAGS)
diff --git a/dynamic-layers/selinux/android-tools/android-tools/core/0010-patching-simg2img.mk-to-build-in-yocto-environment.patch b/dynamic-layers/selinux/android-tools/android-tools/core/0010-patching-simg2img.mk-to-build-in-yocto-environment.patch
index b7a72b8..f2f5598 100644
--- a/dynamic-layers/selinux/android-tools/android-tools/core/0010-patching-simg2img.mk-to-build-in-yocto-environment.patch
+++ b/dynamic-layers/selinux/android-tools/android-tools/core/0010-patching-simg2img.mk-to-build-in-yocto-environment.patch
@@ -16,7 +16,12 @@ are searched in the output folder.
16 16
17Modified the build rule so that it outputs the binary to the OUT_DIR 17Modified the build rule so that it outputs the binary to the OUT_DIR
18 18
19Update LDFLAGS to use a relative rpath instead of a fixed location
20to ensure libraries are found at runtime relative to binary location.
21Link additional libraries which might help with dependency resolution.
22
19Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com> 23Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
24Signed-off-by: Bhabu Bindu <bindu.bhabu@kpit.com>
20 25
21Upstream-Status: Pending 26Upstream-Status: Pending
22--- 27---
@@ -34,11 +39,10 @@ index 07fb56b4..d319c87e 100644
34 SOURCES := $(foreach source, $(SOURCES), libsparse/$(source)) 39 SOURCES := $(foreach source, $(SOURCES), libsparse/$(source))
35 CPPFLAGS += -Ilibsparse/include -Iinclude -std=gnu++17 40 CPPFLAGS += -Ilibsparse/include -Iinclude -std=gnu++17
36-LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ 41-LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
37- -Wl,-rpath-link=. \ 42+LDFLAGS += -Wl,-rpath='$$ORIGIN/../lib/android' \
43 -Wl,-rpath-link=. \
38- -L. -lsparse 44- -L. -lsparse
39+LDFLAGS += -Wl,-rpath=$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android \ 45+ -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ -lbase -llog -lpthread -lsparse
40+ -Wl,-rpath-link=$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android \
41+ -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android -lsparse
42 46
43 build: $(SOURCES) 47 build: $(SOURCES)
44- $(CXX) $^ -o libsparse/$(NAME) $(CPPFLAGS) $(LDFLAGS) 48- $(CXX) $^ -o libsparse/$(NAME) $(CPPFLAGS) $(LDFLAGS)