Commit dafba300 by Mislav Marohnić

Silence warnings when testing gccs

This silences the warning that gcc-4.2 produces on Yosemite:

    couldn't understand kern.osversion `14.0.0'
parent 10fd0490
...@@ -766,7 +766,7 @@ verify_gcc() { ...@@ -766,7 +766,7 @@ verify_gcc() {
return 1 return 1
fi fi
local version="$("$gcc" --version || true)" local version="$("$gcc" --version 2>/dev/null || true)"
if [ -z "$version" ]; then if [ -z "$version" ]; then
return 1 return 1
fi fi
......
...@@ -36,3 +36,13 @@ CC=${TMP}/bin/gcc ...@@ -36,3 +36,13 @@ CC=${TMP}/bin/gcc
MACOSX_DEPLOYMENT_TARGET=10.9 MACOSX_DEPLOYMENT_TARGET=10.9
OUT 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"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment