Re: new clang report - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: new clang report
Date
Msg-id 201102161340.p1GDepL21708@momjian.us
Whole thread Raw
In response to new clang report  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> The lastest clang svn tip (2.9-to-be, I guess) builds PostgreSQL out of
> the box and most tests pass.  Specifically, it no longer chokes on
> -D_GNU_SOURCE on Linux, which was the previously reported blocker.
> 
> Warnings:
> 
> Lots of these:
> clang: warning: argument unused during compilation: '-mthreads'
> clang: warning: argument unused during compilation: '-mt'

FYI, our threading code throws every flag it can at the compiler --- it
is very imprecise.

> Possible fix, check both link and compile invocations for warnings in
> configure:
> 
> diff --git i/config/acx_pthread.m4 w/config/acx_pthread.m4
> index ceb161a..ee181f9 100644
> --- i/config/acx_pthread.m4
> +++ w/config/acx_pthread.m4
> @@ -142,7 +142,7 @@ main (int argc, char **argv)
>  }
>  _ACEOF
>              rm -f conftest.$ac_objext conftest$ac_exeext
> -            if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
> +            if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
>                  # we continue with more flags because Linux needs -lpthread
>                  # for libpq builds on PostgreSQL.  The test above only
>                  # tests for building binaries, not shared libraries.

Yep, looks good.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: Fwd: [JDBC] Weird issues when reading UDT from stored function
Next
From: Gurjeet Singh
Date:
Subject: Re: Fix for Index Advisor related hooks