File gyp-rpmoptflags.patch of Package gyp (Revision 6ffce0804f096ecd57bba6239d8b331a)
Currently displaying revision 6ffce0804f096ecd57bba6239d8b331a , Show latest
34
1
Index: pylib/gyp/generator/make.py
2
===================================================================
3
--- pylib/gyp/generator/make.py.orig
4
+++ pylib/gyp/generator/make.py
5
6
# Write configuration-specific variables for CFLAGS, etc.
7
for configname in sorted(configs.keys()):
8
config = configs[configname]
9
+ rpmoptflags = ['$(RPM_OPT_FLAGS)']
10
self.WriteList(config.get('defines'), 'DEFS_%s' % configname, prefix='-D',
11
quoter=EscapeCppDefine)
12
13
14
cflags_objcc = self.xcode_settings.GetCflagsObjCC(configname)
15
else:
16
cflags = config.get('cflags')
17
+ if cflags:
18
+ cflags += rpmoptflags
19
+ else:
20
+ cflags = rpmoptflags
21
cflags_c = config.get('cflags_c')
22
+ if cflags_c:
23
+ cflags_c += rpmoptflags
24
+ else:
25
+ cflags_c = rpmoptflags
26
cflags_cc = config.get('cflags_cc')
27
+ if cflags_cc:
28
+ cflags_cc += rpmoptflags
29
+ else:
30
+ cflags_cc = rpmoptflags
31
32
self.WriteLn("# Flags passed to all source files.");
33
self.WriteList(cflags, 'CFLAGS_%s' % configname)
34