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]

PATCH: New config, Darwin / Mac OS X (host-only)


Here are the bits I mentioned yesterday.  They should be
noncontroversial, the worst being the designated initializer
hack which is needed for unbelievably lame reasons that I hope
will go away once we get onto current GCC...

Stan

2000-11-07  Stan Shebs  <shebs@apple.com>

	* config/rs6000/xm-darwin.h: New file, Darwin host definitions.
	* config/rs6000/x-darwin: New file, Darwin host fragment.
	* configure.in (powerpc-*-darwin*): New host.
	* configure: Regenerate.
	* system.h (HAVE_DESIGNATED_INITIALIZERS):  Allow this to be
	overridden by a config file.

diff -rpN base-gcc/gcc/config/rs6000/x-darwin gcc/gcc/config/rs6000/x-darwin
*** base-gcc/gcc/config/rs6000/x-darwin	Wed Dec 31 16:00:00 1969
--- gcc/gcc/config/rs6000/x-darwin	Tue Nov  7 18:17:23 2000
***************
*** 0 ****
--- 1,5 ----
+ # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
+ # sources; use -traditional-cpp to get to GNU cpp. (This is another
+ # peculiarity of Apple's GCC that we hope to get rid of.)
+ 
+ CC = cc -traditional-cpp
diff -rpN base-gcc/gcc/config/rs6000/xm-darwin.h gcc/gcc/config/rs6000/xm-darwin.h
*** base-gcc/gcc/config/rs6000/xm-darwin.h	Wed Dec 31 16:00:00 1969
--- gcc/gcc/config/rs6000/xm-darwin.h	Tue Nov  7 18:08:54 2000
***************
*** 0 ****
--- 1,11 ----
+ #include "rs6000/xm-rs6000.h"
+ 
+ /* Undo the USG definition in xm-rs6000.h, Darwin is a BSD flavor.  */
+ 
+ #undef USG
+ 
+ /* Override the usual setting, since Apple's GCC has lame bugs and
+    can't handle the initializers.  Someday they will be fixed and we
+    can get rid of this silliness.  */
+ 
+ #define HAVE_DESIGNATED_INITIALIZERS 0
diff -rpN base-gcc/gcc/configure.in gcc/gcc/configure.in
*** base-gcc/gcc/configure.in	Tue Nov  7 18:25:11 2000
--- gcc/gcc/configure.in	Tue Nov  7 17:56:55 2000
*************** changequote([,])dnl
*** 3199,3204 ****
--- 3199,3208 ----
  		tmake_file=rs6000/t-beos
  		xmake_file=rs6000/x-beos
  		;;
+ 	powerpc-*-darwin*)
+ 		xm_file=rs6000/xm-darwin.h
+ 		xmake_file=rs6000/x-darwin
+ 		;;
  	powerpc-*-sysv*)
  		tm_file=rs6000/sysv4.h
  		xm_file="rs6000/xm-sysv4.h"
diff -rpN base-gcc/gcc/system.h gcc/gcc/system.h
*** base-gcc/gcc/system.h	Tue Nov  7 18:25:11 2000
--- gcc/gcc/system.h	Tue Nov  7 18:02:55 2000
*************** extern void abort PARAMS ((void));
*** 469,476 ****
--- 469,478 ----
  #endif
  
  /* 1 if we have C99 designated initializers.  */
+ #if !defined(HAVE_DESIGNATED_INITIALIZERS)
  #define HAVE_DESIGNATED_INITIALIZERS \
    ((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
+ #endif
  
  /* Define a STRINGIFY macro that's right for ANSI or traditional C.
     Note: if the argument passed to STRINGIFY is itself a macro, eg

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