Message ID | 1335548623-17432-1-git-send-email-peter.portante@redhat.com |
---|---|
State | New |
Headers | show |
On Fri, Apr 27, 2012 at 1:43 PM, Peter Portante <peter.portante@redhat.com>wrote: > Remove the extra -lrt switch which might be there from the package > config check for gthreads. > > See also: e3c56761b465a4253871c32b06ebbc2d8b3fc3e1 for the extra > pthread switch removal. > FYI: I am not trying to dribble these in, I am just finding them as I play around with debugging the behavior of compiler switches and these redundancies get in the way. Thanks, -peter Signed-off-by: Peter Portante <peter.portante@redhat.com> > --- > configure | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/configure b/configure > index 15bbc73..e748b06 100755 > --- a/configure > +++ b/configure > @@ -2581,7 +2581,16 @@ EOF > if compile_prog "" "" ; then > : > elif compile_prog "" "-lrt" ; then > - LIBS="-lrt $LIBS" > + found=no > + for lib_entry in $LIBS; do > + if test "$lib_entry" = "-lrt"; then > + found=yes > + break > + fi > + done > + if test "$found" = "no"; then > + LIBS="-lrt $LIBS" > + fi > fi > > if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a > \ > -- > 1.7.7.6 > > >
On 27 April 2012 18:43, Peter Portante <peter.portante@redhat.com> wrote: > Remove the extra -lrt switch which might be there from the package > config check for gthreads. > > See also: e3c56761b465a4253871c32b06ebbc2d8b3fc3e1 for the extra > pthread switch removal. > > Signed-off-by: Peter Portante <peter.portante@redhat.com> > --- > configure | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/configure b/configure > index 15bbc73..e748b06 100755 > --- a/configure > +++ b/configure > @@ -2581,7 +2581,16 @@ EOF > if compile_prog "" "" ; then > : > elif compile_prog "" "-lrt" ; then > - LIBS="-lrt $LIBS" > + found=no > + for lib_entry in $LIBS; do > + if test "$lib_entry" = "-lrt"; then > + found=yes > + break > + fi > + done > + if test "$found" = "no"; then > + LIBS="-lrt $LIBS" > + fi > fi If we need this more than once it looks like a candidate for a shell function, maybe: add_to_libs -lrt ? -- PMM
On 04/27/2012 02:14 PM, Peter Maydell wrote: > On 27 April 2012 18:43, Peter Portante<peter.portante@redhat.com> wrote: >> Remove the extra -lrt switch which might be there from the package >> config check for gthreads. >> >> See also: e3c56761b465a4253871c32b06ebbc2d8b3fc3e1 for the extra >> pthread switch removal. >> >> Signed-off-by: Peter Portante<peter.portante@redhat.com> >> --- >> configure | 11 ++++++++++- >> 1 files changed, 10 insertions(+), 1 deletions(-) >> >> diff --git a/configure b/configure >> index 15bbc73..e748b06 100755 >> --- a/configure >> +++ b/configure >> @@ -2581,7 +2581,16 @@ EOF >> if compile_prog "" "" ; then >> : >> elif compile_prog "" "-lrt" ; then >> - LIBS="-lrt $LIBS" >> + found=no >> + for lib_entry in $LIBS; do >> + if test "$lib_entry" = "-lrt"; then >> + found=yes >> + break >> + fi >> + done >> + if test "$found" = "no"; then >> + LIBS="-lrt $LIBS" >> + fi >> fi > If we need this more than once it looks like a candidate for > a shell function, maybe: > add_to_libs -lrt > ? Great idea, thanks for pointing that out. I'll re-spin this patch as a re-factoring of the first, and then apply the second, by using a shell script as proposed. -peter > > -- PMM
diff --git a/configure b/configure index 15bbc73..e748b06 100755 --- a/configure +++ b/configure @@ -2581,7 +2581,16 @@ EOF if compile_prog "" "" ; then : elif compile_prog "" "-lrt" ; then - LIBS="-lrt $LIBS" + found=no + for lib_entry in $LIBS; do + if test "$lib_entry" = "-lrt"; then + found=yes + break + fi + done + if test "$found" = "no"; then + LIBS="-lrt $LIBS" + fi fi if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
Remove the extra -lrt switch which might be there from the package config check for gthreads. See also: e3c56761b465a4253871c32b06ebbc2d8b3fc3e1 for the extra pthread switch removal. Signed-off-by: Peter Portante <peter.portante@redhat.com> --- configure | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)