Re: BUG #15270: __builtin_isinf conflict when building using clang

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: steven.winfield@cantabcapital.com, pgsql-bugs@lists.postgresql.org
Date: 2018-09-01T00:12:00Z
Lists: pgsql-bugs
On 2018-07-09 19:00:31 +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      15270
> Logged by:          Steven Winfield
> Email address:      steven.winfield@cantabcapital.com
> PostgreSQL version: 11beta2
> Operating system:   RHEL 7.4
> Description:        
> 
> Hi,
> 
> I've been experimenting with getting the whole of PG 11beta2 (not just the
> JIT) compiling with the most recent stable version of llvm/clang: 6.0.1.
> 
> TL;DR: In src/include/port.h, inside the #else branch of #ifndef HAVE_ISINF,
> there probably need to be some glibc version checks within the #ifdef
> __clang__ block.

The actual problem appears to be issues within libc++ (rather than
libstdc++).  I nevertheless have restricted it to C for now, as there's
no performance issue with the tiny amount of C++ in postgres.

We probably need to find a better solution.

Sorry for the late response!

Greetings,

Andres Freund


Commits

  1. Fix 8a934d677 for libc++ and make more include order resistant.