[PATCH] [compiler-rt] Fix CompilerTargetTriple for non-English locales

OGINO Masanori masanori.ogino at gmail.com
Fri Feb 14 21:18:26 PST 2014


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.

http://llvm-reviews.chandlerc.com/D2812

Files:
  make/platform/clang_linux.mk

Index: make/platform/clang_linux.mk
===================================================================
--- make/platform/clang_linux.mk
+++ make/platform/clang_linux.mk
@@ -11,7 +11,7 @@
 # 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2812.1.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140214/2f193a28/attachment.bin>


More information about the llvm-commits mailing list