[oe-commits] [meta-openembedded] 02/03: opensaf: Fix duplicate copies of shared libs in package

git at git.openembedded.org git at git.openembedded.org
Sat Sep 28 19:50:03 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 6ef2e5a28059c9a4889a405a35dd0a1bee9c06c6
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Fri Sep 27 14:41:11 2019 -0700

    opensaf: Fix duplicate copies of shared libs in package
    
    some plugins are installed into libdir/opensaf but we were making a copy
    into libdir as well, this patch changes that so the packaged files are
    appearing only once
    
    create_empty_library should be using cross compiler with linker flags,
    existig code in this area is not cross compile friendly
    
    skip dev-elf QA test since some .so are stubs
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 ...y_library-Use-CC-variable-intead-of-hardc.patch | 23 ++++++++++++++++++++++
 .../recipes-daemons/opensaf/opensaf_5.19.07.bb     |  6 ++++--
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch
new file mode 100644
index 0000000..21abcf7
--- /dev/null
+++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch
@@ -0,0 +1,23 @@
+From 300fd3e27e71a91fc52d3f985ed4fde548852853 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 27 Sep 2019 12:50:11 -0700
+Subject: [PATCH] create_empty_library: Use CC variable intead of hardcoding
+ gcc
+
+This ensures that cross-compiles can succeed, otherwise we get wrong
+architecture on these stub libraries
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ scripts/create_empty_library | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/scripts/create_empty_library
++++ b/scripts/create_empty_library
+@@ -66,4 +66,4 @@ for s in $symbols; do
+     echo "SaAisErrorT $s() { return SA_AIS_ERR_UNAVAILABLE; }" >> "$tmpdir/lib.c"
+ done
+ rm -f "$1"
+-gcc -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1"
++$CC -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1" $LDFLAGS
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_5.19.07.bb b/meta-networking/recipes-daemons/opensaf/opensaf_5.19.07.bb
index 3df6824..7ce54c3 100644
--- a/meta-networking/recipes-daemons/opensaf/opensaf_5.19.07.bb
+++ b/meta-networking/recipes-daemons/opensaf/opensaf_5.19.07.bb
@@ -25,6 +25,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
            file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \
            file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \
            file://0001-Add-configure-time-check-for-gettid-API.patch \
+           file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \
            "
 SRC_URI[md5sum] = "e9ae9de803a99b7ab33757a49858542f"
 SRC_URI[sha256sum] = "caed672d03ab1fe3f27d333429c7ca03022714e7c6350500208b7bd7349f03ce"
@@ -44,13 +45,11 @@ PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi"
 
 PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
 
-PKGLIBDIR="${libdir}"
 CPPFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation"
 CXXFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation -Wno-error=format-truncation="
 LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
 
 do_install_append() {
-    cp -av --no-preserve=ownership ${B}/lib/.libs/*.so* ${D}${libdir}
     rm -fr "${D}${localstatedir}/lock"
     rm -fr "${D}${localstatedir}/run"
     rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
@@ -70,3 +69,6 @@ RDEPENDS_${PN} += "bash python"
 
 # http://errors.yoctoproject.org/Errors/Details/186970/
 COMPATIBLE_HOST_libc-musl = 'null'
+
+INSANE_SKIP_${PN}-dev += "dev-elf"
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list