From 614e86f564450fd31de39d3288866332298802c0 Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Thu, 26 May 2016 08:36:57 +0200 Subject: [PATCH] Platform detection: Use freebsd-g++ on systems < 10, otherwise -clang 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 --- configure | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 0e0a36b00fa..d175ed32b52 100755 --- a/configure +++ b/configure @@ -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++