Skip to contentSkip to conversation

package/yaml-cpp: build shared library if needed

PATCH New Fabrice Fontaine 2 participants 2 messages Apr 21, 2020

lore
Share & tools
lore
#0 lore raw

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

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

---
 package/yaml-cpp/yaml-cpp.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/yaml-cpp/yaml-cpp.mk +6 -0
index 906e554ed7..beb8d6f55f 100644
@@ -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))
Signature · 1 line
2.25.1
#1 lore raw

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

Quoted 9 lines · On Tue, 21 Apr 2020 20:35:43 +0200 Fabrice Fontaine…

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

---
 package/yaml-cpp/yaml-cpp.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com