[oe-commits] [meta-openembedded] 43/129: opensaf: Add -latomic to LDFLAGS

git at git.openembedded.org git at git.openembedded.org
Mon Sep 11 16:10:52 UTC 2017


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

martin_jansa pushed a commit to branch pyro-next
in repository meta-openembedded.

commit 794d74f603ba127cbeaf04d2cea4d85792b15d84
Author: Mingli Yu <Mingli.Yu at windriver.com>
AuthorDate: Mon May 22 17:42:08 2017 +0800

    opensaf: Add -latomic to LDFLAGS
    
    * Add "-Wl,--as-needed -latomic -Wl,--no-as-needed"
      to LDFLAGS to let the libatomic handled automatically
      if required to fix below build error as atomic
      operations on some arch such as x86 are supplied by
      the compiler. For other arch which lacks the instructions,
      a standardized external call provided by external library
      libatomic will be made to perform the operation.
    
      | src/amf/amfd/bin_osafamfd-main.o: In function `std::__atomic_base<unsigned long long>::load(std::memory_order) const':
      | $Prj/build/tmp/work/ppc7400-wrs-linux/opensaf/5.2.0-r0/recipe-sysroot/usr/include/c++/6.3.0/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
      | $Prj/build/tmp/work/ppc7400-wrs-linux/opensaf/5.2.0-r0/recipe-sysroot/usr/include/c++/6.3.0/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
      | collect2: error: ld returned 1 exit status
      | make[2]: *** [Makefile:8200: bin/osafamfd] Error 1
      | make[2]: *** Waiting for unfinished jobs....
      | make[2]: Leaving directory '$Prj/build/tmp/work/ppc7400-wrs-linux/opensaf/5.2.0-r0/build'
      | make[1]: *** [Makefile:19749: all-recursive] Error 1
      | make[1]: Leaving directory '$Prj/build/tmp/work/ppc7400-wrs-linux/opensaf/5.2.0-r0/build'
      | make: *** [Makefile:6175: all] Error 2
    
     Reference: https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary#line-23
    
    Signed-off-by: Mingli Yu <Mingli.Yu at windriver.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Joe MacDonald <joe_macdonald at mentor.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta-networking/recipes-daemons/opensaf/opensaf_5.2.0.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_5.2.0.bb b/meta-networking/recipes-daemons/opensaf/opensaf_5.2.0.bb
index babf03e..be79ba8 100644
--- a/meta-networking/recipes-daemons/opensaf/opensaf_5.2.0.bb
+++ b/meta-networking/recipes-daemons/opensaf/opensaf_5.2.0.bb
@@ -43,6 +43,8 @@ PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' sys
 
 PKGLIBDIR="${libdir}"
 
+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"

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


More information about the Openembedded-commits mailing list