Skip to contentSkip to conversation

stress: honor the BR2_PREFER_STATIC_LIB preference

Buildroot Peter Korsgaard 1 participant 1 message Mar 4, 2013

lore
Share & tools
lore
#0 lore raw

commit: http://git.buildroot.net/buildroot/commit/?id=1b9a4f1e91ac98d836775c293acb9a947b846de1
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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.

---
 package/stress/stress.mk |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
package/stress/stress.mk +10 -0
index 3a047b5..a20b0c6 100644
@@ -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))