Re: Bug fix for glibc broke freebsd build in REL_11_STABLE

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>, Victor Wagner <vitus@wagner.pp.ru>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-09-04T22:44:36Z
Lists: pgsql-hackers
On 2018-09-04 15:16:27 -0700, Andres Freund wrote:
> I'm now looking at how it comes that clang on linux doesn't default to
> x87 math, but freebsd does.

Oh well. I present you, without comments, the following:

  switch (Triple.getOS()) {
  case llvm::Triple::FreeBSD:
  case llvm::Triple::NetBSD:
  case llvm::Triple::OpenBSD:
    return "i486";
  case llvm::Triple::Haiku:
    return "i586";
  default:
    // Fallback to p4.
    return "pentium4";
  }

Greetings,

Andres Freund


Commits

  1. Error out for clang on x86-32 without SSE2 support, no -fexcess-precision.

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