From 8ca06a55c074b9bf2509b6ec7b15d073030e5e40 Mon Sep 17 00:00:00 2001 From: Andras Becsi Date: Wed, 5 Feb 2014 19:12:46 +0100 Subject: Use arm_neon_optional from armv7 onward if not explicitly enabled This makes our behavior consistent with chromium if the Qt toolchain does not explicitly enable NEON instructions, which would result in undefined symbols otherwise. Change-Id: Idc4f355714ede4206f4650664f6c24784100e7d8 Reviewed-by: Jocelyn Turcotte --- src/core/gyp_run.pro | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro index 2cc13b7ea..9ab8ff6fc 100644 --- a/src/core/gyp_run.pro +++ b/src/core/gyp_run.pro @@ -28,12 +28,6 @@ cross_compile { MARCH = $$extractCFlag("-march=.*") !isEmpty(MARCH): GYP_ARGS += "-D arm_arch=\"$$MARCH\"" - MFPU = $$extractCFlag("-mfpu=.*") - !isEmpty(MFPU) { - GYP_ARGS += "-D arm_fpu=\"$$MFPU\"" - contains(MFPU, "neon"): GYP_ARGS += "-D arm_neon=1" - } - MTUNE = $$extractCFlag("-mtune=.*") !isEmpty(MTUNE): GYP_ARGS += "-D arm_tune=\"$$MTUNE\"" @@ -47,6 +41,16 @@ cross_compile { GYP_ARGS += "-D arm_version=\"$$MARMV\"" } + MFPU = $$extractCFlag("-mfpu=.*") + !isEmpty(MFPU) { + # If the toolchain does not explicitly specify to use NEON instructions + # we use arm_neon_optional for ARMv7 and newer and let chromium decide + # about the mfpu option. + contains(MFPU, "neon"): GYP_ARGS += "-D arm_fpu=\"$$MFPU\" -D arm_neon=1" + else:!lessThan(MARMV, 7): GYP_ARGS += "-D arm_neon=0 -D arm_neon_optional=1" + else: GYP_ARGS += "-D arm_fpu=\"$$MFPU\"" + } + contains(QMAKE_CFLAGS, "-mthumb"): GYP_ARGS += "-D arm_thumb=1" } -- cgit v1.2.3