summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2017-06-07 19:50:04 (GMT)
committerPeter Korsgaard <peter@korsgaard.com>2017-06-07 20:10:00 (GMT)
commit6a1aa4e2daf0ecdcd2b454d162c8ade6c5bd5779 (patch)
treeab8e85c005556cb7900898008ad9b9fee6a5f691
parent8e7fbfca55f559637fa10b2bad17f62386156122 (diff)
downloadbuildroot-6a1aa4e2daf0ecdcd2b454d162c8ade6c5bd5779.tar.gz
buildroot-6a1aa4e2daf0ecdcd2b454d162c8ade6c5bd5779.tar.bz2
swupdate: fix build with older glibc
Add -lrt that is needed for clock_gettime() with glibc before 2.17. Fixes: http://autobuild.buildroot.net/results/034/0345814c0b0023e124992974c0600bdda0824dbf/ Cc: Jörg Krause <joerg.krause@embedded.rocks> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/swupdate/0002-Makefile.flags-SURICATTA_HAWKBIT-needs-librt-under-o.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/package/swupdate/0002-Makefile.flags-SURICATTA_HAWKBIT-needs-librt-under-o.patch b/package/swupdate/0002-Makefile.flags-SURICATTA_HAWKBIT-needs-librt-under-o.patch
new file mode 100644
index 0000000..1f8d8e7
--- /dev/null
+++ b/package/swupdate/0002-Makefile.flags-SURICATTA_HAWKBIT-needs-librt-under-o.patch
@@ -0,0 +1,34 @@
+From 66ccd99c6299ebe70a5549da78063fd7b1e02ea2 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Wed, 7 Jun 2017 22:28:03 +0300
+Subject: [PATCH] Makefile.flags: SURICATTA_HAWKBIT needs librt under older
+ glibc
+
+glibc before 2.17 requires linking against librt for clock_gettime(). Fixes
+the following build failure:
+
+ld: suricatta/lib.a(server_hawkbit.o): undefined reference to symbol 'clock_gettime@@GLIBC_2.2'
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status:
+https://groups.google.com/forum/?hl=en#!topic/swupdate/77QWIka27es
+
+ Makefile.flags | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.flags b/Makefile.flags
+index 391fc7f82682..8db5dfeacc2f 100644
+--- a/Makefile.flags
++++ b/Makefile.flags
+@@ -173,6 +173,7 @@ LDLIBS += crypto ssl
+ endif
+ endif
+ ifneq ($(CONFIG_SURICATTA_HAWKBIT),)
++LDLIBS += rt
+ ifeq ($(strip $(findstring json-c,$(LDLIBS))),)
+ LDLIBS += json-c
+ endif
+--
+2.11.0
+