Force the locale when executing ld gold

Summary:
If run with other locales (like French),
the decode operation might fail

Reviewers: rafael

Differential Revision: http://reviews.llvm.org/D12432

llvm-svn: 246421
This commit is contained in:
Sylvestre Ledru 2015-08-31 07:10:05 +00:00
parent 58758ef4ea
commit 3675d1a6d0
1 changed files with 2 additions and 2 deletions

View File

@ -353,7 +353,7 @@ def have_ld_plugin_support():
if not os.path.exists(os.path.join(config.llvm_shlib_dir, 'LLVMgold.so')): if not os.path.exists(os.path.join(config.llvm_shlib_dir, 'LLVMgold.so')):
return False return False
ld_cmd = subprocess.Popen([config.gold_executable, '--help'], stdout = subprocess.PIPE) ld_cmd = subprocess.Popen([config.gold_executable, '--help'], stdout = subprocess.PIPE, env={'LANG': 'C'})
ld_out = ld_cmd.stdout.read().decode() ld_out = ld_cmd.stdout.read().decode()
ld_cmd.wait() ld_cmd.wait()
@ -374,7 +374,7 @@ def have_ld_plugin_support():
if 'elf32ppc' in emulations: if 'elf32ppc' in emulations:
config.available_features.add('ld_emu_elf32ppc') config.available_features.add('ld_emu_elf32ppc')
ld_version = subprocess.Popen([config.gold_executable, '--version'], stdout = subprocess.PIPE) ld_version = subprocess.Popen([config.gold_executable, '--version'], stdout = subprocess.PIPE, env={'LANG': 'C'})
if not 'GNU gold' in ld_version.stdout.read().decode(): if not 'GNU gold' in ld_version.stdout.read().decode():
return False return False
ld_version.wait() ld_version.wait()