cjson: link with libm, unavailable for static
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Wed, 30 Oct 2013 19:03:31 +0000 (16:03 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 30 Oct 2013 21:46:18 +0000 (22:46 +0100)
Link with libm as stated in the README, fixes:
http://autobuild.buildroot.net/results/57f/57fc124e14263ee2447e20a5b910ed3ae0a5b7db/

Also disable the package for static builds since it doesn't work that
way.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/cjson/Config.in
package/cjson/cjson.mk

index ff9007477ac4dd9d8cab7923688c7bf2053f0a82..fed61d76c77b1e5b8606e860bfc41bcdd6354bb6 100644 (file)
@@ -1,5 +1,7 @@
 config BR2_PACKAGE_CJSON
        bool "cJSON"
+       # For static build with cJSON.c directly see README
+       depends on !BR2_PREFER_STATIC_LIB
        help
          An ultra-lightweight, portable, single-file, simple-as-can-be ANSI-C
          compliant JSON parser, under MIT license.
index 7e1d72df8c831686f5d565c0ad73fb425a71f5df..2093b02d7aa8ab1ce9c0aa07b432569868271a7f 100644 (file)
@@ -12,7 +12,8 @@ CJSON_LICENSE         = MIT
 CJSON_LICENSE_FILES   = LICENSE
 
 define CJSON_BUILD_CMDS
-       cd $(@D) && $(TARGET_CC) $(TARGET_CFLAGS) -shared -fPIC cJSON.c -o libcJSON.so
+       cd $(@D) && $(TARGET_CC) $(TARGET_CFLAGS) -shared -fPIC -lm \
+               cJSON.c -o libcJSON.so
 endef
 
 define CJSON_INSTALL_STAGING_CMDS