Skip to contentSkip to conversation

Fix: .split() the CC environment variable in lttng-gen-tp

PATCH New Jérémie Galarneau 2 participants 2 messages Apr 8, 2014 2 messages not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 Fix: .split() the CC environment variable in lttng-gen-tp

In reply to a message not in the archive

The CC variable might contain command line arguments which lttng-gen-tp currently does not handle. This fix ensures that the arguments are properly passed on to the compiler binary as if a normal Makefile was used.

---
 tools/lttng-gen-tp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lttng-gen-tp +1 -1
index a3a01f2..b62cd99 100755
@@ -94,7 +94,7 @@ class ObjFile:
         if 'CC' in os.environ:
             cc = os.environ['CC']
             try:
-                subprocess.call(cc,
+                subprocess.call(cc.split(),
                                 stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE)
             except OSError as msg:
Signature · 7 lines
1.9.1


_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
#3 lore raw
In reply to a message not in the archive

merged, thanks!

Mathieu

----- Original Message -----

Quoted 34 lines

From: "Jérémie Galarneau" <[email protected]>
To: [email protected]
Cc: "mathieu desnoyers" <[email protected]>, "jan glauber" <[email protected]>, "Jérémie Galarneau" <[email protected]>
Sent: Tuesday, April 8, 2014 11:28:23 AM
Subject: [PATCH lttng-ust] Fix: .split() the CC environment variable in lttng-gen-tp

The CC variable might contain command line arguments which lttng-gen-tp currently does not handle. This fix ensures that the arguments are properly passed on to the compiler binary as if a normal Makefile was used.

---
 tools/lttng-gen-tp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lttng-gen-tp +1 -2
index a3a01f2..b62cd99 100755
@@ -94,7 +94,7 @@ class ObjFile:
         if 'CC' in os.environ:
             cc = os.environ['CC']
             try:
-                subprocess.call(cc,
+                subprocess.call(cc.split(),
                                 stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE)
             except OSError as msg:
--

1.9.1

Signature · 8 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev