~oxide-developers/oxide/1.1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Description: Don't pass -m32 to the host compiler on ARM builds in ICU code
# Author: Chris Coulson <chris.coulson@canonical.com>

diff --git a/third_party/icu/icu.gyp b/third_party/icu/icu.gyp
--- a/third_party/icu/icu.gyp
+++ b/third_party/icu/icu.gyp
@@ -29,18 +29,21 @@
         ],
       }],
       ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
          or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \
         (target_arch=="arm" or target_arch=="ia32" or \
          target_arch=="mipsel")', {
         'target_conditions': [
           ['_toolset=="host"', {
-            'cflags': [ '-m32' ],
-            'ldflags': [ '-m32' ],
+            'variables': {
+              'm32flag': '<!((echo | $(echo ${CXX_host:-$(which g++)}) -m32 -E - > /dev/null 2>&1) && echo "-m32" || true)',
+            },
+            'cflags': [ '<(m32flag)' ],
+            'ldflags': [ '<(m32flag)' ],
             'asflags': [ '-32' ],
             'xcode_settings': {
               'ARCHS': [ 'i386' ],
             },
           }],
         ],
       }],
       ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \