summaryrefslogtreecommitdiffstats
path: root/src/core/gyp_run.pro
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-09-23 12:14:36 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-09-23 13:01:53 +0000
commit3a0b20da7da22b74449b8ff45d8f07113aed53c7 (patch)
tree2f7e885ba103e1b0ee2bfb26c86b899ffe8b32f6 /src/core/gyp_run.pro
parent31baea5eeb0d0fffb4328bd67218cedb71a236c3 (diff)
Support building on ARM
Fix ARM linux builds on ARM Change-Id: Ifd97a0286b509003d0c7959654d406e271349cd7 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/core/gyp_run.pro')
-rw-r--r--src/core/gyp_run.pro74
1 files changed, 38 insertions, 36 deletions
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index bf4cbb56c..def7d4698 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -37,48 +37,50 @@ force_debug_info {
cross_compile {
TOOLCHAIN_SYSROOT = $$[QT_SYSROOT]
-
!isEmpty(TOOLCHAIN_SYSROOT): GYP_CONFIG += sysroot=\"$${TOOLCHAIN_SYSROOT}\"
- contains(QT_ARCH, "arm") {
- GYP_CONFIG += target_arch=arm
-
- # Extract ARM specific compiler options that we have to pass to gyp,
- # but let gyp figure out a default if an option is not present.
- MARCH = $$extractCFlag("-march=.*")
- !isEmpty(MARCH): GYP_CONFIG += arm_arch=\"$$MARCH\"
-
- MTUNE = $$extractCFlag("-mtune=.*")
- GYP_CONFIG += arm_tune=\"$$MTUNE\"
-
- MFLOAT = $$extractCFlag("-mfloat-abi=.*")
- !isEmpty(MFLOAT): GYP_CONFIG += arm_float_abi=\"$$MFLOAT\"
-
- MARMV = $$replace(MARCH, "armv",)
- !isEmpty(MARMV) {
- MARMV = $$split(MARMV,)
- MARMV = $$member(MARMV, 0)
- lessThan(MARMV, 6): error("$$MARCH architecture is not supported")
- GYP_CONFIG += 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")|contains(MFPU, "neon-vfpv4"): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=1
- else:!lessThan(MARMV, 7): GYP_CONFIG += arm_neon=0 arm_neon_optional=1
- else: GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=0
- }
-
- contains(QMAKE_CFLAGS, "-mthumb"): GYP_CONFIG += arm_thumb=1
- }
-
# Needed for v8, see chromium/v8/build/toolchain.gypi
GYP_CONFIG += CXX=\"$$which($$QMAKE_CXX)\"
}
+contains(QT_ARCH, "arm") {
+ # Chromium will set a default sysroot on arm unless we give it one.
+ !cross_compile: GYP_CONFIG += sysroot=\"\"
+
+ GYP_CONFIG += target_arch=arm
+
+ # Extract ARM specific compiler options that we have to pass to gyp,
+ # but let gyp figure out a default if an option is not present.
+ MARCH = $$extractCFlag("-march=.*")
+ !isEmpty(MARCH): GYP_CONFIG += arm_arch=\"$$MARCH\"
+
+ MTUNE = $$extractCFlag("-mtune=.*")
+ !isEmpty(MTUNE): GYP_CONFIG += arm_tune=\"$$MTUNE\"
+
+ MFLOAT = $$extractCFlag("-mfloat-abi=.*")
+ !isEmpty(MFLOAT): GYP_CONFIG += arm_float_abi=\"$$MFLOAT\"
+
+ MARMV = $$replace(MARCH, "armv",)
+ !isEmpty(MARMV) {
+ MARMV = $$split(MARMV,)
+ MARMV = $$member(MARMV, 0)
+ lessThan(MARMV, 6): error("$$MARCH architecture is not supported")
+ GYP_CONFIG += 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")|contains(MFPU, "neon-vfpv4"): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=1
+ else:!lessThan(MARMV, 7): GYP_CONFIG += arm_neon=0 arm_neon_optional=1
+ else: GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=0
+ }
+
+ contains(QMAKE_CFLAGS, "-mthumb"): GYP_CONFIG += arm_thumb=1
+}
+
contains(QT_ARCH, "x86_64"): GYP_CONFIG += target_arch=x64
contains(QT_ARCH, "i386"): GYP_CONFIG += target_arch=ia32