* c-common.c (catenate_strings): New.
[official-gcc.git] / gcc / config / mips / openbsd.h
blob7faeeb5ec8d84a4a5e6ffff57e513b4c0ad09e3a
1 /* Configuration for a Mips ABI32 OpenBSD target.
2 Copyright (C) 1999, 2003, 2004 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GCC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* Definitions needed for OpenBSD, to avoid picking mips 'defaults'. */
23 /* GAS must know this. */
24 #undef SUBTARGET_ASM_SPEC
25 #define SUBTARGET_ASM_SPEC "%{fPIC|fPIE:-KPIC}"
27 #define AS_NEEDS_DASH_FOR_PIPED_INPUT
29 /* CPP specific OpenBSD specs. */
30 #undef SUBTARGET_CPP_SPEC
31 #define SUBTARGET_CPP_SPEC OBSD_CPP_SPEC
33 /* Needed for ELF (inspired by netbsd-elf). */
34 #undef LOCAL_LABEL_PREFIX
35 #define LOCAL_LABEL_PREFIX "."
37 /* The profiling lib spec here is not really correct but we leave
38 it as it is until we have some kind of profiling working. */
39 #define LIB_SPEC OBSD_LIB_SPEC
41 /* mips assembler uses .set for arcane purposes. __attribute__((alias))
42 and friends won't work until we get recent binutils with .weakext
43 support. */
44 #undef SET_ASM_OP
46 #define TARGET_OS_CPP_BUILTINS() \
47 do { \
48 builtin_define ("__unix__"); \
49 builtin_define ("__SYSTYPE_BSD__"); \
50 builtin_define ("__NO_LEADING_UNDERSCORES__"); \
51 builtin_define ("__GP_SUPPORT__"); \
52 builtin_define ("__OpenBSD__"); \
53 builtin_assert ("system=unix"); \
54 builtin_assert ("system=OpenBSD"); \
55 builtin_assert ("machine=mips"); \
56 } while (0)
58 /* Layout of source language data types. */
60 /* This must agree with <machine/ansi.h>. */
61 #undef SIZE_TYPE
62 #define SIZE_TYPE "unsigned int"
64 #undef PTRDIFF_TYPE
65 #define PTRDIFF_TYPE "int"
67 #undef WCHAR_TYPE
68 #define WCHAR_TYPE "int"
70 #undef WCHAR_TYPE_SIZE
71 #define WCHAR_TYPE_SIZE 32
73 /* Controlling the compilation driver. */
75 /* LINK_SPEC appropriate for OpenBSD: support for GCC options
76 -static, -assert, and -nostdlib. Dynamic loader control. */
77 #undef LINK_SPEC
78 #define LINK_SPEC \
79 "%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
80 %{bestGnum} %{shared} %{non_shared} \
81 %{call_shared} %{no_archive} %{exact_version} \
82 %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \
83 %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so} \
84 %{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp \
85 %{static:-Bstatic} %{!static:-Bdynamic} %{assert*}"
87 /* -G is incompatible with -KPIC which is the default, so only allow objects
88 in the small data section if the user explicitly asks for it. */
89 #undef MIPS_DEFAULT_GVALUE
90 #define MIPS_DEFAULT_GVALUE 0
93 /* Since gas and gld are standard on OpenBSD, we don't need these. */
94 #undef ASM_FINAL_SPEC
95 #undef STARTFILE_SPEC
97 /* Switch into a generic section. */
98 #undef TARGET_ASM_NAMED_SECTION
99 #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section