| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2655c7b commit 78c7d66
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -672,7 +672,10 @@ def get_xcode_version(cc): | |||
| 672 | 672 | def get_gas_version(cc): | |
| 673 | 673 | try: | |
| 674 | 674 | custom_env = os.environ.copy() | |
| 675 | - custom_env["LC_ALL"] = "en_US" | ||
| 675 | + # smartos (a.k.a. sunos5) does not have the en_US locale, and will give: | ||
| 676 | + # `setlocale: LC_ALL: cannot change locale (en_US): Invalid argument` | ||
| 677 | + if 'sunos' not in sys.platform: | ||
| 678 | + custom_env["LC_ALL"] = "en_US" | ||
| 676 | 679 | proc = subprocess.Popen(shlex.split(cc) + ['-Wa,-v', '-c', '-o', | |
| 677 | 680 | '/dev/null', '-x', | |
| 678 | 681 | 'assembler', '/dev/null'], | |
@@ -685,12 +688,13 @@ def get_gas_version(cc): | |||
| 685 | 688 | consider adjusting the CC environment variable if you installed | |
| 686 | 689 | it in a non-standard prefix.''') | |
| 687 | 690 | ||
| 688 | - match = re.match(r"GNU assembler version ([2-9]\.[0-9]+)", | ||
| 689 | - proc.communicate()[1]) | ||
| 691 | + gas_ret = proc.communicate()[1] | ||
| 692 | + match = re.match(r"GNU assembler version ([2-9]\.[0-9]+)", gas_ret) | ||
| 690 | 693 | ||
| 691 | 694 | if match: | |
| 692 | 695 | return match.group(1) | |
| 693 | 696 | else: | |
| 697 | + warn('Could not recognize `gas`: ' + gas_ret) | ||
| 694 | 698 | return '0' | |
| 695 | 699 | ||
| 696 | 700 | # Note: Apple clang self-reports as clang 4.2.0 and gcc 4.2.1. It passes | |
| Back | FazBrowse Home | New Git URL |
0 commit comments