Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Force compilers to use english#149

Merged
ignisf merged 1 commit intorubyjs:masterfrom
mauriciopasquier:fix-compiling-with-non-english-locales
Nov 16, 2014
Merged

Force compilers to use english#149
ignisf merged 1 commit intorubyjs:masterfrom
mauriciopasquier:fix-compiling-with-non-english-locales

Conversation

@mauriciopasquier
Copy link
Copy Markdown
Contributor

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 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

ignisf added a commit that referenced this pull request Nov 16, 2014
…english-locales

Force compilers to use english
@ignisf ignisf merged commit 7a7b025 into rubyjs:master Nov 16, 2014
ignisf added a commit that referenced this pull request Nov 16, 2014
Compiler version detection is unreliable with other locales. See #149.
Fixes #152
@mauriciopasquier mauriciopasquier deleted the fix-compiling-with-non-english-locales branch November 17, 2014 01:56
ignisf added a commit that referenced this pull request Apr 9, 2015
Compiler version detection is unreliable with other locales. See #149.
Fixes #152
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants