[Git][NTPsec/ntpsec][master] 2 commits: Lexically split waf's cross compiling flags
Matt Selsky
gitlab at mg.gitlab.com
Thu Apr 27 12:01:53 UTC 2017
Matt Selsky pushed to branch master at NTPsec / ntpsec
Commits:
815e2a13 by Matt Selsky at 2017-04-27T02:49:29-04:00
Lexically split waf's cross compiling flags
Lexically split the strings of the input list and then chain the list items
together to produce a single list.
- - - - -
10df5260 by Matt Selsky at 2017-04-27T03:33:50-04:00
Cross-compiler also needs it's arguments split lexically...
so that we can popen with a list later
- - - - -
1 changed file:
- wscript
Changes:
=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -1,6 +1,8 @@
from __future__ import print_function
+import itertools
import os
+import shlex
import sys
import time
@@ -241,14 +243,18 @@ def configure(ctx):
# ctx.get_cc_version(ctx.env.CC, gcc=True)
ctx.end_msg(ctx.options.cross_compiler)
- ctx.env.CC = [ctx.options.cross_compiler]
- ctx.env.LINK_CC = [ctx.options.cross_compiler]
+ ctx.env.CC = shlex.split(ctx.options.cross_compiler)
+ ctx.env.LINK_CC = shlex.split(ctx.options.cross_compiler)
if ctx.env["CROSS-CFLAGS"]:
- ctx.env.CFLAGS = opt_map["CROSS-CFLAGS"]
+ # Lexically split each part of the CFLAGS, then chain the lists
+ iter = [shlex.split(x) for x in opt_map["CROSS-CFLAGS"]]
+ ctx.env.CFLAGS = list(itertools.chain.from_iterable(iter))
if ctx.env["CROSS-LDFLAGS"]:
- ctx.env.LDFLAGS = opt_map["CROSS-LDFLAGS"]
+ # Lexically split each part of the LDFLAGS, then chain the lists
+ iter = [shlex.split(x) for x in opt_map["CROSS-LDFLAGS"]]
+ ctx.env.LDFLAGS = list(itertools.chain.from_iterable(iter))
if ctx.options.list:
from wafhelpers.refclock import refclock_map
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/93bebd860d1e2362a0237a41d13e578aede41fee...10df5260e7312549a66d523c7f24c5ead85ac4cd
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/93bebd860d1e2362a0237a41d13e578aede41fee...10df5260e7312549a66d523c7f24c5ead85ac4cd
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170427/e1cd1ac5/attachment.html>
More information about the vc
mailing list