]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/sh/linux.h
1a3948386fcad00671471180ac987c8f0a2fdf61
[thirdparty/gcc.git] / gcc / config / sh / linux.h
1 /* Definitions for SH running Linux-based GNU systems using ELF
2 Copyright (C) 1999, 2000, 2002 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 #undef SUBTARGET_CPP_SPEC
27 #define SUBTARGET_CPP_SPEC "\
28 %{posix:-D_POSIX_SOURCE} \
29 %{pthread:-D_REENTRANT -D_PTHREADS} \
30 "
31
32 #define TARGET_OS_CPP_BUILTINS() \
33 do { \
34 builtin_define_std ("unix"); \
35 builtin_define ("__gnu_linux__"); \
36 builtin_define_std ("linux"); \
37 builtin_assert ("system=posix"); \
38 } while (0)
39
40 #undef TARGET_DEFAULT
41 #define TARGET_DEFAULT \
42 (TARGET_CPU_DEFAULT | USERMODE_BIT | TARGET_ENDIAN_DEFAULT)
43
44 #undef SUBTARGET_LINK_EMUL_SUFFIX
45 #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
46 #undef SUBTARGET_LINK_SPEC
47 #define SUBTARGET_LINK_SPEC \
48 "%{shared:-shared} \
49 %{!static: \
50 %{rdynamic:-export-dynamic} \
51 %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
52 %{!rpath:-rpath /lib}} \
53 %{static:-static}"
54
55 #undef LIB_SPEC
56 #define LIB_SPEC \
57 "%{shared: -lc} \
58 %{!shared: %{pthread:-lthread} \
59 %{profile:-lc_p} %{!profile: -lc}}"
60
61 #undef STARTFILE_SPEC
62 #define STARTFILE_SPEC \
63 "%{!shared: \
64 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
65 %{!p:%{profile:gcrt1.o%s} \
66 %{!profile:crt1.o%s}}}} \
67 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"