1114402Sru/* Configuration common to all targets running RTEMS.
2151497Sru   Copyright (C) 2000-2020 Free Software Foundation, Inc.
3114402Sru
4114402Sru   This file is part of GCC.
5114402Sru
6114402Sru   GCC is free software; you can redistribute it and/or modify it
7114402Sru   under the terms of the GNU General Public License as published
8114402Sru   by the Free Software Foundation; either version 3, or (at your
9114402Sru   option) any later version.
10114402Sru
11114402Sru   GCC is distributed in the hope that it will be useful, but WITHOUT
12114402Sru   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13114402Sru   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
14114402Sru   License for more details.
15114402Sru
16114402Sru   Under Section 7 of GPL version 3, you are granted additional
17114402Sru   permissions described in the GCC Runtime Library Exception, version
18114402Sru   3.1, as published by the Free Software Foundation.
19151497Sru
20114402Sru   You should have received a copy of the GNU General Public License and
21114402Sru   a copy of the GCC Runtime Library Exception along with this program;
22114402Sru   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
23114402Sru   <http://www.gnu.org/licenses/>.  */
24114402Sru
25114402Sru#ifndef RTEMS_STARTFILE_SPEC
26114402Sru#define RTEMS_STARTFILE_SPEC "crti%O%s crtbegin%O%s"
27114402Sru#endif
28114402Sru
29114402Sru#ifndef RTEMS_ENDFILE_SPEC
30151497Sru#define RTEMS_ENDFILE_SPEC "crtend%O%s crtn%O%s"
31114402Sru#endif
32151497Sru
33151497Sru/*
34114402Sru * The crt0.o is a dummy start file to let the linker work as needed by
35114402Sru * autoconf scripts using this compiler.
36114402Sru */
37114402Sru#undef STARTFILE_SPEC
38114402Sru#define STARTFILE_SPEC "%{!qrtems:crt0%O%s} " \
39114402Sru"%{qrtems:" RTEMS_STARTFILE_SPEC "}"
40114402Sru
41114402Sru#undef ENDFILE_SPEC
42151497Sru#define ENDFILE_SPEC \
43114402Sru"%{qrtems:" RTEMS_ENDFILE_SPEC " %{!qnolinkcmds:-T linkcmds%s}}"
44114402Sru
45151497Sru/*
46114402Sru * Some targets do not set up LIB_SPECS, override it, here.
47114402Sru */
48151497Sru#define STD_LIB_SPEC "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"
49151497Sru
50151497Sru#undef LIB_SPEC
51114402Sru#define LIB_SPEC "%{!qrtems:" STD_LIB_SPEC "} " \
52151497Sru"%{qrtems:--start-group -lrtemsbsp -lrtemscpu -latomic -lc -lgcc --end-group}"
53151497Sru
54114402Sru#define TARGET_POSIX_IO
55151497Sru
56151497Sru/* Prefer int for int32_t (see stdint-newlib.h).  */
57151497Sru#undef STDINT_LONG32
58151497Sru#define STDINT_LONG32 (INT_TYPE_SIZE != 32 && LONG_TYPE_SIZE == 32)
59151497Sru