summaryrefslogtreecommitdiffstats
path: root/package/collectd
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2017-11-07 12:04:42 -0800
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-11-11 23:31:14 +0100
commitbdd8475b90fa46644149d34bf852b213ec60ce71 (patch)
tree759d60b72f1c4072e78d351351cecc7e7cc13fe0 /package/collectd
parent636f4d81ff4be52dc7818c51b9d479a9cb6ecea1 (diff)
downloadbuildroot-bdd8475b90fa46644149d34bf852b213ec60ce71.tar.gz
buildroot-bdd8475b90fa46644149d34bf852b213ec60ce71.zip
package/collectd: Specify FP layout based on endianness
Big-endian CPUs store floating point as big endian (at lest majority of them do), so, in order for 'network' plugin to work correctly (and potentially any user of htond() in collectd's codebase), --with-fp-layout=endianflip as opposed to --with-fp-layout=nothing needs to be specified during configuration phase. Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/collectd')
-rw-r--r--package/collectd/collectd.mk16
1 files changed, 15 insertions, 1 deletions
diff --git a/package/collectd/collectd.mk b/package/collectd/collectd.mk
index 626fba81bf..6c987b2e36 100644
--- a/package/collectd/collectd.mk
+++ b/package/collectd/collectd.mk
@@ -24,9 +24,23 @@ COLLECTD_PLUGINS_DISABLE = \
COLLECTD_CONF_ENV += LIBS="-lm"
+#
+# NOTE: There's also a third availible setting "intswap", which might
+# be needed on some old ARM hardware (see [2]), but is not being
+# accounted for as per discussion [1]
+#
+# [1] http://lists.busybox.net/pipermail/buildroot/2017-November/206100.html
+# [2] http://lists.busybox.net/pipermail/buildroot/2017-November/206251.html
+#
+ifeq ($(BR2_ENDIAN),"BIG")
+COLLECTD_FP_LAYOUT=endianflip
+else
+COLLECTD_FP_LAYOUT=nothing
+endif
+
COLLECTD_CONF_OPTS += \
--with-nan-emulation \
- --with-fp-layout=nothing \
+ --with-fp-layout=$(COLLECTD_FP_LAYOUT) \
--with-perl-bindings=no \
$(foreach p, $(COLLECTD_PLUGINS_DISABLE), --disable-$(p)) \
$(if $(BR2_PACKAGE_COLLECTD_AGGREGATION),--enable-aggregation,--disable-aggregation) \
OpenPOWER on IntegriCloud