Re: configure: -lpthread doesn't belong in CFLAGS
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Nov 2, 2015, 08:27 UTC
- Message-ID
- <vpqa8qwst4y.fsf@anie.imag.fr>
- In-Reply-To
- <201511012230.tA1MUGa5016836@tezro.nonet>
"Rainer M. Canavan" <git@canavan.de> writes:
> Hi,
Hi,
Thanks for the patch. However, it will need a bit more work to be integrated into git.git.
Please, read https://github.com/git/git/blob/master/Documentation/SubmittingPatches
The body of your email should end up being the commit message. It is not (yet) properly written as such. Also, read about Developer's Certificate of Origin in the document above.
Show 5 quoted lines
> for opt in "" -mt -pthread -lpthread; do > old_CFLAGS="$CFLAGS" > - CFLAGS="$opt $CFLAGS" > + old_LIBS="$LIBS" > + if test "$(echo $opt | cut -b 1-2)" = -l ; then
Don't use "echo" on string that may begin with - (different versions of echo will have different behaviors). One option is to use "printf" which is more robust. Another one, more elegant IMHO in this case is to use a case:
case "$opt" in
-l*)
# ...
;;
*)
# ...
;;
esac-- Matthieu Moy http://www-verimag.imag.fr/~moy/