Skip to content

Commit cda1696

Browse files
committed
---
yaml --- r: 150911 b: refs/heads/try2 c: 682c401 h: refs/heads/master i: 150909: bd6710c 150907: 8b8b736 150903: 0dd0402 150895: 203ffb0 150879: efed65a 150847: 786a295 150783: 8303ec4 v: v3
1 parent 9eb613d commit cda1696

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 32a81d1e161a8b4a498c88ddb79955775d18fbfd
8+
refs/heads/try2: 682c401045fbc24ecec8cab0e315293192825c69
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/configure

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -579,26 +579,32 @@ then
579579
CFG_ENABLE_CLANG=1
580580
putvar CFG_ENABLE_CLANG
581581
else
582-
# on OS X, with xcode 5 and newer, certain developers may have
583-
# cc, gcc and g++ point to a mixture of clang and gcc
584-
# if so, this will create very strange build errors
585-
# this last stanza is to detect some such problems and save the future rust
586-
# contributor some time solving that issue.
587-
# this detection could be generalized to other OSes aside from OS X
588-
# but the issue seems most likely to happen on OS X
589-
590-
chk_cc () {
591-
$1 --version 2> /dev/null | grep -q $2
592-
}
593-
# check that gcc, cc and g++ all point to the same compiler.
594-
# note that for xcode 5, g++ points to clang, not clang++
595-
if !((chk_cc gcc clang && chk_cc g++ clang) ||
596-
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))) then
597-
err "the gcc and g++ in your path point to different compilers.
598-
Check which versions are in your path with cc --version and g++ --version.
599-
To resolve this problem, either fix your PATH or run configure with --enable-clang"
600-
fi
582+
if [ $("$CFG_GCC" --version 2>&1 | grep -c ' 4\.[0-6]') -ne 0 ]; then
583+
step_msg "older GCC found, using clang instead"
584+
CFG_ENABLE_CLANG=1
585+
putvar CFG_ENABLE_CLANG
586+
else
587+
# on OS X, with xcode 5 and newer, certain developers may have
588+
# cc, gcc and g++ point to a mixture of clang and gcc
589+
# if so, this will create very strange build errors
590+
# this last stanza is to detect some such problems and save the future rust
591+
# contributor some time solving that issue.
592+
# this detection could be generalized to other OSes aside from OS X
593+
# but the issue seems most likely to happen on OS X
594+
595+
chk_cc () {
596+
$1 --version 2> /dev/null | grep -q $2
597+
}
598+
# check that gcc, cc and g++ all point to the same compiler.
599+
# note that for xcode 5, g++ points to clang, not clang++
600+
if !((chk_cc gcc clang && chk_cc g++ clang) ||
601+
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))) then
602+
err "the gcc and g++ in your path point to different compilers.
603+
Check which versions are in your path with cc --version and g++ --version.
604+
To resolve this problem, either fix your PATH or run configure with --enable-clang"
605+
fi
601606

607+
fi
602608
fi
603609
fi
604610

0 commit comments

Comments
 (0)