From 7a1eca8375bfb7f59496f7ddcd34aa5d6133fc45 Mon Sep 17 00:00:00 2001
From: Eric Christopher <echristo@apple.com>
Date: Wed, 6 Jun 2007 22:43:49 +0000
Subject: [PATCH] config.gcc (i?86-*-darwin*): Remove arch parameter.

2007-06-06  Eric Christopher  <echristo@apple.com>

	    * config.gcc (i?86-*-darwin*): Remove arch parameter.
	    (x86_64-*-darwin*): Ditto.
	    * config/i386/darwin.h (TARGET_SUBTARGET32_ISA_DEFAULT): Define.
	    (TARGET_SUBTARGET64_ISA_DEFAULT): Ditto.

From-SVN: r125508
---
 gcc/ChangeLog            |  7 +++++++
 gcc/config.gcc           |  2 --
 gcc/config/i386/darwin.h | 13 +++++++++++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c4a7680557af..44fef001437b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2007-06-06  Eric Christopher  <echristo@apple.com>
+
+	* config.gcc (i?86-*-darwin*): Remove arch parameter.
+	(x86_64-*-darwin*): Ditto.
+	* config/i386/darwin.h (TARGET_SUBTARGET32_ISA_DEFAULT): Define.
+	(TARGET_SUBTARGET64_ISA_DEFAULT): Ditto.
+
 2007-06-06  Thomas Neumann  <tneumann@users.sourceforge.net>
 
 	* tree-ssa-alias-warnings.c (maybe_add_match): Cast according to the
diff --git a/gcc/config.gcc b/gcc/config.gcc
index c4a47f9a5871..3b5882e26c74 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1052,12 +1052,10 @@ i[34567]86-*-darwin*)
 	# config.guess deciding that the configuration is i386-*-darwin* and
 	# then this file using that to set --with-cpu=i386 which has no -m64
 	# support.
-	with_arch=${with_arch:-nocona}
 	with_cpu=${with_cpu:-generic}
 	tmake_file="${tmake_file} i386/t-fprules-softfp64 soft-fp/t-softfp"
 	;;
 x86_64-*-darwin*)
-	with_arch=${with_arch:-nocona}
 	with_cpu=${with_cpu:-generic}
 	tmake_file="t-darwin ${cpu_type}/t-darwin64 t-slibgcc-darwin i386/t-fprules-softfp64 soft-fp/t-softfp"
 	tm_file="${tm_file} ${cpu_type}/darwin64.h"
diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h
index e489134a1212..f8732c56a47b 100644
--- a/gcc/config/i386/darwin.h
+++ b/gcc/config/i386/darwin.h
@@ -131,6 +131,19 @@ extern void darwin_x86_file_end (void);
 #undef TARGET_SUBTARGET_DEFAULT
 #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_128BIT_LONG_DOUBLE)
 
+/* For darwin we want to target specific processor features as a minimum,
+   but these unfortunately don't correspond to a specific processor.  */
+#undef TARGET_SUBTARGET32_ISA_DEFAULT
+#define TARGET_SUBTARGET32_ISA_DEFAULT (OPTION_MASK_ISA_MMX		\
+					| OPTION_MASK_ISA_SSE		\
+					| OPTION_MASK_ISA_SSE2)
+
+#undef TARGET_SUBTARGET64_ISA_DEFAULT
+#define TARGET_SUBTARGET64_ISA_DEFAULT (OPTION_MASK_ISA_MMX		\
+					| OPTION_MASK_ISA_SSE		\
+					| OPTION_MASK_ISA_SSE2		\
+					| OPTION_MASK_ISA_SSE3)
+
 /* For now, disable dynamic-no-pic.  We'll need to go through i386.c
    with a fine-tooth comb looking for refs to flag_pic!  */
 #define MASK_MACHO_DYNAMIC_NO_PIC 0
-- 
GitLab