Restore 2012 entries that hasn't been saved.
[official-gcc.git] / gcc / config / gnu-user.h
blobcb457490e7a6c0fe2416687bfea80e555feeab6c
1 /* Definitions for systems using, at least optionally, a GNU
2 (glibc-based) userspace or other userspace with libc derived from
3 glibc (e.g. uClibc) or for which similar specs are appropriate.
4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006,
5 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
6 Contributed by Eric Youngdale.
7 Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
9 This file is part of GCC.
11 GCC is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3, or (at your option)
14 any later version.
16 GCC is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 Under Section 7 of GPL version 3, you are granted additional
22 permissions described in the GCC Runtime Library Exception, version
23 3.1, as published by the Free Software Foundation.
25 You should have received a copy of the GNU General Public License and
26 a copy of the GCC Runtime Library Exception along with this program;
27 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
28 <http://www.gnu.org/licenses/>. */
30 /* Don't assume anything about the header files. */
31 #define NO_IMPLICIT_EXTERN_C
33 #undef ASM_APP_ON
34 #define ASM_APP_ON "#APP\n"
36 #undef ASM_APP_OFF
37 #define ASM_APP_OFF "#NO_APP\n"
39 /* Provide a STARTFILE_SPEC appropriate for GNU userspace. Here we add
40 the GNU userspace magical crtbegin.o file (see crtstuff.c) which
41 provides part of the support for getting C++ file-scope static
42 object constructed before entering `main'. */
44 #if defined HAVE_LD_PIE
45 #define GNU_USER_TARGET_STARTFILE_SPEC \
46 "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
47 crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
48 #else
49 #define GNU_USER_TARGET_STARTFILE_SPEC \
50 "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
51 crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
52 #endif
53 #undef STARTFILE_SPEC
54 #define STARTFILE_SPEC GNU_USER_TARGET_STARTFILE_SPEC
56 /* Provide a ENDFILE_SPEC appropriate for GNU userspace. Here we tack on
57 the GNU userspace magical crtend.o file (see crtstuff.c) which
58 provides part of the support for getting C++ file-scope static
59 object constructed before entering `main', followed by a normal
60 GNU userspace "finalizer" file, `crtn.o'. */
62 #define GNU_USER_TARGET_ENDFILE_SPEC \
63 "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
64 #undef ENDFILE_SPEC
65 #define ENDFILE_SPEC GNU_USER_TARGET_ENDFILE_SPEC
67 /* This is for -profile to use -lc_p instead of -lc. */
68 #define GNU_USER_TARGET_CC1_SPEC "%{profile:-p}"
69 #ifndef CC1_SPEC
70 #define CC1_SPEC GNU_USER_TARGET_CC1_SPEC
71 #endif
73 /* The GNU C++ standard library requires that these macros be defined. */
74 #undef CPLUSPLUS_CPP_SPEC
75 #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
77 #define GNU_USER_TARGET_LIB_SPEC \
78 "%{pthread:-lpthread} \
79 %{shared:-lc} \
80 %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
81 #undef LIB_SPEC
82 #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
84 #if defined(HAVE_LD_EH_FRAME_HDR)
85 #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
86 #endif
88 #undef LINK_GCC_C_SEQUENCE_SPEC
89 #define LINK_GCC_C_SEQUENCE_SPEC \
90 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
92 /* Use --as-needed -lgcc_s for eh support. */
93 #ifdef HAVE_LD_AS_NEEDED
94 #define USE_LD_AS_NEEDED 1
95 #endif
97 #define TARGET_POSIX_IO
99 #define TARGET_C99_FUNCTIONS 1
100 #define TARGET_HAS_SINCOS 1