stress: honor the BR2_PREFER_STATIC_LIB preference
authorroylee17 <roylee17@gmail.com>
Mon, 4 Mar 2013 07:47:20 +0000 (07:47 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 4 Mar 2013 19:58:39 +0000 (20:58 +0100)
Stress is linked statically if the --enable-static is specified.
However, this option is always specified in the global
SHARED_STATIC_LIBS_OPTS to tell packages to build static libraries,
if supported.

If the BR2_PREFER_STATIC_LIB is not defined, we have to specify
--disable-static explicitly to get stress linked dynamically.

Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/stress/stress.mk

index 3a047b56912a654febb306912bbe83a115a3b485..a20b0c6f6531db55af487bd33c53c01744bceb94 100644 (file)
@@ -10,4 +10,14 @@ STRESS_VERSION = 1.0.4
 STRESS_SITE    = http://weather.ou.edu/~apw/projects/stress
 STRESS_AUTORECONF = YES
 
+# Stress is linked statically if the --enable-static is specified.
+# However, this option is always specified in the global
+# SHARED_STATIC_LIBS_OPTS to tell packages to build static libraries,
+# if supported.
+#
+# If the BR2_PREFER_STATIC_LIB is not defined, we have to specify
+# --disable-static explicitly to get stress linked dynamically.
+STRESS_CONF_OPT = \
+       $(if $(BR2_PREFER_STATIC_LIB),,--disable-static)
+
 $(eval $(autotools-package))