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]

Follow-up to sparc/ CPP_PREDEFINES


I'd missed that config/sol2.h defines TARGET_OS_CPP_BUILTINS.
As a result we have a macro clash.  I've resolved this with the
following patch, tested on sparc-foo-openbsd64 and sparc-foo-solaris2,
which I'm about to apply.

Neil.

	* config/sol2.h: Add TARGET_SUB_OS_CPP_BUILTINS.
	* config/sparc/liteelf.h, config/sparc/openbsd64.h,
	config/sparc/rtemself.h, config/sparc/sol2-64.h,
	config/sparc/sp64-elf.h, config/sparc/sp86x-elf.h:
	Update for use of TARGET_SUB_OS_CPP_BUILTINS.

============================================================
Index: gcc/config/sol2.h
*** gcc/config/sol2.h	20 Jun 2002 11:03:37 -0000	1.1
--- gcc/config/sol2.h	17 May 2003 13:41:49 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 53,58 ****
--- 53,59 ----
  "
  
  /* Names to predefine in the preprocessor for this target machine.  */
+ #define TARGET_SUB_OS_CPP_BUILTINS()
  #define TARGET_OS_CPP_BUILTINS()			\
      do {						\
  	builtin_define_std ("unix");			\
*************** Boston, MA 02111-1307, USA.  */
*** 62,68 ****
  	builtin_define ("__PRAGMA_REDEFINE_EXTNAME");	\
  	builtin_assert ("system=unix");			\
  	builtin_assert ("system=svr4");			\
! 	/* For C++ we need to add some additional macro \
  	   definitions required by the C++ standard	\
  	   library.  */					\
  	if (c_language == clk_cplusplus)		\
--- 63,69 ----
  	builtin_define ("__PRAGMA_REDEFINE_EXTNAME");	\
  	builtin_assert ("system=unix");			\
  	builtin_assert ("system=svr4");			\
! 	/* For C++ we need to add some additional macro	\
  	   definitions required by the C++ standard	\
  	   library.  */					\
  	if (c_language == clk_cplusplus)		\
*************** Boston, MA 02111-1307, USA.  */
*** 72,77 ****
--- 73,79 ----
  	    builtin_define ("_LARGEFILE64_SOURCE=1");	\
  	    builtin_define ("__EXTENSIONS__");		\
  	  }						\
+ 	TARGET_SUB_OS_CPP_BUILTINS();			\
      } while (0)
  
  /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
============================================================
Index: gcc/config/sparc/liteelf.h
*** gcc/config/sparc/liteelf.h	17 May 2003 07:19:56 -0000	1.10
--- gcc/config/sparc/liteelf.h	17 May 2003 13:41:49 -0000
*************** along with GNU CC; see the file COPYING.
*** 19,25 ****
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
  
! #define TARGET_OS_CPP_BUILTINS()		\
    do						\
      {						\
  	builtin_define ("__sparclite__");	\
--- 19,26 ----
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
  
! #undef TARGET_SUB_OS_CPP_BUILTINS
! #define TARGET_SUB_OS_CPP_BUILTINS()		\
    do						\
      {						\
  	builtin_define ("__sparclite__");	\
============================================================
Index: gcc/config/sparc/openbsd64.h
*** gcc/config/sparc/openbsd64.h	17 May 2003 07:19:56 -0000	1.2
--- gcc/config/sparc/openbsd64.h	17 May 2003 13:41:49 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 31,37 ****
  #define SPARC_DEFAULT_CMODEL CM_MEDMID
  
  /* Target OS builtins.  */
- #undef TARGET_OS_CPP_BUILTINS	 /* Defined in sp64-elf.h.  */
  #define TARGET_OS_CPP_BUILTINS()		\
    do						\
      {						\
--- 31,36 ----
============================================================
Index: gcc/config/sparc/rtemself.h
*** gcc/config/sparc/rtemself.h	17 May 2003 07:19:56 -0000	1.9
--- gcc/config/sparc/rtemself.h	17 May 2003 13:41:49 -0000
*************** the Free Software Foundation, 59 Temple 
*** 20,26 ****
  Boston, MA 02111-1307, USA.  */
  
  /* Target OS builtins.  */
! #define TARGET_OS_CPP_BUILTINS()		\
    do						\
      {						\
  	builtin_define_std ("sparc");		\
--- 20,26 ----
  Boston, MA 02111-1307, USA.  */
  
  /* Target OS builtins.  */
! #define TARGET_SUB_OS_CPP_BUILTINS()		\
    do						\
      {						\
  	builtin_define_std ("sparc");		\
============================================================
Index: gcc/config/sparc/sol2-64.h
*** gcc/config/sparc/sol2-64.h	17 May 2003 07:19:56 -0000	1.4
--- gcc/config/sparc/sol2-64.h	17 May 2003 13:41:49 -0000
***************
*** 7,13 ****
     MASK_STACK_BIAS + MASK_FPU + MASK_LONG_DOUBLE_128)
  
  /* Target OS builtins.  */
! #define TARGET_OS_CPP_BUILTINS()		\
    do						\
      {						\
  	builtin_define_std ("sparc");		\
--- 7,14 ----
     MASK_STACK_BIAS + MASK_FPU + MASK_LONG_DOUBLE_128)
  
  /* Target OS builtins.  */
! #undef TARGET_SUB_OS_CPP_BUILTINS
! #define TARGET_SUB_OS_CPP_BUILTINS()		\
    do						\
      {						\
  	builtin_define_std ("sparc");		\
============================================================
Index: gcc/config/sparc/sp64-elf.h
*** gcc/config/sparc/sp64-elf.h	17 May 2003 07:19:56 -0000	1.25
--- gcc/config/sparc/sp64-elf.h	17 May 2003 13:41:49 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 38,45 ****
  #undef SPARC_DEFAULT_CMODEL
  #define SPARC_DEFAULT_CMODEL CM_EMBMEDANY
  
! /* Target OS builtins.  */
! #define TARGET_OS_CPP_BUILTINS()		\
    do						\
      {						\
  	builtin_define_std ("sparc");		\
--- 38,46 ----
  #undef SPARC_DEFAULT_CMODEL
  #define SPARC_DEFAULT_CMODEL CM_EMBMEDANY
  
! /* Target OS builtins for config/sol.h.  */
! #undef TARGET_SUB_OS_CPP_BUILTINS
! #define TARGET_SUB_OS_CPP_BUILTINS()		\
    do						\
      {						\
  	builtin_define_std ("sparc");		\
============================================================
Index: gcc/config/sparc/sp86x-elf.h
*** gcc/config/sparc/sp86x-elf.h	17 May 2003 07:19:56 -0000	1.11
--- gcc/config/sparc/sp86x-elf.h	17 May 2003 13:41:49 -0000
*************** along with GNU CC; see the file COPYING.
*** 19,25 ****
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
  
! #define TARGET_OS_CPP_BUILTINS()		\
    do						\
      {						\
  	builtin_define ("__sparclite86x__");	\
--- 19,26 ----
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
  
! #undef  TARGET_SUB_OS_CPP_BUILTINS
! #define TARGET_SUB_OS_CPP_BUILTINS()		\
    do						\
      {						\
  	builtin_define ("__sparclite86x__");	\


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