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 mingw]: Add multilib support for i?86-w64-mingw32 target


Hello,

this patch enables the build of the i?86-w64-mingw32 target for
multilib version. Additional it fixes for the x86_64-*-mingw32 target
the used hwint and the use_long_long_for_widest_fast_int. I added to
cygwin host configuration in config.host the
use_long_long_for_widest_fast_int, too. If there are objections about
this please let me know (I'll remove it). But as far as I could see,
it should cause any penalties for cygwin.

ChangeLog

Changelog libtool

2009-09-12  Kai Tietz  <kai.tietz@onevision.com>

	* configure.ac: Set for i?86-w64-mingw*
	need_64bit_hwint to yes.
	* configure: Regenerated.


ChangeLog gcc

2009-09-12  Kai Tietz  <kai.tietz@onevision.com>

	* config.gcc (tm_file): Remove i386/biarch32.h
	for i?86-w64-mingw* case.
	(i?86-*-mingw* andx86_64-*-mingw*): Add multilib
	support.
	* config.host: Set for cygwin and x86/x64 mingw the
	option use_long_long_for_widest_fast_int to yes.


Tested for i686-pc-cygwin, i686-pc-mingw32, i686-w64-mingw32, and
x86_64-pc-mingw32,

Is this patch ok for apply to trunk?

Cheers,
Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
Index: gcc/gcc/config.gcc
===================================================================
--- gcc.orig/gcc/config.gcc	2009-09-12 14:04:09.045686000 +0200
+++ gcc/gcc/config.gcc	2009-09-12 18:32:25.819686800 +0200
@@ -373,12 +373,6 @@
 fi
 
 case ${target} in
-i[34567]86-w64-*)
-	tm_file="i386/biarch32.h ${tm_file}"
-	;;
-esac
-
-case ${target} in
 i[34567]86-*-*)
 	if test "x$enable_cld" = xyes; then
 		tm_defines="${tm_defines} USE_IX86_CLD=1"
@@ -1312,11 +1306,35 @@
 i[34567]86-*-mingw* | x86_64-*-mingw*)
 	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/mingw32.h"
 	xm_file=i386/xm-mingw32.h
+	case ${target} in
+		x86_64-*-* | *-w64-*)
+			need_64bit_hwint=yes
+			;;
+		*)
+			;;
+	esac
 	# This makes the logic if mingw's or the w64 feature set has to be used
 	case ${target} in
 		*-w64-*)
 			tm_file="${tm_file} i386/mingw-w64.h"
 			tmake_file="${tmake_file} i386/t-mingw-w64"
+			if test x$enable_targets = xall; then
+				tm_defines="${tm_defines} TARGET_BI_ARCH=1"
+				case X"${with_cpu}" in
+				Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
+					;;
+				X)
+					if test x$with_cpu_64 = x; then
+						with_cpu_64=generic
+					fi
+					;;
+				*)
+					echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
+					echo "generic atom core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx" 1>&2
+					exit 1
+					;;
+				esac
+			fi
 			;;
 		*)
 			tmake_file="${tmake_file} i386/t-mingw32"
Index: gcc/gcc/config.host
===================================================================
--- gcc.orig/gcc/config.host	2009-08-12 07:44:46.000000000 +0200
+++ gcc/gcc/config.host	2009-09-12 15:27:12.502686800 +0200
@@ -202,12 +202,14 @@
     esac
     ;;
   i[34567]86-*-pe | i[34567]86-*-cygwin*)
+    use_long_long_for_widest_fast_int=yes
     host_xm_file=i386/xm-cygwin.h
     out_host_hook_obj=host-cygwin.o
     host_xmake_file="${host_xmake_file} i386/x-cygwin"
     host_exeext=.exe
     ;;
   i[34567]86-*-mingw32* | x86_64-*-mingw*)
+    use_long_long_for_widest_fast_int=yes
     host_xm_file=i386/xm-mingw32.h
     host_xmake_file="${host_xmake_file} i386/x-mingw32"
     host_exeext=.exe
Index: gcc/libcpp/configure.ac
===================================================================
--- gcc.orig/libcpp/configure.ac	2009-08-25 12:21:03.000000000 +0200
+++ gcc/libcpp/configure.ac	2009-09-12 18:28:28.957686800 +0200
@@ -146,6 +146,7 @@
 	hppa*64*-*-* | \
 	i[34567]86-*-darwin* | \
 	i[34567]86-*-solaris2.1[0-9]* | \
+	i[34567]86-w64-mingw* | \
 	mips*-*-* | \
 	mmix-*-* | \
 	powerpc*-*-* | \

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