This adds a versioned soname to the shared library during linking.
Otherwise an application linked with '-lmcc' needs libmcc.so for execution,
having libmcc.so.1 would not be enough.

root@colibri-vf:~# ls -l /usr/lib/libmcc.so*
lrwxrwxrwx    1 root     root            13 Jan  7  2015 /usr/lib/libmcc.so.1 
-> libmcc.so.1.0
-rwxr-xr-x    1 root     root          5252 Jan  7  2015 /usr/lib/libmcc.so.1.0

root@colibri-vf:~# mcc-pingpong
mcc-pingpong: error while loading shared libraries: libmcc.so: cannot open 
shared object file: No such file or directory

Additionaly the following warning no longer appears.
WARNING: QA Issue: mcc-pingpong requires libmcc.so, but no providers in its 
RDEPENDS [file-rdeps]

Signed-off-by: Max Krummenacher <[email protected]>
---
 .../libmcc/libmcc/build-with-versioned-soname.patch    | 18 ++++++++++++++++++
 recipes-bsp/libmcc/libmcc_1.05.bb                      |  3 ++-
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 recipes-bsp/libmcc/libmcc/build-with-versioned-soname.patch

diff --git a/recipes-bsp/libmcc/libmcc/build-with-versioned-soname.patch 
b/recipes-bsp/libmcc/libmcc/build-with-versioned-soname.patch
new file mode 100644
index 0000000..d004b78
--- /dev/null
+++ b/recipes-bsp/libmcc/libmcc/build-with-versioned-soname.patch
@@ -0,0 +1,18 @@
+libmcc: build with versioned soname
+
+This adds a versioned soname to the shared library during linking.
+Otherwise an application linked with '-lmcc' needs libmcc.so for execution,
+having libmcc.so.1 would not be enough.
+
+Signed-off-by: Max Krummenacher <[email protected]>
+--- a/Makefile 2015-01-07 17:09:13.657675270 +0100
++++ b/Makefile 2015-01-07 17:21:19.457545709 +0100
+@@ -8,7 +8,7 @@
+       $(AR) rcs $@ $<
+ 
+ build/libmcc.so.1.0: build/libmcc.o
+-      $(CC) -shared -o $@  $<
++      $(CC) -shared -Wl,-soname,libmcc.so.1 -o $@ $< -lc
+ 
+ install:
+       mkdir -p $(DESTDIR)/usr/include $(DESTDIR)/usr/lib
diff --git a/recipes-bsp/libmcc/libmcc_1.05.bb 
b/recipes-bsp/libmcc/libmcc_1.05.bb
index 82507a6..bec2660 100644
--- a/recipes-bsp/libmcc/libmcc_1.05.bb
+++ b/recipes-bsp/libmcc/libmcc_1.05.bb
@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=c49712341497d0b5f2e40c30dff2af9d"
 DEPENDS = "kernel-module-mcc"
 
 SRC_URI = 
"http://repository.timesys.com/buildsources/l/libmcc/libmcc-${PV}/libmcc-${PV}.tar.bz2
 \
-           file://build-Fix-symlink-generation.patch"
+           file://build-Fix-symlink-generation.patch \
+           file://build-with-versioned-soname.patch"
 
 SRC_URI[md5sum] = "cc3965f162dd20b8e6b9babf5dd963ee"
 SRC_URI[sha256sum] = 
"b98c1f857bf851e41c35c4fcdb823e83e0e058c746dffb50038c8759c8c1e104"
-- 
1.9.3

-- 
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to