* [Buildroot] [PATCH] stress: honor the BR2_PREFER_STATIC_LIB preference @ 2013-03-02 6:35 Tzu-Jung Lee 2013-03-03 16:51 ` Arnout Vandecappelle 2013-03-04 17:47 ` Tzu-Jung Lee 0 siblings, 2 replies; 7+ messages in thread From: Tzu-Jung Lee @ 2013-03-02 6:35 UTC (permalink / raw) To: buildroot From: roylee17 <roylee17@gmail.com> Change-Id: I13f849e76557fac81b488ab26b4ac8b999888bc1 --- package/stress/stress.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/stress/stress.mk b/package/stress/stress.mk index 3a047b5..af79bf2 100644 --- a/package/stress/stress.mk +++ b/package/stress/stress.mk @@ -10,4 +10,7 @@ STRESS_VERSION = 1.0.4 STRESS_SITE = http://weather.ou.edu/~apw/projects/stress STRESS_AUTORECONF = YES +STRESS_CONF_OPT = \ + $(if $(BR2_PREFER_STATIC_LIB),--enable-static,--disable-static) + $(eval $(autotools-package)) -- 1.8.1.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] stress: honor the BR2_PREFER_STATIC_LIB preference 2013-03-02 6:35 [Buildroot] [PATCH] stress: honor the BR2_PREFER_STATIC_LIB preference Tzu-Jung Lee @ 2013-03-03 16:51 ` Arnout Vandecappelle 2013-03-03 18:55 ` Tzu-Jung Lee 2013-03-04 17:47 ` Tzu-Jung Lee 1 sibling, 1 reply; 7+ messages in thread From: Arnout Vandecappelle @ 2013-03-03 16:51 UTC (permalink / raw) To: buildroot On 02/03/13 07:35, Tzu-Jung Lee wrote: > From: roylee17 <roylee17@gmail.com> > > Change-Id: I13f849e76557fac81b488ab26b4ac8b999888bc1 > --- > package/stress/stress.mk | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/package/stress/stress.mk b/package/stress/stress.mk > index 3a047b5..af79bf2 100644 > --- a/package/stress/stress.mk > +++ b/package/stress/stress.mk > @@ -10,4 +10,7 @@ STRESS_VERSION = 1.0.4 > STRESS_SITE = http://weather.ou.edu/~apw/projects/stress > STRESS_AUTORECONF = YES > > +STRESS_CONF_OPT = \ > + $(if $(BR2_PREFER_STATIC_LIB),--enable-static,--disable-static) This is already part of the standard SHARED_STATIC_LIBS_OPTS, which is part of the argument list of configure. The difference being that in the shared case, --enable-static is still passed (to allow building static libraries, in case some client prefers to link statically after all). Any reason why this doesn't work for stress? Regards, Arnout > + > $(eval $(autotools-package)) -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] stress: honor the BR2_PREFER_STATIC_LIB preference 2013-03-03 16:51 ` Arnout Vandecappelle @ 2013-03-03 18:55 ` Tzu-Jung Lee 2013-03-04 16:15 ` Peter Korsgaard 0 siblings, 1 reply; 7+ messages in thread From: Tzu-Jung Lee @ 2013-03-03 18:55 UTC (permalink / raw) To: buildroot ifeq ($(BR2_PREFER_STATIC_LIB),y) SHARED_STATIC_LIBS_OPTS=--enable-static --disable-shared TARGET_LDFLAGS += --static else SHARED_STATIC_LIBS_OPTS=--enable-static --enable-shared endif As you indicated, the --enable-static is given anyway in the SHARED_STATIC_LIBS_OPTS. Unfortunately, as long as the --enable-static is given, stress links the program statically, regardless how the --enable-shared or --disable-shared. In this case, stress would be linked statically regardless how the BR2_PREFER_STATIC_LIB specifies. So we need the patch to explicitly tell it link the program dynamically by appending/overriding with --disable-static. Thanks. Roy On Mon, Mar 4, 2013 at 12:51 AM, Arnout Vandecappelle <arnout@mind.be>wrote: > On 02/03/13 07:35, Tzu-Jung Lee wrote: > >> From: roylee17 <roylee17@gmail.com> >> >> Change-Id: I13f849e76557fac81b488ab26b4ac**8b999888bc1 >> --- >> package/stress/stress.mk | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/package/stress/stress.mk b/package/stress/stress.mk >> index 3a047b5..af79bf2 100644 >> --- a/package/stress/stress.mk >> +++ b/package/stress/stress.mk >> @@ -10,4 +10,7 @@ STRESS_VERSION = 1.0.4 >> STRESS_SITE = http://weather.ou.edu/~apw/**projects/stress<http://weather.ou.edu/~apw/projects/stress> >> STRESS_AUTORECONF = YES >> >> +STRESS_CONF_OPT = \ >> + $(if $(BR2_PREFER_STATIC_LIB),--**enable-static,--disable-** >> static) >> > > This is already part of the standard SHARED_STATIC_LIBS_OPTS, which is > part of the argument list of configure. The difference being that in the > shared case, --enable-static is still passed (to allow building static > libraries, in case some client prefers to link statically after all). > > Any reason why this doesn't work for stress? > > Regards, > Arnout > > + >> $(eval $(autotools-package)) >> > > > -- > Arnout Vandecappelle arnout at mind be > Senior Embedded Software Architect +32-16-286500 > Essensium/Mind http://www.mind.be > G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven > LinkedIn profile: http://www.linkedin.com/in/**arnoutvandecappelle<http://www.linkedin.com/in/arnoutvandecappelle> > GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130304/8dc2ff97/attachment-0001.html> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] stress: honor the BR2_PREFER_STATIC_LIB preference 2013-03-03 18:55 ` Tzu-Jung Lee @ 2013-03-04 16:15 ` Peter Korsgaard 2013-03-04 17:50 ` Tzu-Jung Lee 0 siblings, 1 reply; 7+ messages in thread From: Peter Korsgaard @ 2013-03-04 16:15 UTC (permalink / raw) To: buildroot >>>>> "T" == Tzu-Jung Lee <roylee17@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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] stress: honor the BR2_PREFER_STATIC_LIB preference 2013-03-04 16:15 ` Peter Korsgaard @ 2013-03-04 17:50 ` Tzu-Jung Lee 0 siblings, 0 replies; 7+ messages in thread From: Tzu-Jung Lee @ 2013-03-04 17:50 UTC (permalink / raw) To: buildroot My pleasure. I add comment in both commit log and makefile. Please feel free to do necessary editing while committing. Thanks. Roy On Tue, Mar 5, 2013 at 12:15 AM, Peter Korsgaard <jacmet@uclibc.org> wrote: > >>>>> "T" == Tzu-Jung Lee <roylee17@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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130305/51c26faf/attachment.html> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] stress: honor the BR2_PREFER_STATIC_LIB preference 2013-03-02 6:35 [Buildroot] [PATCH] stress: honor the BR2_PREFER_STATIC_LIB preference Tzu-Jung Lee 2013-03-03 16:51 ` Arnout Vandecappelle @ 2013-03-04 17:47 ` Tzu-Jung Lee 2013-03-04 19:59 ` Peter Korsgaard 1 sibling, 1 reply; 7+ messages in thread From: Tzu-Jung Lee @ 2013-03-04 17:47 UTC (permalink / raw) To: buildroot From: roylee17 <roylee17@gmail.com> 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> --- package/stress/stress.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package/stress/stress.mk b/package/stress/stress.mk index 3a047b5..a20b0c6 100644 --- a/package/stress/stress.mk +++ b/package/stress/stress.mk @@ -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)) -- 1.8.1.5 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] stress: honor the BR2_PREFER_STATIC_LIB preference 2013-03-04 17:47 ` Tzu-Jung Lee @ 2013-03-04 19:59 ` Peter Korsgaard 0 siblings, 0 replies; 7+ messages in thread From: Peter Korsgaard @ 2013-03-04 19:59 UTC (permalink / raw) To: buildroot >>>>> "T" == Tzu-Jung Lee <roylee17@gmail.com> writes: T> From: roylee17 <roylee17@gmail.com> T> Stress is linked statically if the --enable-static is specified. T> However, this option is always specified in the global T> SHARED_STATIC_LIBS_OPTS to tell packages to build static libraries, T> if supported. T> If the BR2_PREFER_STATIC_LIB is not defined, we have to specify T> --disable-static explicitly to get stress linked dynamically. T> Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com> Committed, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-04 19:59 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-03-02 6:35 [Buildroot] [PATCH] stress: honor the BR2_PREFER_STATIC_LIB preference Tzu-Jung Lee 2013-03-03 16:51 ` Arnout Vandecappelle 2013-03-03 18:55 ` Tzu-Jung Lee 2013-03-04 16:15 ` Peter Korsgaard 2013-03-04 17:50 ` Tzu-Jung Lee 2013-03-04 17:47 ` Tzu-Jung Lee 2013-03-04 19:59 ` Peter Korsgaard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox