* [Buildroot] [PATCH] cjson: link with libm, unavailable for static
@ 2013-10-30 19:03 Gustavo Zacarias
2013-10-30 21:46 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo Zacarias @ 2013-10-30 19:03 UTC (permalink / raw)
To: buildroot
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>
---
package/cjson/Config.in | 2 ++
package/cjson/cjson.mk | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/cjson/Config.in b/package/cjson/Config.in
index ff90074..fed61d7 100644
--- a/package/cjson/Config.in
+++ b/package/cjson/Config.in
@@ -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.
diff --git a/package/cjson/cjson.mk b/package/cjson/cjson.mk
index 7e1d72d..2093b02 100644
--- a/package/cjson/cjson.mk
+++ b/package/cjson/cjson.mk
@@ -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
--
1.8.1.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] cjson: link with libm, unavailable for static
2013-10-30 19:03 [Buildroot] [PATCH] cjson: link with libm, unavailable for static Gustavo Zacarias
@ 2013-10-30 21:46 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2013-10-30 21:46 UTC (permalink / raw)
To: buildroot
Dear Gustavo Zacarias,
On Wed, 30 Oct 2013 16:03:31 -0300, Gustavo Zacarias wrote:
> 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>
Applied to for-peter-2013.11, thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-30 21:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30 19:03 [Buildroot] [PATCH] cjson: link with libm, unavailable for static Gustavo Zacarias
2013-10-30 21:46 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox