1 /* Base configuration file for all MINIX targets.
2 Copyright (C) 1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
3 Adapted for MINIX by Lionel Sambuc <lionel@minix3.org>
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published
9 by the Free Software Foundation; either version 2, or (at your
10 option) any later version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to the
19 Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
20 MA 02110-1301, USA. */
23 * Default, architecture independent values for MINIX
25 * For this to work properly, the order in the tm_file variable has
26 * to be the following:
27 * minix-spec.h $arch/minix.h minix.h
29 * minix-spec.h : specifies default arch-independent values
30 * $arch/minix.h: redefines as needed default minix values
31 * minix.h : maps GCC defines to the minix defines.
34 * When changing any default, also check in the arch headers
35 * if the default is redefined and update them as required.
38 /* In case we need to know. */
39 #define USING_CONFIG_MINIX_SPEC 1
41 #define MINIX_TARGET_OS_CPP_BUILTINS() \
44 builtin_define ("__minix"); \
45 builtin_define ("__minix__"); \
46 builtin_define ("__unix__"); \
47 builtin_assert ("system=bsd"); \
48 builtin_assert ("system=unix"); \
49 builtin_assert ("system=minix"); \
50 MINIX_TARGET_CPU_CPP_BUILTINS(); \
54 /* Define the default MINIX-specific per-CPU hook code. */
55 #define MINIX_TARGET_CPU_CPP_BUILTINS() do {} while (0)
57 /* Look for the include files in the system-defined places. */
59 #define MINIX_GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
61 #define MINIX_GPLUSPLUS_BACKWARD_INCLUDE_DIR "/usr/include/g++/backward"
63 #define MINIX_GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT 1
65 #define MINIX_GCC_INCLUDE_DIR_ADD_SYSROOT 1
68 * XXX figure out a better way to do this
70 #define MINIX_GCC_INCLUDE_DIR "/usr/include/gcc-4.8"
72 /* Provide a CPP_SPEC appropriate for MINIX. We just deal with the GCC
74 #define MINIX_CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
76 /* Pass -cxx-isystem to cc1/cc1plus. */
77 #define MINIX_CC1PLUS_SPEC "%{cxx-isystem}"
78 #define MINIX_CC1_SPEC "%{cxx-isystem}"
81 #define MINIX_SUBTARGET_CPP_SPEC ""
82 #define MINIX_SUBTARGET_EXTRA_ASM_SPEC ""
83 #define MINIX_SUBTARGET_ASM_FLOAT_SPEC ""
85 #define MINIX_DYNAMIC_LINKER "/usr/libexec/ld.elf_so"
87 /* Under MINIX, just like on NetBSD, the normal location of the various
88 * *crt*.o files is the /usr/lib directory. */
89 #define MINIX_STANDARD_STARTFILE_PREFIX "/usr/lib/"
91 /* Under NetBSD, the normal location of the compiler back ends is the
92 /usr/libexec directory. */
94 #define MINIX_STANDARD_EXEC_PREFIX "/usr/libexec/"
95 #define MINIX_TOOLDIR_BASE_PREFIX "../"
96 #define MINIX_STANDARD_BINDIR_PREFIX "/usr/bin"
97 #define MINIX_STANDARD_LIBEXEC_PREFIX MINIX_STANDARD_EXEC_PREFIX
99 #define MINIX_LINK_GCC_C_SEQUENCE_SPEC \
100 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
102 /* Provide a STARTFILE_SPEC appropriate for MINIX. Here we add
103 the magical crtbegin.o file (see crtstuff.c) which provides part
104 of the support for getting C++ file-scope static object constructed
105 before entering `main'. */
106 #define MINIX_STARTFILE_SPEC \
111 %{!p:%{profile:gcrt0%O%s} \
112 %{!profile:crt0%O%s}}}} \
113 %:if-exists(crti%O%s) \
114 %{static:%:if-exists-else(crtbeginT%O%s crtbegin%O%s)} \
117 %{!pie:crtbegin%O%s} \
118 %{pie:crtbeginS%O%s}} \
119 %{shared:crtbeginS%O%s}}"
121 /* Provide an ENDFILE_SPEC appropriate for NetBSD ELF. Here we
122 add crtend.o, which provides part of the support for getting
123 C++ file-scope static objects deconstructed after exiting "main". */
124 #define MINIX_ENDFILE_SPEC \
127 %{pie:crtendS%O%s}} \
128 %{shared:crtendS%O%s} \
129 %:if-exists(crtn%O%s)"
131 /* Provide a LIB_SPEC appropriate for MINIX. Just select the appropriate
132 libc, depending on whether we're doing profiling or need threads support.
133 (similar to the default, except no -lg, and no -p). */
134 #define MINIX_LIB_SPEC " \
135 %{pthread: %eThe -pthread option is only supported on MINIX when gcc \
136 is built with the --enable-threads configure-time option.} \
145 /* Provide a LINK_SPEC appropriate for MINIX. Here we provide support
146 for the special GCC options -static and -shared, which allow us to
147 link things in one of these three modes by applying the appropriate
148 combinations of options at link-time. We like to support here for
149 as many of the other GNU linker options as possible. But I don't
150 have the time to search for those flags. I am sure how to add
151 support for -soname shared_object_name. H.J.
153 I took out %{v:%{!V:-V}}. It is too much :-(. They can use
156 When the -shared link option is used a final link is not being
158 #define MINIX_LINK_SPEC " \
160 %{p:%nconsider using `-pg' instead of `-p' with gprof(1) } \
161 %{assert*} %{R*} %{rpath*} \
162 %{shared:-Bshareable %{h*} %{soname*}} \
163 %{symbolic:-Bsymbolic} \
167 %{rdynamic:-export-dynamic} \
168 %{!dynamic-linker:-dynamic-linker %(minix_dynamic_linker) }} \
171 #define MINIX_TARGET_UNWIND_TABLES_DEFAULT true