pgsql: Try to fix the CRC-32C autoconf magic for icc compiler. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Try to fix the CRC-32C autoconf magic for icc compiler.
Date
Msg-id E1Yi4BN-0003aC-9N@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Try to fix the CRC-32C autoconf magic for icc compiler.

On gcc and clang, the _mm_crc32_u8 and _mm_crc32_u64 intrinsics are not
defined at all, when not building with -msse4.2. But on icc, they are.
So we cannot assume that if those intrinsics are defined, we can always use
them safely, we might still need the runtime check.

To fix, check if the __SSE_4_2__ preprocessor symbol is defined. That's
supposed to be defined only when the compiler is targeting a processor that
has SSE 4.2 support.

Per buildfarm members fulmar and okapi.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b4eb2d168d2c426978a02de8b9b6ccdb85e1b442

Modified Files
--------------
configure    |   38 ++++++++++++++++++++++++++++++++------
configure.in |   24 ++++++++++++++++++------
2 files changed, 50 insertions(+), 12 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Use Intel SSE 4.2 CRC instructions where available.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Oops, fix misspelled #endif