cowboyd/libv8 — pull request #149 by mauriciopasquier (2014-10-30 16:56:48+00:00)
Title: Force compilers to use english

Compiling was failing with this:

libv8/ext/libv8/builder.rb:28:in `make_flags': undefined method `include?' for nil:NilClass (NoMethodError)

when calling on `@compiler.target` because my gcc uses a spanish localization, so `TARGET_REGEXP` wasn't finding anything. This is a simple fix to force gcc to use an english locale.

Sorry about the lack of tests, I couldn't figure out how to test this.

PS: While researching this issue I came across the [-dumpmachine](https://gcc.gnu.org/onlinedocs/gcc-4.3.6/gcc/Debugging-Options.html#index-dumpmachine-769) parameter, which exists in every supported gcc version (and in my machine also works with clang, but somehow I think it's using gcc internally). Maybe using that parameter in the future is more solid than regexing `-v`.

$ gcc -dumpmachine
x86_64-unknown-linux-gnu

$ clang -dumpmachine
x86_64-unknown-linux-gnu

There is also a `-dumpversion` parameter but it was giving me inconsistencies with clang:

$ gcc -dumpversion
4.9.1

$ gcc -v
(...)
gcc version 4.9.1 (GCC)

and

$ clang -dumpversion
4.2.1

$ clang -v
clang version 3.5.0