summaryrefslogtreecommitdiff
path: root/tools/gcc.py
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-11-10 18:29:08 +0800
committerBernard Xiong <[email protected]>2018-11-10 18:29:08 +0800
commitd687cfb22841ba0e1ccf4c946f672dfaeae239cb (patch)
treeaf7d6547eef20e642e1230c141585507f839924e /tools/gcc.py
parentb69baa965809420fc3fcd19dd55fc1126a68c08d (diff)
[Tools] Change building script for Py3
Diffstat (limited to 'tools/gcc.py')
-rw-r--r--tools/gcc.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/gcc.py b/tools/gcc.py
index 90e5a7dba8..11751ebeec 100644
--- a/tools/gcc.py
+++ b/tools/gcc.py
@@ -105,26 +105,27 @@ def GCCResult(rtconfig, str):
posix_thread = 0
for line in stdout.split(b'\n'):
- if re.search(b'fd_set', line):
+ line = line.decode()
+ if re.search('fd_set', line):
have_fdset = 1
# check for sigal
- if re.search(b'struct[ \t]+sigaction', line):
+ if re.search('struct[ \t]+sigaction', line):
have_sigaction = 1
- if re.search(b'struct[ \t]+sigevent', line):
+ if re.search('struct[ \t]+sigevent', line):
have_sigevent = 1
- if re.search(b'siginfo_t', line):
+ if re.search('siginfo_t', line):
have_siginfo = 1
- if re.search(b'union[ \t]+sigval', line):
+ if re.search('union[ \t]+sigval', line):
have_sigval = 1
- if re.search(b'char\* version', line):
- version = re.search(br'\"([^"]+)\"', line).groups()[0]
+ if re.search('char\* version', line):
+ version = re.search(r'\"([^"]+)\"', line).groups()[0]
- if re.findall(b'iso_c_visible = [\d]+', line):
+ if re.findall('iso_c_visible = [\d]+', line):
stdc = re.findall('[\d]+', line)[0]
- if re.findall(b'pthread_create', line):
+ if re.findall('pthread_create', line):
posix_thread = 1
if have_fdset: