From: venu.musham Date: Mon, 11 Mar 2024 07:29:31 +0000 (+0530) Subject: Support gcc build for aarch64. X-Git-Tag: accepted/tizen/unified/20240315.032948~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b344c4fc50e9ed988bae0f619c46fc954d7e5d60;p=platform%2Fframework%2Fweb%2Fchromium-efl.git Support gcc build for aarch64. This commit provides fixes to aarch64 arm build to support gcc build. Change-Id: I2d51c36a4de12cebf831e76afdcc3134f57cdfb7 Signed-off-by: venu.musham --- diff --git a/third_party/crashpad/crashpad/util/linux/pac_helper.cc b/third_party/crashpad/crashpad/util/linux/pac_helper.cc index a9d5f04..eb2c6c8 100644 --- a/third_party/crashpad/crashpad/util/linux/pac_helper.cc +++ b/third_party/crashpad/crashpad/util/linux/pac_helper.cc @@ -32,10 +32,14 @@ VMAddress StripPACBits(VMAddress address) { #if CRASHPAD_HAS_FEATURE(ptrauth_intrinsics) address = ptrauth_strip(address, ptrauth_key_function_pointer); #elif defined(ARCH_CPU_ARM64) +#if !defined(__GNUC__) || defined(__clang__) // Strip any pointer authentication bits that are assigned to the address. register uintptr_t x30 __asm("x30") = address; asm("xpaclri" : "+r"(x30)); address = x30; +#else + return address; +#endif #endif return address; } diff --git a/third_party/libvpx/BUILD.gn b/third_party/libvpx/BUILD.gn index edddde4..4f755a4 100644 --- a/third_party/libvpx/BUILD.gn +++ b/third_party/libvpx/BUILD.gn @@ -505,7 +505,7 @@ static_library("libvpx") { cpu_arch_full == "arm-neon-cpu-detect" || current_cpu == "arm64") { deps += [ ":libvpx_intrinsics_neon" ] } - if (current_cpu == "arm64") { + if (current_cpu == "arm64" && is_clang) { deps += [ ":libvpx_intrinsics_neon_dotprod" ] deps += [ ":libvpx_intrinsics_neon_i8mm" ] } diff --git a/third_party/libvpx/source/libvpx/vpx_ports/arm.h b/third_party/libvpx/source/libvpx/vpx_ports/arm.h index 65909d8..d5625d9 100644 --- a/third_party/libvpx/source/libvpx/vpx_ports/arm.h +++ b/third_party/libvpx/source/libvpx/vpx_ports/arm.h @@ -19,10 +19,17 @@ extern "C" { // Armv7-A optional Neon instructions, mandatory from Armv8.0-A. #define HAS_NEON (1 << 0) + +#if !defined(__GNUC__) || defined(__clang__) // Armv8.2-A optional Neon dot-product instructions, mandatory from Armv8.4-A. #define HAS_NEON_DOTPROD (1 << 1) // Armv8.2-A optional Neon i8mm instructions, mandatory from Armv8.6-A. #define HAS_NEON_I8MM (1 << 2) +#else +// gcc compilers have issues with dotprod & i8mm +#define HAS_NEON_DOTPROD 0 +#define HAS_NEON_I8MM 0 +#endif int arm_cpu_caps(void); diff --git a/v8/src/trap-handler/trap-handler.h b/v8/src/trap-handler/trap-handler.h index 289a755..6a2f00c 100644 --- a/v8/src/trap-handler/trap-handler.h +++ b/v8/src/trap-handler/trap-handler.h @@ -24,7 +24,8 @@ namespace trap_handler { #define V8_TRAP_HANDLER_SUPPORTED true // Arm64 (non-simulator) on Mac and Linux. #elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && \ - (V8_OS_DARWIN || (V8_OS_LINUX && !V8_OS_ANDROID)) + (V8_OS_DARWIN || (V8_OS_LINUX && !V8_OS_ANDROID)) && \ + defined(__clang__) #define V8_TRAP_HANDLER_SUPPORTED true // Arm64 simulator on x64 on Linux, Mac, or Windows. //