(root)/
gcc-13.2.0/
gcc/
config/
aarch64/
aarch64-netbsd.h
       1  /* Definitions for AArch64 running NetBSD
       2     Copyright (C) 2016-2023 Free Software Foundation, Inc.
       3  
       4     This file is part of GCC.
       5  
       6     GCC is free software; you can redistribute it and/or modify it
       7     under the terms of the GNU General Public License as published by
       8     the Free Software Foundation; either version 3, or (at your option)
       9     any later version.
      10  
      11     GCC is distributed in the hope that it will be useful, but
      12     WITHOUT ANY WARRANTY; without even the implied warranty of
      13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      14     General Public License for more details.
      15  
      16     You should have received a copy of the GNU General Public License
      17     along with GCC; see the file COPYING3.  If not see
      18     <http://www.gnu.org/licenses/>.  */
      19  
      20  #ifndef GCC_AARCH64_NETBSD_H
      21  #define GCC_AARCH64_NETBSD_H
      22  
      23  #define TARGET_LINKER_BIG_EMULATION "aarch64nbsdb"
      24  #define TARGET_LINKER_LITTLE_EMULATION "aarch64nbsd"
      25  
      26  #if TARGET_BIG_ENDIAN_DEFAULT
      27  #define TARGET_LINKER_EMULATION  TARGET_LINKER_BIG_EMULATION
      28  #else
      29  #define TARGET_LINKER_EMULATION  TARGET_LINKER_LITTLE_EMULATION
      30  #endif
      31  
      32  #undef  SUBTARGET_EXTRA_LINK_SPEC
      33  #define SUBTARGET_EXTRA_LINK_SPEC " -m" TARGET_LINKER_EMULATION
      34  
      35  #define NETBSD_ENTRY_POINT "__start"
      36  
      37  #define NETBSD_TARGET_LINK_SPEC  "%{h*} "				\
      38    "-X %{mbig-endian:-EB -m " TARGET_LINKER_BIG_EMULATION "} "		\
      39    "%{mlittle-endian:-EL -m " TARGET_LINKER_LITTLE_EMULATION "} "	\
      40    "%(netbsd_link_spec)"
      41  
      42  #undef  LINK_SPEC
      43  #define LINK_SPEC NETBSD_LINK_SPEC_ELF		\
      44  		  NETBSD_TARGET_LINK_SPEC	\
      45  		  AARCH64_ERRATA_LINK_SPEC
      46  
      47  #undef TARGET_OS_CPP_BUILTINS
      48  #define TARGET_OS_CPP_BUILTINS()		\
      49    do						\
      50      {						\
      51        NETBSD_OS_CPP_BUILTINS_ELF();		\
      52      }						\
      53    while (0)
      54  
      55  #undef SUBTARGET_CPP_SPEC
      56  #define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC
      57  
      58  #undef EXTRA_SPECS
      59  #define EXTRA_SPECS \
      60    { "asm_cpu_spec",             ASM_CPU_SPEC }, \
      61    NETBSD_SUBTARGET_EXTRA_SPECS
      62  
      63  #endif  /* GCC_AARCH64_NETBSD_H */