From d029cfd10a40dfdac0c2b4471393c19620733aac Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 30 Jun 2021 11:42:16 +1000 Subject: [PATCH] Solaris native compiler configure fixes * Drop '-mt' from '$CC' * Use '$CC -V' for version in summary --- configure | 15 ++++++++++++--- configure.ac | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 0ebbef81ab..dee6484a66 100755 --- a/configure +++ b/configure @@ -17341,7 +17341,7 @@ then CCNOOPT="$CCNOOPT -pthread" ;; *-solaris*) - CC="$CC -mt" + CC="$CC" CCOPT="$CCOPT -mt" CCNOOPT="$CCNOOPT -mt" ;; @@ -29223,8 +29223,17 @@ report() { echo " localstatedir: $localstatedir" echo "-------------------------------------------------------------------------------" echo "Compiler: $CC" - $CC --version 2>&1 | sed 's/^/ /' - + if test "yes" == "$GCC"; then + $CC --version 2>&1 | sed 's/^/ /' + else + case "$host_os" in + solaris*) + $CC -V 2>&1 | sed 's/^/ /' + ;; + *) + $CC --version 2>&1 | sed 's/^/ /' + esac + fi if test "X$ac_unrecognized_opts" != "X"; then echo "Unrecognized options:" echo " $ac_unrecognized_opts" diff --git a/configure.ac b/configure.ac index f877ecc3d2..05773db68f 100644 --- a/configure.ac +++ b/configure.ac @@ -1325,7 +1325,7 @@ then CCNOOPT="$CCNOOPT -pthread" ;; *-solaris*) - CC="$CC -mt" + CC="$CC" CCOPT="$CCOPT -mt" CCNOOPT="$CCNOOPT -mt" ;; @@ -5769,8 +5769,17 @@ report() { echo " localstatedir: $localstatedir" echo "-------------------------------------------------------------------------------" echo "Compiler: $CC" - $CC --version 2>&1 | sed 's/^/ /' - + if test "yes" == "$GCC"; then + $CC --version 2>&1 | sed 's/^/ /' + else + case "$host_os" in + solaris*) + $CC -V 2>&1 | sed 's/^/ /' + ;; + *) + $CC --version 2>&1 | sed 's/^/ /' + esac + fi if test "X$ac_unrecognized_opts" != "X"; then echo "Unrecognized options:" echo " $ac_unrecognized_opts"