]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/gnu-user.h
Update Copyright years for files modified in 2011 and/or 2012.
[thirdparty/gcc.git] / gcc / config / gnu-user.h
CommitLineData
deb14f24 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,
71e45bc2 5 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
deb14f24 6 Contributed by Eric Youngdale.
7 Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
8
9This file is part of GCC.
10
11GCC is free software; you can redistribute it and/or modify
12it under the terms of the GNU General Public License as published by
13the Free Software Foundation; either version 3, or (at your option)
14any later version.
15
16GCC is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU General Public License for more details.
20
21Under Section 7 of GPL version 3, you are granted additional
22permissions described in the GCC Runtime Library Exception, version
233.1, as published by the Free Software Foundation.
24
25You should have received a copy of the GNU General Public License and
26a copy of the GCC Runtime Library Exception along with this program;
27see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
28<http://www.gnu.org/licenses/>. */
29
30/* Don't assume anything about the header files. */
31#define NO_IMPLICIT_EXTERN_C
32
33#undef ASM_APP_ON
34#define ASM_APP_ON "#APP\n"
35
36#undef ASM_APP_OFF
37#define ASM_APP_OFF "#NO_APP\n"
38
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'. */
43
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
55
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'. */
61
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
66
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
72
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)"
76
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
83
84#if defined(HAVE_LD_EH_FRAME_HDR)
85#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
86#endif
87
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}"
91
92/* Use --as-needed -lgcc_s for eh support. */
93#ifdef HAVE_LD_AS_NEEDED
94#define USE_LD_AS_NEEDED 1
95#endif
96
97#define TARGET_POSIX_IO
6ee152ce 98
99#define TARGET_C99_FUNCTIONS 1
100#define TARGET_HAS_SINCOS 1
6aea389d 101
102/* Additional libraries needed by -static-libasan. */
103#undef STATIC_LIBASAN_LIBS
104#define STATIC_LIBASAN_LIBS "-ldl -lpthread"