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:
parent
cc2ce9fa40
commit
4cc052e155
|
@ -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 err:
|
|
||||||
print err
|
|
||||||
if rv:
|
|
||||||
return rv
|
|
||||||
|
|
||||||
if data:
|
if data:
|
||||||
print data
|
print data
|
||||||
|
if err:
|
||||||
|
print err
|
||||||
|
|
||||||
|
if rv:
|
||||||
|
return rv
|
||||||
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):
|
||||||
(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):
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue