-
Notifications
You must be signed in to change notification settings - Fork 1
/
aix_gyp.patch
62 lines (54 loc) · 1.99 KB
/
aix_gyp.patch
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
--- build/gyp/pylib/gyp/common.py
+++ build/gyp/pylib/gyp/common.py
@@ -378,6 +378,8 @@
return 'solaris'
if sys.platform.startswith('freebsd'):
return 'freebsd'
+ if sys.platform.startswith('aix'):
+ return 'aix'
return 'linux'
--- build/gyp/pylib/gyp/generator/make.py
+++ build/gyp/pylib/gyp/generator/make.py
@@ -200,6 +200,21 @@
"""
+ LINK_COMMANDS_AIX = """\
+ quiet_cmd_alink = AR($(TOOLSET)) $@
+ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^)
+
+ quiet_cmd_link = LINK($(TOOLSET)) $@
+ cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)
+
+ quiet_cmd_solink = SOLINK($(TOOLSET)) $@
+ cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
+
+ quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
+ cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
+ """
+
+
# Header of toplevel Makefile.
# This should go into the build tree, but it's easier to keep it here for now.
SHARED_HEADER = ("""\
--- build/gyp/pylib/gyp/generator/make.py
+++ build/gyp/pylib/gyp/generator/make.py
@@ -1933,6 +1948,10 @@
cc_command=cc_host):
arflags_host = 'crsT'
+ if flavor == 'aix':
+ arflags_target = '-Xany ' + arflags_target
+ arflags_host = '-Xany ' + arflags_host
+
return { 'ARFLAGS.target': arflags_target,
'ARFLAGS.host': arflags_host }
--- build/gyp/pylib/gyp/generator/make.py
+++ build/gyp/pylib/gyp/generator/make.py
@@ -2026,6 +2045,10 @@
elif flavor == 'freebsd':
header_params.update({
'flock': 'lockf',
+ })
+ elif flavor == 'aix':
+ header_params.update({
+ 'link_commands': LINK_COMMANDS_AIX,
})
header_params.update(RunSystemTests(flavor))