From ef4934a8dd23b34c481d1ae84f20f692b50b13c0 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 25 Jul 2018 18:40:49 +0900 Subject: [PATCH] Bug 1478228 - Avoid R_ARM_V4BX relocations on android builds. r=froydnj --HG-- extra : rebase_source : 5f9d2490345382b562380fffb0666af2ebb25cf2 --- gfx/cairo/libpixman/src/moz.build | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gfx/cairo/libpixman/src/moz.build b/gfx/cairo/libpixman/src/moz.build index 6b156e575e3a..83b94e69403f 100644 --- a/gfx/cairo/libpixman/src/moz.build +++ b/gfx/cairo/libpixman/src/moz.build @@ -136,6 +136,19 @@ if use_arm_neon_gcc: SOURCES += ['pixman-arm-neon.c'] SOURCES['pixman-arm-neon.c'].flags += CONFIG['NEON_FLAGS'] +if CONFIG['OS_TARGET'] == 'Android' and (use_arm_neon_gcc or use_arm_simd_gcc): + # The assembly files in this directory are built with gas (because of + # -no-integrated-as), and they contain `.object_arch armv4`, which + # makes gas emit ARM_V4BX relocations that lld doesn't support. + # The code being third party and this setup being actually desirable to + # keep, until lld supports those relocations[1], hack around it by using + # the preprocessor to change it to armv7a, which is the target we use + # on arm android (with -march). + # 1. https://bugs.llvm.org/show_bug.cgi?id=38303 + ASFLAGS += [ + '-Darmv4=armv7a' + ] + # Suppress warnings in third-party code. if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'): CFLAGS += [