diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-02-05 19:12:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-06 15:18:57 +0100 |
commit | 8ca06a55c074b9bf2509b6ec7b15d073030e5e40 (patch) | |
tree | 841fdeee6bd3eedb817e426ed7519482d1abf101 | |
parent | 22d4f9340ca37d28d7ed463a3a5dc00a5182b311 (diff) |
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 <jocelyn.turcotte@digia.com>
-rw-r--r-- | src/core/gyp_run.pro | 16 |
1 files changed, 10 insertions, 6 deletions
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" } |