This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Don't set TM_MULTILIB_CONFIG if --disable-multilib is used


Hi,

When --disable-multilib is used on Linux/x86-64 target, we still set

TM_MULTILIB_CONFIG=m64,m32

It isn't necessary and doesn't work if the default ABI is -mx32.  This
patch checks --with-multilib-list for x86-64 Linux targets only if
multilib is enabled.  OK for trunk?

Thanks.


H.J.
---
2012-03-28  H.J. Lu  <hongjiu.lu@intel.com>

	* config.gcc: Check --with-multilib-list for x86-64 Linux targets
	only if multilib is enabled. 

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 1f2baee..86d12db 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1275,22 +1296,24 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
 		;;
 	esac
 	tmake_file="${tmake_file} i386/t-linux64"
-	x86_multilibs="${with_multilib_list}"
-	if test "$x86_multilibs" = "default"; then
-		x86_multilibs="m64,m32"
+	if test "x$enable_multilib" = "xyes"; then
+		x86_multilibs="${with_multilib_list}"
+		if test "$x86_multilibs" = "default"; then
+			x86_multilibs="m64,m32"
+		fi
+		x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
+		for x86_multilib in ${x86_multilibs}; do
+			case ${x86_multilib} in
+			m32 | m64 | mx32)
+				TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
+				;;
+			*)
+				echo "--with-multilib-list=${x86_with_multilib} not supported."
+				exit 1
+			esac
+		done
+		TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
 	fi
-	x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
-	for x86_multilib in ${x86_multilibs}; do
-		case ${x86_multilib} in
-		m32 | m64 | mx32)
-			TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
-			;;
-		*)
-			echo "--with-multilib-list=${x86_with_multilib} not supported."
-			exit 1
-		esac
-	done
-	TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
 	;;
 i[34567]86-pc-msdosdjgpp*)
 	xm_file=i386/xm-djgpp.h


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]