Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Patch] Allow file to be built against static libs.
@ 2011-07-19 19:48 ANDY KENNEDY
  2011-07-19 20:22 ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: ANDY KENNEDY @ 2011-07-19 19:48 UTC (permalink / raw)
  To: buildroot

If selected "prefer static libs", file fails to build reporting:
relocation R_X86_64_32S against `zcalloc' can not be used when making
a shared object; recompile with -fPIC
The suggested -fPIC doesn't work.  The issue is that the default
configure has --enable-shared --enable-static.  This patch modifies
the configure to disable shared when "prefer static libs" is selected.

Signed-off-by Andy Kennedy <Andy.Kennedy@Adtran.com>
---
diff -Naur a/package/file/file.mk b/package/file/file.mk
--- a/package/file/file.mk	2011-03-14 10:39:51.000000000 -0500
+++ b/package/file/file.mk	2011-07-19 14:36:32.000000000 -0500
@@ -9,6 +9,11 @@
 FILE_DEPENDENCIES = host-file zlib
 HOST_FILE_DEPENDENCIES = host-zlib

+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+FILE_CONF_OPT = --disable-shared --enable-static
+HOST_FILE_CONF_OPT = --disable-shared --enable-static
+endif
+
 define FILE_UNINSTALL_TARGET_CMDS
 	$(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(FILE_DIR)
 	rm -f $(TARGET_DIR)/usr/lib/libmagic.*

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

end of thread, other threads:[~2011-07-20 21:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19 19:48 [Buildroot] [Patch] Allow file to be built against static libs ANDY KENNEDY
2011-07-19 20:22 ` Peter Korsgaard
2011-07-19 20:42   ` Thomas Petazzoni
2011-07-19 21:01   ` Peter Korsgaard
2011-07-20  4:53     ` ANDY KENNEDY
2011-07-20 21:51       ` Peter Korsgaard

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