[compiler-rt] r201506 - [compiler-rt] Fix CompilerTargetTriple for non-English locales.

Alexey Samsonov samsonov at google.com
Mon Feb 17 01:14:02 PST 2014


Author: samsonov
Date: Mon Feb 17 03:14:01 2014
New Revision: 201506

URL: http://llvm.org/viewvc/llvm-project?rev=201506&view=rev
Log:
[compiler-rt] Fix CompilerTargetTriple for non-English locales.

When the locale of a shell is set other than English locales or the C locale,
The word 'Target' may be translated. Thus, with e.g. ja_JP locale, compiler-rt
couldn't be built properly. Forcing LANG=C fixes the problem.

Patch by Ogino Masanori.

Modified:
    compiler-rt/trunk/make/platform/clang_linux.mk

Modified: compiler-rt/trunk/make/platform/clang_linux.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/clang_linux.mk?rev=201506&r1=201505&r2=201506&view=diff
==============================================================================
--- compiler-rt/trunk/make/platform/clang_linux.mk (original)
+++ compiler-rt/trunk/make/platform/clang_linux.mk Mon Feb 17 03:14:01 2014
@@ -11,7 +11,7 @@ Configs :=
 # cross compilers). For now, we just find the target architecture of the
 # compiler and only define configurations we know that compiler can generate.
 CompilerTargetTriple := $(shell \
-	$(CC) -v 2>&1 | grep 'Target:' | cut -d' ' -f2)
+	LANG=C $(CC) -v 2>&1 | grep 'Target:' | cut -d' ' -f2)
 ifeq ($(CompilerTargetTriple),)
 $(error "unable to infer compiler target triple for $(CC)")
 endif





More information about the llvm-commits mailing list