Re: JIT compiling with LLVM v12.2

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: JIT compiling with LLVM v12.2
Date: 2018-03-21 02:22:08
Message-ID: CAEepm=2idK72KqJkdprcQUF=hThzBm2m5KtSv-1_fZN9q07+cA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 21, 2018 at 1:50 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2018-03-20 03:14:55 -0700, Andres Freund wrote:
>> My current plan is to push the first few commits relatively soon, give
>> the BF a few cycles to shake out. Set up a few BF animals with each
>> supported LLVM version. Then continue mergin.
>
> I've done that. I'll set up a number of BF animals as soon as I've got
> the buildfarm secrets for them.

Somehow your configure test correctly concludes that my $CC (clang
4.0) doesn't support -fexcess-precision=standard but that my $CXX
(clang++ 4.0) does, despite producing a nearly identical warning:

configure:5489: checking whether ccache cc supports
-fexcess-precision=standard, for CFLAGS
configure:5511: ccache cc -c -Wall -Wmissing-prototypes
-Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard conftest.c >&5
cc: warning: optimization flag '-fexcess-precision=standard' is not
supported [-Wignored-optimization-argument]
configure:5511: $? = 0
configure: failed program was:
...
configure:5521: result: no

configure:5528: checking whether ccache c++ supports
-fexcess-precision=standard, for CXXFLAGS
configure:5556: ccache c++ -c -Wall -Wpointer-arith
-fno-strict-aliasing -fwrapv -fexcess-precision=standard conftest.cpp
>&5
c++: warning: optimization flag '-fexcess-precision=standard' is not
supported [-Wignored-optimization-argument]
configure:5556: $? = 0
configure:5572: result: yes

So it goes into my $CXXFLAGS and then I get the same warning when
compiling the three .cpp files in the tree.

GCC also doesn't like that in C++ mode, but it seems to report an
error (rather than a warning) so with g++ as your $CXX configure sees
$? = 1 and draws the correct conclusion.

$ gcc -fexcess-precision=standard -c test.c
$ g++ -fexcess-precision=standard -c test.cpp
cc1plus: sorry, unimplemented: -fexcess-precision=standard for C++

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-03-21 02:29:55 Re: JIT compiling with LLVM v12.2
Previous Message Kefan Yang 2018-03-21 02:01:27 Re: [GSoC 2018] Proposal Draft