Index: gyp/common_conditions.gypi |
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi |
index 6828660444874adf252dc37a1879985b269d3d3a..c9d24ae609e42a28f81ff7aafabb8b51edcd16f9 100644 |
--- a/gyp/common_conditions.gypi |
+++ b/gyp/common_conditions.gypi |
@@ -150,17 +150,28 @@ |
'cflags': [ |
'-mthumb', |
], |
- }], |
- [ 'skia_arch_type == "arm" and armv7 == 1', { |
- 'variables': { |
- 'arm_neon_optional%': 0, |
- }, |
- 'defines': [ |
- '__ARM_ARCH__=7', |
+ # The --fix-cortex-a8 switch enables a link-time workaround for |
+ # an erratum in certain Cortex-A8 processors. The workaround is |
+ # enabled by default if you target the ARM v7-A arch profile. |
+ # It can be enabled otherwise by specifying --fix-cortex-a8, or |
+ # disabled unconditionally by specifying --no-fix-cortex-a8. |
+ # |
+ # The erratum only affects Thumb-2 code. |
+ 'conditions': [ |
+ [ 'arm_version < 7', { |
+ 'ldflags': [ |
+ '-Wl,--fix-cortex-a8', |
+ ], |
+ }], |
], |
+ }], |
+ [ 'skia_arch_type == "arm" and arm_version >= 7', { |
'cflags': [ |
'-march=armv7-a', |
], |
+ 'ldflags': [ |
+ '-march=armv7-a', |
+ ], |
'conditions': [ |
[ 'arm_neon == 1', { |
'defines': [ |
@@ -169,10 +180,6 @@ |
'cflags': [ |
'-mfpu=neon', |
], |
- 'ldflags': [ |
- '-march=armv7-a', |
- '-Wl,--fix-cortex-a8', |
- ], |
}], |
[ 'arm_neon_optional == 1', { |
'defines': [ |