Debian Codegraph @

gcc/config/gnu.h

raw
1 /* Configuration common to all targets running the GNU system. */
2
3 /*
4 Copyright (C) 1994-2025 Free Software Foundation, Inc.
5
6 This file is part of GCC.
7
8 GCC is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GCC. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 /* C libraries used on GNU/Hurd. */
23 #define OPTION_GLIBC_P(opts) (DEFAULT_LIBC == LIBC_GLIBC)
24 #define OPTION_GLIBC OPTION_GLIBC_P (&global_options)
25
26 #undef GNU_USER_TARGET_OS_CPP_BUILTINS
27 #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
28 do { \
29 builtin_define ("__gnu_hurd__"); \
30 builtin_define ("__GNU__"); \
31 builtin_define_std ("unix"); \
32 builtin_define ("__MACH__"); \
33 builtin_assert ("system=gnu"); \
34 builtin_assert ("system=mach"); \
35 builtin_assert ("system=unix"); \
36 builtin_assert ("system=posix"); \
37 } while (0)
38
39
40 #ifndef GNU_USER_TARGET_STARTFILE_SPEC
41 # warning This file should be included after gnu-user.h, to override its STARTFILE_SPEC
42 #endif
43
44 #undef STARTFILE_SPEC
45 #if defined HAVE_LD_PIE
46 #define STARTFILE_SPEC \
47 "%{!shared: %{pg|p|profile:%{static-pie:grcrt0.o%s;static:gcrt0.o%s;:gcrt1.o%s};static-pie:rcrt0.o%s;static:crt0.o%s;" PIE_SPEC ":Scrt1.o%s;:crt1.o%s}} \
48 crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}"
49 #else
50 #define STARTFILE_SPEC \
51 "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \
52 crti.o%s %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
53 #endif