[Buildroot] [PATCH] stress: honor the BR2_PREFER_STATIC_LIB preference

Peter Korsgaard jacmet at uclibc.org
Mon Mar 4 16:15:01 UTC 2013

>>>>> "T" == Tzu-Jung Lee <roylee17 at gmail.com> writes:

 T>     ifeq ($(BR2_PREFER_STATIC_LIB),y)
 T>     SHARED_STATIC_LIBS_OPTS=--enable-static --disable-shared
 T>     TARGET_LDFLAGS += --static
 T>     else
 T>     SHARED_STATIC_LIBS_OPTS=--enable-static --enable-shared
 T>     endif

 T> As you indicated, the --enable-static is given anyway in the
 T> SHARED_STATIC_LIBS_OPTS.  Unfortunately, as long as the
 T> --enable-static is given, stress links the program statically,
 T> regardless how the --enable-shared or --disable-shared.  In this
 T> case, stress would be linked statically regardless how the
 T> BR2_PREFER_STATIC_LIB specifies.  So we need the patch to explicitly
 T> tell it link the program dynamically by appending/overriding with
 T> --disable-static.

So you only need to pass --disable-static if !BR2_PREFER_STATIC_LIB?
Could you please resend with a patch only doing that and a comment above
it explaining why?

Bye, Peter Korsgaard

More information about the buildroot mailing list