Re: configure can't detect proper pthread flags

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: configure can't detect proper pthread flags
Дата
Msg-id 9101.1426820918@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: configure can't detect proper pthread flags  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Ответы Re: configure can't detect proper pthread flags  (Max Filippov <jcmvbkbc@gmail.com>)
Список pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> "Max" == Max Filippov <jcmvbkbc@gmail.com> writes:
>  Max> Sorry, I must be not clear enough: why checking compiler/linker
>  Max> output instead of checking their exit code or presence of produced
>  Max> object/ executable files?

> Going by the comment some lines above, my guess would be "because some
> compilers accept some option like -pthreads and issue a warning message
> saying that it is ignored, and pg wants to not treat such options as
> valid"

Precisely.  We don't want every link step producing a useless warning.
Ideally, "make -s" would print nothing whatsoever; to the extent that
tools produce unsuppressable routine chatter, that's evil because it
makes it harder to notice actually-useful warnings.

(My current ambition in this area is to shut up clang from complaining
like so:
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-pthread'
which is another bit of entirely useless pedantry, but rather hard to work
around because we assume that CFLAGS should be included when linking.)

It's tempting to consider avoiding Max's problem by doing the ACX_PTHREAD
test before picking up any other libraries.  But I'm worried that that
would cause more problems than it solves.  It's worth noting that the
Autoconf documentation specifically recommends testing for libraries
before testing for compiler characteristics.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ERRCODE_T_R_DEADLOCK_DETECTED
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Patch: Add launchd Support