]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
aiccu: really fix static linking
authorPeter Korsgaard <peter@korsgaard.com>
Tue, 1 Oct 2013 19:18:52 +0000 (21:18 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 1 Oct 2013 19:19:42 +0000 (21:19 +0200)
It seems like I forgot to amend before pushing :/

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/aiccu/aiccu-0002-makefile-reorder-linked-libraries.patch
package/aiccu/aiccu.mk

index cc189b29c6e20e3b74b0a6e086ef95f140dc2f38..22f04a91a4f19e9a833ca84e15496a1d48ab5453 100644 (file)
@@ -1,18 +1,9 @@
-Makefile: changed LDFLAGS contents and order on the compile line for --static
+Makefile: change LDFLAGS order on the compile line for --static
 
 Signed-off-by: Michael Rommel <rommel@layer-7.net>
 
 --- aiccu_20070115.orig/unix-console/Makefile  2007-01-15 12:04:27.000000000 +0100
 +++ aiccu_20070115/unix-console/Makefile       2013-09-29 22:54:42.742963861 +0200
-@@ -42,7 +42,7 @@ CFLAGS       += -D AICCU_CONSOLE
- # Currently defaultly builds only on Linux, but other platforms might easily also support it
- ifeq ($(shell uname | grep -c "Linux"),1)
- CFLAGS        += -D AICCU_GNUTLS
--LDFLAGS += -lgnutls
-+LDFLAGS += -lgnutls -lhogweed -lnettle -lgmp -lz
- endif
- # Linux
 @@ -144,7 +144,7 @@ endif
  all: aiccu
  
index 2c546447284404c5f47e2119f8f54a4dfc070f2e..d698fa7a8a5e1511f712008be482c8b15aba5968 100644 (file)
@@ -11,10 +11,18 @@ AICCU_LICENSE = SixXS License, concise redistribution license
 AICCU_LICENSE_FILES = doc/LICENSE
 AICCU_DEPENDENCIES = gnutls
 
+AICCU_LFDLAGS = $(TARGET_LDFLAGS)
+
+# aiccu forgets to link with gnutls' dependencies breaking the build when
+# linking statically
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+AICCU_LDFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --static --libs gnutls)
+endif
+
 # dummy RPM_OPT_FLAGS to disable stripping
 define AICCU_BUILD_CMDS
-       $(TARGET_CONFIGURE_OPTS) $(MAKE) CC="$(TARGET_CC)" \
-               RPM_OPT_FLAGS=1 -C $(@D)/unix-console all
+       $(TARGET_CONFIGURE_OPTS) LDFLAGS="$(AICCU_LDFLAGS)" $(MAKE) \
+               CC="$(TARGET_CC)" RPM_OPT_FLAGS=1 -C $(@D)/unix-console all
 endef
 
 define AICCU_INSTALL_TARGET_CMDS