(root)/
gcc-13.2.0/
gcc/
config/
rs6000/
netbsd.h
       1  /* Definitions of target machine for GNU compiler,
       2     for PowerPC NetBSD systems.
       3     Copyright (C) 2002-2023 Free Software Foundation, Inc.
       4     Contributed by Wasabi Systems, Inc.
       5  
       6     This file is part of GCC.
       7  
       8     GCC is free software; you can redistribute it and/or modify it
       9     under the terms of the GNU General Public License as published
      10     by the Free Software Foundation; either version 3, or (at your
      11     option) any later version.
      12  
      13     GCC is distributed in the hope that it will be useful, but WITHOUT
      14     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
      15     or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
      16     License for more details.
      17  
      18     You should have received a copy of the GNU General Public License
      19     along with GCC; see the file COPYING3.  If not see
      20     <http://www.gnu.org/licenses/>.  */
      21  
      22  /* Undef gnu-user.h macros we don't want.  */
      23  #undef CPLUSPLUS_CPP_SPEC
      24  #undef LINK_GCC_C_SEQUENCE_SPEC
      25  
      26  #undef  TARGET_OS_CPP_BUILTINS	/* FIXME: sysv4.h should not define this! */
      27  #define TARGET_OS_CPP_BUILTINS()		\
      28    do						\
      29      {						\
      30        NETBSD_OS_CPP_BUILTINS_ELF();		\
      31        builtin_define ("__powerpc__");		\
      32        builtin_assert ("cpu=powerpc");		\
      33        builtin_assert ("machine=powerpc");	\
      34      }						\
      35    while (0)
      36  
      37  /* Override the default from rs6000.h to avoid conflicts with macros
      38     defined in NetBSD header files.  */
      39  
      40  #undef  RS6000_CPU_CPP_ENDIAN_BUILTINS
      41  #define RS6000_CPU_CPP_ENDIAN_BUILTINS()	\
      42    do						\
      43      {						\
      44        if (BYTES_BIG_ENDIAN)			\
      45  	{					\
      46  	  builtin_define ("__BIG_ENDIAN__");	\
      47  	  builtin_assert ("machine=bigendian");	\
      48  	}					\
      49        else					\
      50  	{					\
      51  	  builtin_define ("__LITTLE_ENDIAN__");	\
      52  	  builtin_assert ("machine=littleendian"); \
      53  	}					\
      54      }						\
      55    while (0)
      56  
      57  /* Make GCC agree with <machine/ansi.h>.  */
      58  
      59  #undef  SIZE_TYPE
      60  #define SIZE_TYPE "unsigned int"
      61  
      62  #undef  PTRDIFF_TYPE
      63  #define PTRDIFF_TYPE "int"
      64  
      65  /* Undo the spec mess from sysv4.h, and just define the specs
      66     the way NetBSD systems actually expect.  */
      67  
      68  #undef  CPP_SPEC
      69  #define CPP_SPEC NETBSD_CPP_SPEC
      70  
      71  #undef  LINK_SPEC
      72  #define LINK_SPEC \
      73    "%{!msdata=none:%{G*}} %{msdata=none:-G0} \
      74     %(netbsd_link_spec)"
      75  
      76  #define NETBSD_ENTRY_POINT "_start"
      77  
      78  #undef  STARTFILE_SPEC
      79  #define STARTFILE_SPEC NETBSD_STARTFILE_SPEC
      80  
      81  #undef  ENDFILE_SPEC
      82  #define ENDFILE_SPEC "%(netbsd_endfile_spec)"
      83  
      84  #undef  LIB_SPEC
      85  #define LIB_SPEC NETBSD_LIB_SPEC
      86  
      87  #undef  SUBTARGET_EXTRA_SPECS
      88  #define SUBTARGET_EXTRA_SPECS					\
      89    { "netbsd_link_spec",		NETBSD_LINK_SPEC_ELF },		\
      90    { "netbsd_entry_point",	NETBSD_ENTRY_POINT },		\
      91    { "netbsd_endfile_spec",	NETBSD_ENDFILE_SPEC },
      92  
      93  
      94  /* Use standard DWARF numbering for DWARF debugging information.  */
      95  #define RS6000_USE_DWARF_NUMBERING
      96