autoconf-archive-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #8186] ax_pthread adds -pthread when it should not on OSX whe


From: Peter Johansson
Subject: Re: [patch #8186] ax_pthread adds -pthread when it should not on OSX when compiling with clang
Date: Wed, 25 Sep 2013 18:21:37 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130108 Thunderbird/10.0.12

On 09/25/2013 04:56 PM, Daniel Richard G. wrote:
On Tue, 2013 Sep 24 13:06+1000, Peter Johansson wrote:
I noticed that gnulib adds '-Werror -Wunknown-warning-option' to
CFLAGS when Clang is in use, before trying to detect whether an option
is OK or not. Perhaps that approach would be useful here too.
Where is that option documented? I can't find anything but secondhand
references to it.

Hi Daniel,

I few minutes with google failed for me to.

While I trust that the gnulib folks know what they
are doing, that option specifically addresses warning flags (-Wxxxx)
and not something like -pthread. But if said option is listed in a
document somewhere, the option that we may want to use should be in
there as well.

Sorry if I was too brief. My thought was that perhaps it'd be better to have feature test, i.e., actually test if the compiler runs with '-pthread', and then the mentioned option would be useful on Clang. Building a database with ifs and cases of course works as long as it works, but when it breaks down it's my experience that it's better to just reimplement as a feature test rather than adding another if statement. But it might be complicated in this case. Not sure, since I haven't looked at the macro in detail.

Thanks,
Peter





reply via email to

[Prev in Thread] Current Thread [Next in Thread]