Skip to content

Commit

Permalink
Platform detection: Use freebsd-g++ on systems < 10, otherwise -clang
Browse files Browse the repository at this point in the history
FreeBSD uses gcc as the default compiler until FreeBSD 10 where it was
switched to clang for the whole system. Choose freebsd-clang
for any system release > 10, otherwise choose freebsd-g++ by default.

Change-Id: I2bf38aa027453c25ed2a29d587c2962ded5fcd4a
Reviewed-by: Oswald Buddenhagen <[email protected]>
  • Loading branch information
Ralf Nolden committed May 27, 2016
1 parent c85f988 commit 614e86f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -2859,10 +2859,17 @@ if [ -z "$PLATFORM" ]; then
PLATFORM=ultrix-g++
;;
FreeBSD:*)
PLATFORM=freebsd-clang
PLATFORM_NOTES="
- Also available for FreeBSD: freebsd-g++
"
if [ "$(uname -r | cut -d. -f1)" -ge 10 ]; then
PLATFORM=freebsd-clang
PLATFORM_NOTES="
- Also available for FreeBSD: freebsd-g++
"
else
PLATFORM=freebsd-g++
PLATFORM_NOTES="
- Also available for FreeBSD: freebsd-clang
"
fi
;;
OpenBSD:*)
PLATFORM=openbsd-g++
Expand Down

0 comments on commit 614e86f

Please sign in to comment.