Jeremie Courreges-Anglas <[email protected]> writes:

[...]

> I plan to test this on sparc64 when cvs up completes...  ok?

With the diff, the build succeeds on sparc64.

> Index: patches/patch-lib_crc32_c
> ===================================================================
> RCS file: patches/patch-lib_crc32_c
> diff -N patches/patch-lib_crc32_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-lib_crc32_c 13 Jul 2017 09:56:08 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +gcc-4.2.1 doesn't have __builtin_bswap32
> +
> +Index: lib/crc32.c
> +--- lib/crc32.c.orig
> ++++ lib/crc32.c
> +@@ -615,7 +615,7 @@ static const uint32_t crc32_lookup[16][256] =
> + /* swap endianness */
> + static uint32_t swap(uint32_t x)
> + {
> +-#if defined(__GNUC__) || defined(__clang__)
> ++#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ 
> >= 3))) || defined(__clang__)
> +     return __builtin_bswap32(x);
> + #else
> +     return (x >> 24) |
> Index: patches/patch-lib_crc32c_c
> ===================================================================
> RCS file: patches/patch-lib_crc32c_c
> diff -N patches/patch-lib_crc32c_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-lib_crc32c_c        13 Jul 2017 09:56:13 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +gcc-4.2.1 doesn't have __builtin_bswap32
> +
> +Index: lib/crc32c.c
> +--- lib/crc32c.c.orig
> ++++ lib/crc32c.c
> +@@ -595,7 +595,7 @@ static const uint32_t crc32c_lookup[4][256] = {
> + /* swap endianness */
> + static uint32_t swap(uint32_t x)
> + {
> +-#if defined(__GNUC__) || defined(__clang__)
> ++#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ 
> >= 3))) || defined(__clang__)
> +     return __builtin_bswap32(x);
> + #else
> +     return (x >> 24) |

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to