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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [config/] [frv/] [linux.h] - Blame information for rev 316

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 282 jeremybenn
/* Target macros for the FRV Linux port of GCC.
2
   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007
3
   Free Software Foundation, Inc.
4
   Contributed by Red Hat 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
#ifndef __FRV_LINUX_H__
23
#define __FRV_LINUX_H__
24
 
25
#undef SUBTARGET_DRIVER_SELF_SPECS
26
#define SUBTARGET_DRIVER_SELF_SPECS \
27
  "%{!mno-fdpic:-mfdpic}",
28
 
29
#undef STARTFILE_SPEC
30
#define STARTFILE_SPEC \
31
  "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
32
   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
33
 
34
#undef ENDFILE_SPEC
35
#define ENDFILE_SPEC \
36
  "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
37
 
38
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
39
 
40
#undef LINK_SPEC
41
#define LINK_SPEC "\
42
  %{mfdpic: -m elf32frvfd -z text} %{shared} %{pie} \
43
  %{!shared: %{!static: \
44
   %{rdynamic:-export-dynamic} \
45
   %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
46
   %{static}}"
47
 
48
/* Support for compile-time default CPU.  */
49
#define OPTION_DEFAULT_SPECS \
50
  {"cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }
51
 
52
/* Define OS-specific predefined preprocessor macros.  */
53
#define TARGET_OS_CPP_BUILTINS()        \
54
  do {                                  \
55
    builtin_define ("__gnu_linux__");   \
56
    builtin_define_std ("linux");       \
57
    builtin_define_std ("unix");        \
58
    builtin_assert ("system=linux");    \
59
  } while (0)
60
 
61
#define HAS_INIT_SECTION 1
62
#define INIT_SECTION_ASM_OP     "\t.section .init,\"ax\""
63
#define FINI_SECTION_ASM_OP     "\t.section .fini,\"ax\""
64
 
65
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)      \
66
asm (SECTION_OP); \
67
asm ("ldi.p @(fp,4), gr15 ! call " #FUNC); \
68
asm (TEXT_SECTION_ASM_OP);
69
 
70
#undef INVOKE__main
71
 
72
#undef Twrite
73
#define Twrite __write
74
 
75
#endif /* __FRV_LINUX_H__ */

powered by: WebSVN 2.1.0

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