disable_elf_crel_on_linux_arm.patch 1.1 KB

1234567891011121314151617181920212223
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: John Kleinschmidt <[email protected]>
  3. Date: Tue, 29 Oct 2024 16:12:28 -0400
  4. Subject: disable ELF CREL on Linux Arm
  5. https://chromium-review.googlesource.com/c/chromium/src/+/5938657
  6. enabled ELF CREL, but this causes a Segmentation fault in GetAccessFlags
  7. in page_allocator_internals_posix.cc when running on, so disable
  8. ELF CREL on Linux Arm
  9. diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
  10. index 5d29e8f419048989f1d902d7dbd5e38e94b93251..c3c56ffac051bea5df7702b9adc2641d0d34fcdd 100644
  11. --- a/build/config/compiler/BUILD.gn
  12. +++ b/build/config/compiler/BUILD.gn
  13. @@ -618,7 +618,7 @@ config("compiler") {
  14. # Enable ELF CREL (see crbug.com/357878242) for all platforms that use ELF
  15. # (excluding toolchains that use an older version of LLVM).
  16. - if (is_linux && !llvm_android_mainline &&
  17. + if (is_linux && !llvm_android_mainline && current_cpu != "arm" &&
  18. default_toolchain != "//build/toolchain/cros:target") {
  19. cflags += [ "-Wa,--crel,--allow-experimental-crel" ]
  20. }