chiark / gitweb /
nodejs: Link to libstdc++.so instead of stlport
[termux-packages] / packages / nodejs / use-standard-c++lib.patch
1 diff -u -r ../node-v6.0.0/deps/v8/build/standalone.gypi ./deps/v8/build/standalone.gypi
2 --- ../node-v6.0.0/deps/v8/build/standalone.gypi        2016-04-26 15:50:10.000000000 -0400
3 +++ ./deps/v8/build/standalone.gypi     2016-04-28 20:30:19.392238419 -0400
4 @@ -320,7 +320,6 @@
5            ['android_ndk_root==""', {
6              'variables': {
7                'android_sysroot': '<(android_toolchain)/sysroot/',
8 -              'android_stl': '<(android_toolchain)/sources/cxx-stl/',
9              },
10              'conditions': [
11                ['target_arch=="x64"', {
12 @@ -329,15 +328,11 @@
13                  'android_lib': '<(android_sysroot)/usr/lib',
14                }],
15              ],
16 -            'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include',
17 -            'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxabi/include',
18 -            'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs',
19              'android_support_include': '<(android_toolchain)/sources/android/support/include',
20              'android_sysroot': '<(android_sysroot)',
21            }, {
22              'variables': {
23                'android_sysroot': '<(android_ndk_root)/platforms/android-<(android_target_platform)/arch-<(android_target_arch)',
24 -              'android_stl': '<(android_ndk_root)/sources/cxx-stl/',
25              },
26              'conditions': [
27                ['target_arch=="x64"', {
28 @@ -346,14 +341,10 @@
29                  'android_lib': '<(android_sysroot)/usr/lib',
30                }],
31              ],
32 -            'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include',
33 -            'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxabi/include',
34 -            'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs',
35              'android_support_include': '<(android_ndk_root)/sources/android/support/include',
36              'android_sysroot': '<(android_sysroot)',
37            }],
38          ],
39 -        'android_libcpp_library': 'c++_static',
40        }],  # OS=="android"
41        ['host_clang==1', {
42          'host_cc': '<(clang_dir)/bin/clang',
43 @@ -1033,11 +1024,6 @@
44                '-Wa,--noexecstack',
45                '--sysroot=<(android_sysroot)',
46              ],
47 -            'cflags_cc': [
48 -              '-isystem<(android_libcpp_include)',
49 -              '-isystem<(android_libcpp_abi_include)',
50 -              '-isystem<(android_support_include)',
51 -            ],
52              'defines': [
53                'ANDROID',
54                #'__GNU_SOURCE=1',  # Necessary for clone()
55 @@ -1062,7 +1048,7 @@
56                  '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lplc4', '-lnspr4',
57                ],
58                'libraries': [
59 -                '-l<(android_libcpp_library)',
60 +               'libstdc++',
61                  '-latomic',
62                  # Manually link the libgcc.a that the cross compiler uses.
63                  '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
64 @@ -1083,24 +1069,6 @@
65                    '-mtune=cortex-a8',
66                    '-mfpu=vfp3',
67                  ],
68 -                'ldflags': [
69 -                  '-L<(android_libcpp_libs)/armeabi-v7a',
70 -                ],
71 -              }],
72 -              ['target_arch=="arm" and arm_version < 7', {
73 -                'ldflags': [
74 -                  '-L<(android_libcpp_libs)/armeabi',
75 -                ],
76 -              }],
77 -              ['target_arch=="x64"', {
78 -                'ldflags': [
79 -                  '-L<(android_libcpp_libs)/x86_64',
80 -                ],
81 -              }],
82 -              ['target_arch=="arm64"', {
83 -                'ldflags': [
84 -                  '-L<(android_libcpp_libs)/arm64-v8a',
85 -                ],
86                }],
87                ['target_arch=="ia32" or target_arch=="x87"', {
88                  # The x86 toolchain currently has problems with stack-protector.
89 @@ -1110,9 +1078,6 @@
90                  'cflags': [
91                    '-fno-stack-protector',
92                  ],
93 -                'ldflags': [
94 -                  '-L<(android_libcpp_libs)/x86',
95 -                ],
96                }],
97                ['target_arch=="mipsel"', {
98                  # The mips toolchain currently has problems with stack-protector.
99 @@ -1123,9 +1088,6 @@
100                  'cflags': [
101                    '-fno-stack-protector',
102                  ],
103 -                'ldflags': [
104 -                  '-L<(android_libcpp_libs)/mips',
105 -                ],
106                }],
107                ['(target_arch=="arm" or target_arch=="arm64" or target_arch=="x64" or target_arch=="ia32") and component!="shared_library"', {
108                  'cflags': [