git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: "Rainer M. Canavan" <git@canavan.de>
Cc: git@vger.kernel.org
Subject: Re: configure: -lpthread doesn't belong in CFLAGS
Date: Mon, 02 Nov 2015 09:27:41 +0100	[thread overview]
Message-ID: <vpqa8qwst4y.fsf@anie.imag.fr> (raw)
In-Reply-To: <201511012230.tA1MUGa5016836@tezro.nonet> (Rainer M. Canavan's message of "Sun, 1 Nov 2015 23:30:16 +0100 (CET)")

"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.

>    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/

  reply	other threads:[~2015-11-02  8:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-01 22:30 configure: -lpthread doesn't belong in CFLAGS Rainer M. Canavan
2015-11-02  8:27 ` Matthieu Moy [this message]
2015-11-06  1:11   ` [PATCH] In configure.ac, try -lpthread in $LIBS instead of $CFLAGS to make picky linkers happy Rainer M. Canavan
2015-11-06  8:25     ` Matthieu Moy
2015-11-08 15:28       ` [PATCH] configure.ac: try -lpthread in $LIBS instead of $CFLAGS Rainer M. Canavan
2015-11-08 16:00         ` Matthieu Moy
2015-11-20 11:42           ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpqa8qwst4y.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=git@canavan.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).