diff mbox series

[oe,meta-multimedia,3/3] libmusicbrainz: Set CMAKE_EXE_LINKER_FLAGS to build linker flags

Message ID 20180523223928.21302-3-raj.khem@gmail.com
State Accepted
Commit d986db60835473118d793dcadaa6aac622bdbd5f
Headers show
Series [oe,meta-oe,1/3] procmail: Use build ldflags when invoking native compile/link | expand

Commit Message

Khem Raj May 23, 2018, 10:39 p.m. UTC
Some older compilers do not support security flags like -fstack-protector=strong
and if we do not set this then it will use the target flags to pass here
which will fail with gcc < 5.x, especially a problem building distros with
security flags on host with 4.x gcc e.g. ubuntu 14.04

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../recipes-multimedia/musicbrainz/libmusicbrainz_git.bb      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.17.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-multimedia/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb b/meta-multimedia/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
index 16e52134bd..ca9d94a19c 100644
--- a/meta-multimedia/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
+++ b/meta-multimedia/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
@@ -22,10 +22,12 @@  do_configure_prepend() {
     git clean -dfx -e /.pc/ -e /patches/ .
     mkdir build-native
     cd build-native
-    cmake -DCMAKE_C_FLAGS=${BUILD_CFLAGS} \
+    LDFLAGS="${BUILD_LDFLAGS}" \
+          cmake -DCMAKE_C_FLAGS=${BUILD_CFLAGS} \
           -DCMAKE_C_COMPILER=${BUILD_CC} \
           -DCMAKE_CXX_FLAGS=${BUILD_CXXFLAGS} \
           -DCMAKE_CXX_COMPILER=${BUILD_CXX} \
+          -DCMAKE_EXE_LINKER_FLAGS=${BUILD_LDFLAGS} \
           ..
     make make-c-interface
     cd ..