]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/sh/linux.h
configure.in (sh-*-linux*): Added.
[thirdparty/gcc.git] / gcc / config / sh / linux.h
1 /* Definitions for SH running Linux-based GNU systems using ELF
2 Copyright (C) 1999, 2000 Free Software Foundation, Inc.
3 Contributed by Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
21
22 /* Run-time Target Specification. */
23 #undef TARGET_VERSION
24 #define TARGET_VERSION fputs (" (SH GNU/Linux with ELF)", stderr);
25
26 /* Return to the original ELF way. */
27 #undef USER_LABEL_PREFIX
28 #define USER_LABEL_PREFIX ""
29
30 #undef SIZE_TYPE
31 #define SIZE_TYPE "unsigned int"
32
33 #undef PTRDIFF_TYPE
34 #define PTRDIFF_TYPE "int"
35
36 #undef WCHAR_TYPE
37 #define WCHAR_TYPE "long int"
38
39 #undef WCHAR_TYPE_SIZE
40 #define WCHAR_TYPE_SIZE BITS_PER_WORD
41
42 #undef CPP_SPEC
43 #define CPP_SPEC \
44 "%{mb:-D__BIG_ENDIAN__} \
45 %{!mb:-D__LITTLE_ENDIAN__} \
46 %{m3e:-D__SH3E__} \
47 %{m4:-D__SH4__} \
48 %{!m3e:%{!m4:-D__SH3__ -D__sh3__}} \
49 %{fPIC:-D__PIC__ -D__pic__} \
50 %{fpic:-D__PIC__ -D__pic__} \
51 %{posix:-D_POSIX_SOURCE} \
52 %{pthread:-D_REENTRANT -D_PTHREADS}"
53
54 #undef CPP_PREDEFINES
55 #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sh__ -Dlinux -Asystem(posix)"
56
57 #undef ASM_SPEC
58 #define ASM_SPEC "%{!mb:-little} %{mrelax:-relax}"
59
60 #undef CC1_SPEC
61 #define CC1_SPEC \
62 "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
63
64 #undef CC1PLUS_SPEC
65 #define CC1PLUS_SPEC \
66 "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
67
68 #undef LINK_SPEC
69 #define LINK_SPEC \
70 "%{!mb:-m shlelf_linux} %{mrelax:-relax} \
71 %{shared:-shared} \
72 %{!static: \
73 %{rdynamic:-export-dynamic} \
74 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1} \
75 %{!rpath:-rpath /lib}} \
76 %{static:-static}"
77
78 #undef LIB_SPEC
79 #define LIB_SPEC \
80 "%{shared: -lc} \
81 %{!shared: %{pthread:-lthread} \
82 %{profile:-lc_p} %{!profile: -lc}}"
83
84 #undef STARTFILE_SPEC
85 #define STARTFILE_SPEC \
86 "%{!shared: \
87 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
88 %{!p:%{profile:gcrt1.o%s} \
89 %{!profile:crt1.o%s}}}} \
90 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"