diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/v8/gcc_arm.patch')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/v8/gcc_arm.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/v8/gcc_arm.patch b/nixpkgs/pkgs/development/libraries/v8/gcc_arm.patch new file mode 100644 index 000000000000..09579561fd8d --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/v8/gcc_arm.patch @@ -0,0 +1,31 @@ +diff --git a/third_party/zlib/contrib/optimizations/insert_string.h b/third_party/zlib/contrib/optimizations/insert_string.h +index 1826601..d123305 100644 +--- a/third_party/zlib/contrib/optimizations/insert_string.h ++++ b/third_party/zlib/contrib/optimizations/insert_string.h +@@ -26,15 +26,23 @@ + #define _cpu_crc32_u32 _mm_crc32_u32 + + #elif defined(CRC32_ARMV8_CRC32) +- #if defined(__clang__) ++ #if defined(__GNUC__) || defined(__clang__) + #undef TARGET_CPU_WITH_CRC +- #define __crc32cw __builtin_arm_crc32cw ++ #if defined(__clang__) ++ #define __crc32cw __builtin_arm_crc32cw ++ #elif defined(__GNUC__) ++ #define __crc32cw __builtin_aarch64_crc32cw ++ #endif + #endif + + #define _cpu_crc32_u32 __crc32cw + + #if defined(__aarch64__) +- #define TARGET_CPU_WITH_CRC __attribute__((target("crc"))) ++ #if defined(__clang__) ++ #define TARGET_CPU_WITH_CRC __attribute__((target("crc"))) ++ #elif defined(__GNUC__) ++ #define TARGET_CPU_WITH_CRC __attribute__((target("+crc"))) ++ #endif + #else // !defined(__aarch64__) + #define TARGET_CPU_WITH_CRC __attribute__((target("armv8-a,crc"))) + #endif // defined(__aarch64__) |