fix freebsd linking #7705
diff --git a/Misc/NEWS b/Misc/NEWS
index 4ce035f..60e6d8f 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -60,6 +60,11 @@
   measures the number of UDP packets processed per second depending on the
   number of background CPU-bound Python threads.
 
+Build
+-----
+
+- Issue #7705: Fix linking on FreeBSD.
+
 
 What's New in Python 2.7 alpha 4?
 =================================
diff --git a/configure b/configure
index 0e95b85..eaf822a 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 78817 .
+# From configure.in Revision: 78819 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for python 2.7.
 #
@@ -14860,7 +14860,7 @@
 	FreeBSD*)
 		if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
 		then
-			LDSHARED="$CC -shared ${LDFLAGS}"
+			LDSHARED="$(CC) -shared ${LDFLAGS}"
 		else
 			LDSHARED="ld -Bshareable ${LDFLAGS}"
 		fi;;
diff --git a/configure.in b/configure.in
index 0fadd75..20e54fc 100644
--- a/configure.in
+++ b/configure.in
@@ -1829,7 +1829,7 @@
 	FreeBSD*)
 		if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
 		then
-			LDSHARED="$CC -shared ${LDFLAGS}"
+			LDSHARED="$(CC) -shared ${LDFLAGS}"
 		else
 			LDSHARED="ld -Bshareable ${LDFLAGS}"
 		fi;;