mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-10-30 08:41:08 +01:00
Silence warnings when testing gccs
This silences the warning that gcc-4.2 produces on Yosemite:
couldn't understand kern.osversion `14.0.0'
This commit is contained in:
parent
10fd04909d
commit
dafba300b1
2 changed files with 11 additions and 1 deletions
|
|
@ -766,7 +766,7 @@ verify_gcc() {
|
|||
return 1
|
||||
fi
|
||||
|
||||
local version="$("$gcc" --version || true)"
|
||||
local version="$("$gcc" --version 2>/dev/null || true)"
|
||||
if [ -z "$version" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -36,3 +36,13 @@ CC=${TMP}/bin/gcc
|
|||
MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
OUT
|
||||
}
|
||||
|
||||
@test "require_gcc silences warnings" {
|
||||
stub gcc '--version : echo warning >&2; echo 4.2.1'
|
||||
|
||||
run_inline_definition <<DEF
|
||||
require_gcc
|
||||
echo \$CC
|
||||
DEF
|
||||
assert_success "${TMP}/bin/gcc"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue