Skip to content

Commit

Permalink
tools: fix v doctor output on OpenBSD: get gcc version from egcc; d…
Browse files Browse the repository at this point in the history
…o not run ldd to get the glibc version (fix #23576) (#23578)
  • Loading branch information
lcheylus authored Jan 26, 2025
1 parent 67a8c81 commit 5bfea9d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cmd/tools/vdoctor.v
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,23 @@ fn (mut a App) collect_info() {
a.line('.git/config present', os.is_file('.git/config').str())
a.line('', '')
a.line('cc version', a.cmd(command: 'cc --version'))
a.line('gcc version', a.cmd(command: 'gcc --version'))
if os_kind == 'openbsd' {
a.line('gcc version', a.cmd(command: 'egcc --version'))
} else {
a.line('gcc version', a.cmd(command: 'gcc --version'))
}
a.line('clang version', a.cmd(command: 'clang --version'))
if os_kind == 'windows' {
// Check for MSVC on windows
a.line('msvc version', a.cmd(command: 'cl'))
}
a.report_tcc_version('thirdparty/tcc')
a.line('emcc version', a.cmd(command: 'emcc --version'))
a.line('glibc version', a.cmd(command: 'ldd --version'))
if os_kind != 'openbsd' {
a.line('glibc version', a.cmd(command: 'ldd --version'))
} else {
a.line('glibc version', 'N/A')
}
}

struct CmdConfig {
Expand Down

0 comments on commit 5bfea9d

Please sign in to comment.