fix GNU GCC path issue in building script.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1953 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com 2012-02-17 09:20:33 +00:00
parent cc2ce9fa40
commit 4cc052e155
1 changed files with 19 additions and 15 deletions

View File

@ -436,17 +436,21 @@ class Win32Spawn:
cmdline = cmd + " " + newargs
startupinfo = subprocess.STARTUPINFO()
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,
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False)
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False, env=penv)
data, err = proc.communicate()
rv = proc.wait()
if err:
print err
if rv:
return rv
if data:
print data
if err:
print err
if rv:
return rv
return 0
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()))
sys.exit(1)
elif (GetDepend('RT_USING_NEWLIB') == False and GetDepend('RT_USING_NOLIBC') == False) \
and rtconfig.PLATFORM == 'gcc':
and rtconfig.PLATFORM == 'gcc':
AddDepend('RT_USING_MINILIBC')
#env['CCCOMSTR'] = "CC $TARGET"
@ -649,12 +653,12 @@ def EndBuilding(target):
IARProject('project.ewp', Projects)
def SrcRemove(src, remove):
if type(src[0]) == type('str'):
for item in src:
if os.path.basename(item) in remove:
src.remove(item)
return
if type(src[0]) == type('str'):
for item in src:
if os.path.basename(item) in remove:
src.remove(item)
return
for item in src:
if os.path.basename(item.rstr()) in remove:
src.remove(item)
for item in src:
if os.path.basename(item.rstr()) in remove:
src.remove(item)