annotate gcc/config/c6x/uclinux-elf.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Definitions for TI C6X running ucLinux using ELF
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 2010-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 Contributed by Andrew Jenner <andrew@codesourcery.com>
kono
parents:
diff changeset
4 Contributed by Bernd Schmidt <bernds@codesourcery.com>
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 This file is part of GCC.
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
9 under the terms of the GNU General Public License as published
kono
parents:
diff changeset
10 by the Free Software Foundation; either version 3, or (at your
kono
parents:
diff changeset
11 option) any later version.
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
16 License for more details.
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
19 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
20 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 #undef TARGET_OS_CPP_BUILTINS
kono
parents:
diff changeset
23 #define TARGET_OS_CPP_BUILTINS() \
kono
parents:
diff changeset
24 do \
kono
parents:
diff changeset
25 { \
kono
parents:
diff changeset
26 builtin_define ("__uClinux__"); \
kono
parents:
diff changeset
27 builtin_define_std ("linux"); \
kono
parents:
diff changeset
28 builtin_define_std ("unix"); \
kono
parents:
diff changeset
29 builtin_assert ("system=linux"); \
kono
parents:
diff changeset
30 builtin_assert ("system=unix"); \
kono
parents:
diff changeset
31 builtin_assert ("system=posix"); \
kono
parents:
diff changeset
32 } \
kono
parents:
diff changeset
33 while (false)
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 #undef STARTFILE_SPEC
kono
parents:
diff changeset
36 #define STARTFILE_SPEC \
kono
parents:
diff changeset
37 "%{!shared:crt1%O%s} crti%O%s %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 #undef LINK_SPEC
kono
parents:
diff changeset
42 #define LINK_SPEC ENDIAN_LINK_SPEC \
kono
parents:
diff changeset
43 "%{shared} %{" FPIE_SPEC ":-pie} \
kono
parents:
diff changeset
44 %{!shared: %{!static: \
kono
parents:
diff changeset
45 %{rdynamic:-export-dynamic} \
kono
parents:
diff changeset
46 %{!dynamic-linker:-dynamic-linker " UCLIBC_DYNAMIC_LINKER "}} \
kono
parents:
diff changeset
47 %{static}}"
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 #undef DRIVER_SELF_SPECS
kono
parents:
diff changeset
50 #define DRIVER_SELF_SPECS "%{!mno-dsbt:-mdsbt}"
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 /* Clear the instruction cache from `beg' to `end'. This makes an
kono
parents:
diff changeset
53 inline system call to SYS_cacheflush. */
kono
parents:
diff changeset
54 #undef CLEAR_INSN_CACHE
kono
parents:
diff changeset
55 #define CLEAR_INSN_CACHE(BEG, END) \
kono
parents:
diff changeset
56 { \
kono
parents:
diff changeset
57 register unsigned long _beg __asm ("A4") = (unsigned long) (BEG); \
kono
parents:
diff changeset
58 register unsigned long _end __asm ("B4") = (unsigned long) (END); \
kono
parents:
diff changeset
59 register unsigned long _scno __asm ("B0") = 244; \
kono
parents:
diff changeset
60 __asm __volatile ("swe ; sys_cache_sync" \
kono
parents:
diff changeset
61 : "=a" (_beg) \
kono
parents:
diff changeset
62 : "0" (_beg), "b" (_end), "b" (_scno)); \
kono
parents:
diff changeset
63 }