Skip to content

Commit d62db57

Browse files
ci: Use Homebrew's gcc in native macOS task
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
1 parent b2f6712 commit d62db57

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.cirrus.yml

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ task:
139139
- env: {BUILD: distcheck}
140140
brew_script:
141141
- brew install automake libtool gcc
142+
- ln -s /opt/homebrew/bin/gcc-?? /opt/homebrew/bin/gcc
142143
test_script:
143144
- ./ci/cirrus.sh
144145
<< : *CAT_LOGS

ci/cirrus.sh

+7
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ esac
4343

4444
env >> test_env.log
4545

46+
# If gcc is requested, assert that it's in fact gcc (and not some symlinked Apple clang).
47+
case "${CC:-undefined}" in
48+
*gcc*)
49+
$CC -v 2>&1 | grep -q "gcc version" || exit 1;
50+
;;
51+
esac
52+
4653
if [ -n "${CC+x}" ]; then
4754
# The MSVC compiler "cl" doesn't understand "-v"
4855
$CC -v || true

0 commit comments

Comments
 (0)