提交 4cc052e1 编写于 作者: B bernard.xiong@gmail.com

fix GNU GCC path issue in building script.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1953 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 cc2ce9fa
...@@ -436,17 +436,21 @@ class Win32Spawn: ...@@ -436,17 +436,21 @@ class Win32Spawn:
cmdline = cmd + " " + newargs cmdline = cmd + " " + newargs
startupinfo = subprocess.STARTUPINFO() startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
penv = {}
for key, value in env.iteritems():
penv[key] = str(value)
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE, proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False) stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False, env=penv)
data, err = proc.communicate() data, err = proc.communicate()
rv = proc.wait() rv = proc.wait()
if data:
print data
if err: if err:
print err print err
if rv: if rv:
return rv return rv
if data:
print data
return 0 return 0
def PrepareBuilding(env, root_directory, has_libcpu=False): def PrepareBuilding(env, root_directory, has_libcpu=False):
...@@ -498,7 +502,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False): ...@@ -498,7 +502,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False):
(tgt_name, ', '.join(tgt_dict.keys())) (tgt_name, ', '.join(tgt_dict.keys()))
sys.exit(1) sys.exit(1)
elif (GetDepend('RT_USING_NEWLIB') == False and GetDepend('RT_USING_NOLIBC') == False) \ elif (GetDepend('RT_USING_NEWLIB') == False and GetDepend('RT_USING_NOLIBC') == False) \
and rtconfig.PLATFORM == 'gcc': and rtconfig.PLATFORM == 'gcc':
AddDepend('RT_USING_MINILIBC') AddDepend('RT_USING_MINILIBC')
#env['CCCOMSTR'] = "CC $TARGET" #env['CCCOMSTR'] = "CC $TARGET"
...@@ -649,12 +653,12 @@ def EndBuilding(target): ...@@ -649,12 +653,12 @@ def EndBuilding(target):
IARProject('project.ewp', Projects) IARProject('project.ewp', Projects)
def SrcRemove(src, remove): def SrcRemove(src, remove):
if type(src[0]) == type('str'): if type(src[0]) == type('str'):
for item in src: for item in src:
if os.path.basename(item) in remove: if os.path.basename(item) in remove:
src.remove(item) src.remove(item)
return return
for item in src: for item in src:
if os.path.basename(item.rstr()) in remove: if os.path.basename(item.rstr()) in remove:
src.remove(item) src.remove(item)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册