diff mbox series

[1/1] package/yaml-cpp: build shared library if needed

Message ID 20200421183543.4135516-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/yaml-cpp: build shared library if needed | expand

Commit Message

Fabrice Fontaine April 21, 2020, 6:35 p.m. UTC
yaml-cpp builds only a static library by default, this will raise a
build failure with upcoming mongodb 4.2.x as reported by Ryan Barnett
due to mongodb linking with a static library that obviously will miss
-fPIC

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/yaml-cpp/yaml-cpp.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Thomas Petazzoni April 21, 2020, 7:37 p.m. UTC | #1
On Tue, 21 Apr 2020 20:35:43 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> yaml-cpp builds only a static library by default, this will raise a
> build failure with upcoming mongodb 4.2.x as reported by Ryan Barnett
> due to mongodb linking with a static library that obviously will miss
> -fPIC
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/yaml-cpp/yaml-cpp.mk | 6 ++++++
>  1 file changed, 6 insertions(+)

Applied to master, thanks.

Thomas
diff mbox series

Patch

diff --git a/package/yaml-cpp/yaml-cpp.mk b/package/yaml-cpp/yaml-cpp.mk
index 906e554ed7..beb8d6f55f 100644
--- a/package/yaml-cpp/yaml-cpp.mk
+++ b/package/yaml-cpp/yaml-cpp.mk
@@ -15,4 +15,10 @@  YAML_CPP_CONF_OPTS += \
 	-DYAML_CPP_BUILD_TESTS=OFF \
 	-DYAML_CPP_BUILD_TOOLS=OFF
 
+ifeq ($(BR2_STATIC_LIBS),y)
+YAML_CPP_CONF_OPTS += -DYAML_BUILD_SHARED_LIBS=OFF
+else
+YAML_CPP_CONF_OPTS += -DYAML_BUILD_SHARED_LIBS=ON
+endif
+
 $(eval $(cmake-package))