Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/redis: fix static linking with libatomic
@ 2017-05-25  7:19 Bernd Kuhls
  2017-05-28 14:37 ` Thomas Petazzoni
  2017-06-01 14:25 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Bernd Kuhls @ 2017-05-25  7:19 UTC (permalink / raw)
  To: buildroot

Fixes
http://autobuild.buildroot.net/results/7f1/7f1ecccbfdb6bd95824d9c884f1577e71e0e1e09/
http://autobuild.buildroot.net/results/c0b/c0b1bdcc5fbddf8b996b923015184d753882d4b8/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/redis/redis.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/redis/redis.mk b/package/redis/redis.mk
index 3f4956cf3..2a5012812 100644
--- a/package/redis/redis.mk
+++ b/package/redis/redis.mk
@@ -14,8 +14,14 @@ define REDIS_USERS
 endef
 
 # Uses __atomic_fetch_add_4
+# src/Makefile contains a wrong linking order which breaks linking
+# for static builds. We need to add -latomic to FINAL_LIBS to provide
+# -latomic at the correct place in the linking command.
 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-REDIS_LIBATOMIC = -latomic
+define REDIS_FIX_MAKEFILE
+	$(SED) 's/FINAL_LIBS=-lm/FINAL_LIBS=-lm -latomic/' $(@D)/src/Makefile
+endef
+REDIS_POST_PATCH_HOOKS = REDIS_FIX_MAKEFILE
 endif
 
 # Redis doesn't support DESTDIR (yet, see
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-01 14:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-25  7:19 [Buildroot] [PATCH 1/1] package/redis: fix static linking with libatomic Bernd Kuhls
2017-05-28 14:37 ` Thomas Petazzoni
2017-06-01 14:25 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox