linux-arm-neon.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From c1c2cbd4f8cb09518529151276b1c7c5a07f061f Mon Sep 17 00:00:00 2001
  2. From: JeremyRand <jeremyrand@airmail.cc>
  3. Date: Mon, 2 Mar 2020 00:39:12 +0000
  4. Subject: [PATCH] Disable Clang integrated assembler for NEON
  5. This fixes assembler errors when building for non-NEON armv7 GNU/Linux
  6. targets with Clang.
  7. ---
  8. gfx/ycbcr/moz.build | 4 ++++
  9. media/libjpeg/moz.build | 2 ++
  10. 2 files changed, 6 insertions(+)
  11. diff --git a/gfx/ycbcr/moz.build b/gfx/ycbcr/moz.build
  12. index c643fbaf..35e758e 100644
  13. --- a/gfx/ycbcr/moz.build
  14. +++ b/gfx/ycbcr/moz.build
  15. @@ -60,6 +60,10 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']:
  16. SOURCES += [
  17. 'yuv_convert_arm.cpp',
  18. ]
  19. + # Clang's integrated assembler breaks NEON.
  20. + ASFLAGS += ['-fno-integrated-as']
  21. + CFLAGS += ['-fno-integrated-as']
  22. + CXXFLAGS += ['-fno-integrated-as']
  23. LOCAL_INCLUDES += ['/media/libyuv/libyuv/include']
  24. diff --git a/media/libjpeg/moz.build b/media/libjpeg/moz.build
  25. index f3e4bf4..d3519d8 100644
  26. --- a/media/libjpeg/moz.build
  27. +++ b/media/libjpeg/moz.build
  28. @@ -84,6 +84,8 @@ if CONFIG['LIBJPEG_TURBO_ASFLAGS']:
  29. 'simd/arm/jsimd.c',
  30. 'simd/arm/jsimd_neon.S',
  31. ]
  32. + # Clang's integrated assembler breaks NEON.
  33. + ASFLAGS += ['-fno-integrated-as']
  34. elif CONFIG['CPU_ARCH'] == 'aarch64':
  35. SOURCES += [
  36. 'simd/arm64/jsimd.c',
  37. --
  38. 2.1.4