1 /* Base configuration file for all Fuchsia targets.
2 Copyright (C) 2017 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 /* Common Fuchsia configuration. */
24 #define STARTFILE_SPEC "%{!shared: crt1%O%s} crtbegin%O%s"
27 #define ENDFILE_SPEC "crtend%O%s"
29 /* When neither pic nor pie has been specified, use PIE. */
31 #define CC1_SPEC "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC:" \
32 "%{!fno-pie:%{!fno-PIE:%{!fpie:%{!fPIE: -fPIE}}}}}}}}"
35 #define LIB_SPEC "--start-group" \
36 " -lmxio -lmagenta -lc -llaunchpad" \
37 "%{!static: -lgcc_s}" \
41 #define LINK_SPEC "-z max-page-size=4096" \
46 "%{!hash-style: --hash-style=gnu}" \
47 "%{!no-eh-frame-hdr: --eh-frame-hdr}" \
48 "%{!no-build-id: --build-id}" \
49 "%{shared: -shared}" \
50 "%{!shared:%{!static:%{!dynamic-linker: -dynamic-linker=ld.so.1}}}"
52 /* We are using MUSL as our libc. */
56 #ifndef TARGET_SUB_OS_CPP_BUILTINS
57 #define TARGET_SUB_OS_CPP_BUILTINS()
60 #undef TARGET_OS_CPP_BUILTINS
61 #define TARGET_OS_CPP_BUILTINS() \
64 builtin_define ("__fuchsia__"); \
65 TARGET_SUB_OS_CPP_BUILTINS(); \