Re: RFC: x86_64-pc-mingw64 and getting it mapped out

Earnie Boyd <[email protected]> Sat, 27 Jul 2013 07:49:32 -0400
Newsgroups gmane.comp.gnu.mingw.devel
Message-ID <CA+sc5mkY5D0U=movGA_BpQxYn81hk3yr27xPaM+vBDgFizYrWg@mail.gmail.com>
On Thu, Jul 18, 2013 at 10:18 AM, Charles Wilson wrote:
> On 7/2/2013 5:40 AM, Keith Marshall wrote:
>> On 25/06/13 20:48, Earnie Boyd wrote:
>>> I would prefer we offer cross compilers 32bit to 64bit and 64bit to
>>> 32bit and the user specifies the --host to configure.
>>
>> I agree.
>
> Yes, please. Multilib is just ASKING for trouble. I've hated it ever
> since IRIX (with three different simultaneous binary models).

So for this to work correctly we need to store the files in the -dev
delivery in the default include and lib directories as well as the
triplet specific directory.  Or maybe supply a -tdev (t for target)
package that lays out files in the appropriate triplet directory.  Or
is there some specification to mingw-get we can suggest the directory
structure for some meta -tdev package using the -dev package for
source?

I would prefer to use i686-pc-mingw and x86_64-pc-mingw instead of
i686-pc-mingw32 and x86_64-pc-mingw64 for the triplets.  I don't see
the importance of retaining the 32 and 64 for the triplet designation.

I would like to suggest the following patch to the config maintainer,
any objection?  I need something better than "It will break my current
environment."; such is the life of programming in an "improving"
world.

~~~~~
diff --git a/config.guess b/config.guess
index b79252d..c78a14e 100755
--- a/config.guess
+++ b/config.guess
@@ -820,18 +820,15 @@ EOF
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
 	exit ;;
-    *:MINGW64*:*)
-	echo ${UNAME_MACHINE}-pc-mingw64
-	exit ;;
     *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
+	echo ${UNAME_MACHINE}-pc-mingw
 	exit ;;
     i*:MSYS*:*)
 	echo ${UNAME_MACHINE}-pc-msys
 	exit ;;
     i*:windows32*:*)
 	# uname -m includes "-pc" on this system.
-	echo ${UNAME_MACHINE}-mingw32
+	echo ${UNAME_MACHINE}-mingw
 	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
diff --git a/config.sub b/config.sub
index 8b612ab..5f68dd0 100755
--- a/config.sub
+++ b/config.sub
@@ -240,6 +240,14 @@ case $os in
 		basic_machine=m68k-atari
 		os=-mint
 		;;
+	-mingw64*)
+		basic_machine=x86_64-pc
+		os=-mingw
+		;;
+	-mingw32*)
+		basic_machine=i686-pc
+		os=-mingw
+		;;
 esac

 # Decode aliases for certain CPU-COMPANY combinations.
@@ -791,11 +799,11 @@ case $basic_machine in
 		;;
 	mingw64)
 		basic_machine=x86_64-pc
-		os=-mingw64
+		os=-mingw
 		;;
 	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
+		basic_machine=i686-pc
+		os=-mingw
 		;;
 	mingw32ce)
 		basic_machine=arm-unknown
@@ -1219,7 +1227,7 @@ case $basic_machine in
 		;;
 	xbox)
 		basic_machine=i686-pc
-		os=-mingw32
+		os=-mingw
 		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
@@ -1365,7 +1373,7 @@ case $os in
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -mingw* | -linux-gnu* | -linux-android* \
 	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
~~~~~

Results:

$ config.guess
i686-pc-mingw

$ config.sub mingw32
i686-pc-mingw

$ config.sub mingw64
x86_64-pc-mingw

$ config.sub i686-pc-mingw64
x86_64-pc-mingw

$ config.sub x86_64-pc-mingw32
i686-pc-mingw

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk