From: Junio C Hamano <gitster@pobox.com>
To: Max Horn <max@quendi.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Change configure to check if pthreads are usable without any extra flags
Date: Mon, 09 Jul 2012 10:44:47 -0700 [thread overview]
Message-ID: <7vy5mskewg.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <C56B4151-8912-4B3A-8A97-E769A878AE68@quendi.de> (Max Horn's message of "Mon, 9 Jul 2012 17:39:26 +0200")
Max Horn <max@quendi.de> writes:
>>> diff --git a/configure.ac b/configure.ac
>>> index 4e9012f..d767ef3 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -1002,7 +1002,7 @@ if test -n "$USER_NOPTHREAD"; then
>>> # -D_REENTRANT' or some such.
>>> elif test -z "$PTHREAD_CFLAGS"; then
>>> threads_found=no
>>> - for opt in -mt -pthread -lpthread; do
>>> + for opt in "" -mt -pthread -lpthread; do
>>
>> Hmph. Would it work to append the new empty string at the end of
>> the existing list, as opposed to prepending it?
>
> No, because that loop aborts on the first match that "works". Since no flags are necessary on OS X, but adding "-mt" to the flags "works" in the sense that it does nothing (except triggering a warning about an unknown argument), we need to check the empty string before "-mt" that.
If the test in that "for opt ...; do" considers the linking "work",
why do you even want to tweak it, and instead let "-mt" be passed?
If the warning troubles you, would it be feasible for the purpose of
the check to tweak the definition of "works" used in the loop so that
it considers the warning as "not working"?
next prev parent reply other threads:[~2012-07-09 17:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-05 23:03 [PATCH] Change configure to check if pthreads are usable without any extra flags Max Horn
2012-07-09 14:50 ` Junio C Hamano
2012-07-09 15:39 ` Max Horn
2012-07-09 17:44 ` Junio C Hamano [this message]
2012-07-09 18:31 ` Max Horn
2012-07-09 19:23 ` Junio C Hamano
2012-07-09 21:44 ` Max Horn
2012-07-09 22:38 ` Junio C Hamano
2012-07-10 9:52 ` Max Horn
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=7vy5mskewg.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=max@quendi.de \
/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).