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]

Default to G4 on darwin for 10.5+


This patch defaults ppc compiles to G4 for compiles that target 10.5
or later.

Checked into mainline and 4.2.  Tested on powerpc-apple-darwin9.


2006-12-08  Mike Stump  <mrs@apple.com>

	* config/rs6000/t-darwin (TARGET_LIBGCC2_CFLAGS): Build
	libgcc with -mmacosx-version-min=10.4.
	* config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): Default to
	G4 for 10.5+ unless doing kernel builds.

Doing diffs in .:
--- ./config/rs6000/darwin.h.~1~	2006-11-12 13:50:16.000000000 -0800
+++ ./config/rs6000/darwin.h	2006-12-04 19:25:59.000000000 -0800
@@ -96,6 +96,18 @@ do {									\
       rs6000_default_long_calls = 1;					\
       target_flags |= MASK_SOFT_FLOAT;					\
     }									\
+  /* Unless the user (not the configurer) has explicitly overridden	\
+     it with -mcpu=G3 or -mno-altivec, then 10.5+ targets default to	\
+     G4 unless targetting the kernel.  */				\
+  if (!flag_mkernel							\
+      && !flag_apple_kext						\
+      && darwin_macosx_version_min					\
+      && strverscmp (darwin_macosx_version_min, "10.5") >= 0		\
+      && ! (target_flags_explicit & MASK_ALTIVEC)			\
+      && ! rs6000_select[1].string)					\
+    {									\
+      target_flags |= MASK_ALTIVEC;					\
+    }									\
 } while(0)
 
 #define C_COMMON_OVERRIDE_OPTIONS do {					\
--- ./config/rs6000/t-darwin.~1~	2006-09-28 17:57:12.000000000 -0700
+++ ./config/rs6000/t-darwin	2006-12-04 17:44:48.000000000 -0800
@@ -18,7 +18,7 @@ DARWIN_EXTRA_CRT_BUILD_CFLAGS = -mlongca
 # it to not properly process the first # directive, causing temporary
 # file names to appear in stabs, causing the bootstrap to fail.  Using -pipe
 # works around this by not having any temporary file names.
-TARGET_LIBGCC2_CFLAGS = -Wa,-force_cpusubtype_ALL -pipe
+TARGET_LIBGCC2_CFLAGS = -Wa,-force_cpusubtype_ALL -pipe -mmacosx-version-min=10.4
 
 # Export the _xlq* symbols from darwin-ldouble.c.
 SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc64.ver
--------------


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