Bug with x86_64 and gcc without -fPIC cflags fixed
authorlbessard
Fri, 22 Aug 2008 14:17:31 +0200
changeset 511 34300a28ad27
parent 510 96d50ac2dea3
child 512 e84806c0ada4
Bug with x86_64 and gcc without -fPIC cflags fixed
configure
--- a/configure	Wed Aug 20 13:28:28 2008 +0200
+++ b/configure	Fri Aug 22 14:17:31 2008 +0200
@@ -246,12 +246,6 @@
 echo "Host OS: ${SUB_OS_NAME}"
 echo "Host arch: ${SUB_ARCH_NAME}"
 
-if [ "$SUB_ARCH_NAME" = "x86_64" -a "$CC" = "gcc" ]; then
-	# Only if we are on x86_64 and using gcc
-	# For shared library generation, it needs this
-	SUB_PROG_CFLAGS=-fPIC
-fi
-
 if [ "$SUB_ARCH_NAME" = "ppc" -o "$SUB_ARCH_NAME" = "powerpc" ]; then
 	# PowerPC uses big endian format
 	CANOPEN_BIG_ENDIAN=1
@@ -516,6 +510,12 @@
 
 echo "Using ${CC} as a C compiler"
 
+if [ "$SUB_ARCH_NAME" = "x86_64" -a "$CC" = "gcc" ]; then
+	# Only if we are on x86_64 and using gcc
+	# For shared library generation, it needs this
+	SUB_PROG_CFLAGS=-fPIC
+fi
+
 if [ "$BINUTILS_PREFIX" = "" ]; then
 	SUB_BINUTILS_PREFIX=`echo "$CC" | sed 's/gcc$//'`
 else