* c-cppbuiltin.c (c_cpp_builtins): Define __pic__ and __PIC__ when
[official-gcc.git] / gcc / config / pa / pa-linux.h
blob527977f15e269fd75b1fa6634cda35ff833ed76a
1 /* Definitions for PA_RISC with ELF format
2 Copyright 1999, 2000, 2001, 2002, 2003 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, 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
22 #undef TARGET_OS_CPP_BUILTINS
23 #define TARGET_OS_CPP_BUILTINS() \
24 do \
25 { \
26 LINUX_TARGET_OS_CPP_BUILTINS(); \
27 builtin_assert ("machine=bigendian"); \
28 } \
29 while (0)
31 #undef CPP_SPEC
32 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
34 #undef LIB_SPEC
35 #define LIB_SPEC \
36 "%{pthread:-lpthread} \
37 %{shared:-lgcc -lc} \
38 %{!shared:%{mieee-fp:-lieee} %{shared-libgcc:-lgcc} %{profile:-lc_p}%{!profile:-lc}}"
40 #undef ASM_SPEC
41 #define ASM_SPEC \
42 "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
44 /* Define this for shared library support because it isn't in the main
45 linux.h file. */
47 #undef LINK_SPEC
48 #define LINK_SPEC "\
49 %{shared:-shared} \
50 %{!shared: \
51 %{!static: \
52 %{rdynamic:-export-dynamic} \
53 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
54 %{static:-static}}"
56 /* glibc's profiling functions don't need gcc to allocate counters. */
57 #define NO_DEFERRED_PROFILE_COUNTERS 1
59 /* Define the strings used for the special svr4 .type and .size directives.
60 These strings generally do not vary from one system running svr4 to
61 another, but if a given system (e.g. m88k running svr) needs to use
62 different pseudo-op names for these, they may be overridden in the
63 file which includes this one. */
65 #undef STRING_ASM_OP
66 #define STRING_ASM_OP ".stringz"
68 #define TEXT_SECTION_ASM_OP "\t.text"
69 #define DATA_SECTION_ASM_OP "\t.data"
70 #define BSS_SECTION_ASM_OP "\t.section\t.bss"
72 #define TARGET_ASM_FILE_START pa_linux_file_start
74 /* We want local labels to start with period if made with asm_fprintf. */
75 #undef LOCAL_LABEL_PREFIX
76 #define LOCAL_LABEL_PREFIX "."
78 /* Define these to generate the Linux/ELF/SysV style of internal
79 labels all the time - i.e. to be compatible with
80 ASM_GENERATE_INTERNAL_LABEL in <elfos.h>. Compare these with the
81 ones in pa.h and note the lack of dollar signs in these. FIXME:
82 shouldn't we fix pa.h to use ASM_GENERATE_INTERNAL_LABEL instead? */
84 #undef ASM_OUTPUT_ADDR_VEC_ELT
85 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
86 if (TARGET_BIG_SWITCH) \
87 fprintf (FILE, "\t.word .L%d\n", VALUE); \
88 else \
89 fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE)
91 #undef ASM_OUTPUT_ADDR_DIFF_ELT
92 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
93 if (TARGET_BIG_SWITCH) \
94 fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL); \
95 else \
96 fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE)
98 /* Use the default. */
99 #undef ASM_OUTPUT_LABEL
101 /* NOTE: (*targetm.asm_out.internal_label)() is defined for us by elfos.h, and
102 does what we want (i.e. uses colons). It must be compatible with
103 ASM_GENERATE_INTERNAL_LABEL(), so do not define it here. */
105 /* Use the default. */
106 #undef TARGET_ASM_GLOBALIZE_LABEL
107 /* Globalizing directive for a label. */
108 #define GLOBAL_ASM_OP ".globl "
110 /* FIXME: Hacked from the <elfos.h> one so that we avoid multiple
111 labels in a function declaration (since pa.c seems determined to do
112 it differently) */
114 #undef ASM_DECLARE_FUNCTION_NAME
115 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
116 do \
118 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
119 ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
121 while (0)
123 /* As well as globalizing the label, we need to encode the label
124 to ensure a plabel is generated in an indirect call. */
126 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
127 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
128 do \
130 if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \
131 hppa_encode_label (FUN); \
132 (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \
134 while (0)
136 /* Linux always uses gas. */
137 #undef TARGET_GAS
138 #define TARGET_GAS 1