[Buildroot] [Patch] Allow file to be built against static libs.
Peter Korsgaard
jacmet at uclibc.org
Tue Jul 19 20:22:56 UTC 2011
>>>>> "ANDY" == ANDY KENNEDY <ANDY.KENNEDY at adtran.com> writes:
ANDY> If selected "prefer static libs", file fails to build reporting:
ANDY> relocation R_X86_64_32S against `zcalloc' can not be used when making
ANDY> a shared object; recompile with -fPIC
ANDY> The suggested -fPIC doesn't work. The issue is that the default
ANDY> configure has --enable-shared --enable-static. This patch modifies
ANDY> the configure to disable shared when "prefer static libs" is selected.
ANDY> FILE_DEPENDENCIES = host-file zlib
ANDY> HOST_FILE_DEPENDENCIES = host-zlib
ANDY> +ifeq ($(BR2_PREFER_STATIC_LIB),y)
ANDY> +FILE_CONF_OPT = --disable-shared --enable-static
ANDY> +HOST_FILE_CONF_OPT = --disable-shared --enable-static
We indeed force --enable-shared --disable-static for host builds, but
that doesn't really matter. For target builds we use (see
package/Makefile.in) --enable-static --enable-shared when
PREFER_STATIC_LIB is enabled, so rather than something file specific, I
think it would make more sense to set that to --enable-static
--disable-shared instead.
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list