OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [config/] [frv/] [linux.h] - Diff between revs 38 and 154

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 38 Rev 154
/* Target macros for the FRV Linux port of GCC.
/* Target macros for the FRV Linux port of GCC.
   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007
   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
   Contributed by Red Hat Inc.
   Contributed by Red Hat Inc.
 
 
   This file is part of GCC.
   This file is part of GCC.
 
 
   GCC is free software; you can redistribute it and/or modify it
   GCC is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published
   under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 3, or (at your
   by the Free Software Foundation; either version 3, or (at your
   option) any later version.
   option) any later version.
 
 
   GCC is distributed in the hope that it will be useful, but WITHOUT
   GCC is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   License for more details.
   License for more details.
 
 
   You should have received a copy of the GNU General Public License
   You should have received a copy of the GNU General Public License
   along with GCC; see the file COPYING3.  If not see
   along with GCC; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.  */
   <http://www.gnu.org/licenses/>.  */
 
 
#ifndef __FRV_LINUX_H__
#ifndef __FRV_LINUX_H__
#define __FRV_LINUX_H__
#define __FRV_LINUX_H__
 
 
#undef SUBTARGET_DRIVER_SELF_SPECS
#undef SUBTARGET_DRIVER_SELF_SPECS
#define SUBTARGET_DRIVER_SELF_SPECS \
#define SUBTARGET_DRIVER_SELF_SPECS \
  "%{!mno-fdpic:-mfdpic}",
  "%{!mno-fdpic:-mfdpic}",
 
 
#undef STARTFILE_SPEC
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
#define STARTFILE_SPEC \
  "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
  "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
 
 
#undef ENDFILE_SPEC
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
#define ENDFILE_SPEC \
  "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
  "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
 
 
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
 
 
#undef LINK_SPEC
#undef LINK_SPEC
#define LINK_SPEC "\
#define LINK_SPEC "\
  %{mfdpic: -m elf32frvfd -z text} %{shared} %{pie} \
  %{mfdpic: -m elf32frvfd -z text} %{shared} %{pie} \
  %{!shared: %{!static: \
  %{!shared: %{!static: \
   %{rdynamic:-export-dynamic} \
   %{rdynamic:-export-dynamic} \
   %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
   %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
   %{static}}"
   %{static}}"
 
 
/* Support for compile-time default CPU.  */
/* Support for compile-time default CPU.  */
#define OPTION_DEFAULT_SPECS \
#define OPTION_DEFAULT_SPECS \
  {"cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }
  {"cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }
 
 
/* Define OS-specific predefined preprocessor macros.  */
/* Define OS-specific predefined preprocessor macros.  */
#define TARGET_OS_CPP_BUILTINS()        \
#define TARGET_OS_CPP_BUILTINS()        \
  do {                                  \
  do {                                  \
    builtin_define ("__gnu_linux__");   \
    builtin_define ("__gnu_linux__");   \
    builtin_define_std ("linux");       \
    builtin_define_std ("linux");       \
    builtin_define_std ("unix");        \
    builtin_define_std ("unix");        \
    builtin_assert ("system=linux");    \
    builtin_assert ("system=linux");    \
  } while (0)
  } while (0)
 
 
#define HAS_INIT_SECTION 1
#define HAS_INIT_SECTION 1
#define INIT_SECTION_ASM_OP     "\t.section .init,\"ax\""
#define INIT_SECTION_ASM_OP     "\t.section .init,\"ax\""
#define FINI_SECTION_ASM_OP     "\t.section .fini,\"ax\""
#define FINI_SECTION_ASM_OP     "\t.section .fini,\"ax\""
 
 
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)      \
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)      \
asm (SECTION_OP); \
asm (SECTION_OP); \
asm ("ldi.p @(fp,4), gr15 ! call " #FUNC); \
asm ("ldi.p @(fp,4), gr15 ! call " #FUNC); \
asm (TEXT_SECTION_ASM_OP);
asm (TEXT_SECTION_ASM_OP);
 
 
#undef INVOKE__main
#undef INVOKE__main
 
 
#undef Twrite
#undef Twrite
#define Twrite __write
#define Twrite __write
 
 
#endif /* __FRV_LINUX_H__ */
#endif /* __FRV_LINUX_H__ */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.