Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CBD-4127: v8 for aarch64 (and gcc10)
Change-Id: I3d7167198d65740c84db994ac9daf41b406c4fe8 Reviewed-on: http://review.couchbase.org/c/tlm/+/157273 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Blair Watt <blair.watt@couchbase.com>
- Loading branch information
Showing
8 changed files
with
215 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/src/base/template-utils.h b/src/base/template-utils.h | ||
index 8f89672..d6d4ca3 100644 | ||
--- a/src/base/template-utils.h | ||
+++ b/src/base/template-utils.h | ||
@@ -7,6 +7,7 @@ | ||
|
||
#include <array> | ||
#include <functional> | ||
+#include <iosfwd> | ||
#include <type_traits> | ||
#include <utility> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn | ||
index 5fa34150a..f83ca12fc 100644 | ||
--- a/config/compiler/BUILD.gn | ||
+++ b/config/compiler/BUILD.gn | ||
@@ -1547,7 +1547,7 @@ config("chromium_code") { | ||
} else { | ||
cflags = [ "-Wall" ] | ||
if (treat_warnings_as_errors) { | ||
- cflags += [ "-Werror" ] | ||
+ cflags += [ ] | ||
|
||
# The compiler driver can sometimes (rarely) emit warnings before calling | ||
# the actual linker. Make sure these warnings are treated as errors as | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/toolchain/linux/BUILD.gn b/toolchain/linux/BUILD.gn | ||
index fa8b17e9d..11554193a 100644 | ||
--- a/toolchain/linux/BUILD.gn | ||
+++ b/toolchain/linux/BUILD.gn | ||
@@ -153,6 +153,10 @@ clang_toolchain("clang_x64_v8_mips64") { | ||
} | ||
|
||
gcc_toolchain("x64") { | ||
+ # necessary for Centos 7 due to old binutils | ||
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=20535 | ||
+ extra_ldflags = "-Wl,-rpath=\\\$ORIGIN -Wl,-rpath-link ." | ||
+ | ||
cc = "gcc" | ||
cxx = "g++" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/contrib/optimizations/insert_string.h b/contrib/optimizations/insert_string.h | ||
index 1826601..d123305 100644 | ||
--- a/contrib/optimizations/insert_string.h | ||
+++ b/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__) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters