]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/pa/pa-linux.h
Update copyright years in gcc/
[thirdparty/gcc.git] / gcc / config / pa / pa-linux.h
1 /* Definitions for PA_RISC with ELF format
2 Copyright (C) 1999-2014 Free Software Foundation, Inc.
3
4 This file is part of GCC.
5
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 3, or (at your option)
9 any later version.
10
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.
15
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
19
20
21 #undef TARGET_OS_CPP_BUILTINS
22 #define TARGET_OS_CPP_BUILTINS() \
23 do \
24 { \
25 builtin_define ("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1"); \
26 builtin_define ("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2"); \
27 builtin_define ("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4"); \
28 GNU_USER_TARGET_OS_CPP_BUILTINS(); \
29 builtin_assert ("machine=bigendian"); \
30 } \
31 while (0)
32
33 #undef CPP_SPEC
34 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
35
36 #undef ASM_SPEC
37 #define ASM_SPEC \
38 ""
39
40 /* Define this for shared library support because it isn't in the main
41 linux.h file. */
42
43 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
44
45 #undef LINK_SPEC
46 #define LINK_SPEC "\
47 %{shared:-shared} \
48 %{!shared: \
49 %{!static: \
50 %{rdynamic:-export-dynamic} \
51 -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
52 %{static:-static}}"
53
54 /* glibc's profiling functions don't need gcc to allocate counters. */
55 #define NO_DEFERRED_PROFILE_COUNTERS 1
56
57 /* Define the strings used for the special svr4 .type and .size directives.
58 These strings generally do not vary from one system running svr4 to
59 another, but if a given system (e.g. m88k running svr) needs to use
60 different pseudo-op names for these, they may be overridden in the
61 file which includes this one. */
62
63 #undef STRING_ASM_OP
64 #define STRING_ASM_OP "\t.stringz\t"
65
66 #define TEXT_SECTION_ASM_OP "\t.text"
67 #define DATA_SECTION_ASM_OP "\t.data"
68 #define BSS_SECTION_ASM_OP "\t.section\t.bss"
69
70 #define TARGET_ASM_FILE_START pa_linux_file_start
71
72 /* We want local labels to start with period if made with asm_fprintf. */
73 #undef LOCAL_LABEL_PREFIX
74 #define LOCAL_LABEL_PREFIX "."
75
76 /* Define these to generate the Linux/ELF/SysV style of internal
77 labels all the time - i.e. to be compatible with
78 ASM_GENERATE_INTERNAL_LABEL in <elfos.h>. Compare these with the
79 ones in pa.h and note the lack of dollar signs in these. FIXME:
80 shouldn't we fix pa.h to use ASM_GENERATE_INTERNAL_LABEL instead? */
81
82 #undef ASM_OUTPUT_ADDR_VEC_ELT
83 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
84 fprintf (FILE, "\t.word .L%d\n", VALUE)
85
86 #undef ASM_OUTPUT_ADDR_DIFF_ELT
87 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
88 fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL)
89
90 /* Use the default. */
91 #undef ASM_OUTPUT_LABEL
92
93 /* NOTE: (*targetm.asm_out.internal_label)() is defined for us by elfos.h, and
94 does what we want (i.e. uses colons). It must be compatible with
95 ASM_GENERATE_INTERNAL_LABEL(), so do not define it here. */
96
97 /* Use the default. */
98 #undef ASM_OUTPUT_INTERNAL_LABEL
99
100 /* Use the default. */
101 #undef TARGET_ASM_GLOBALIZE_LABEL
102 /* Globalizing directive for a label. */
103 #define GLOBAL_ASM_OP ".globl "
104
105 /* FIXME: Hacked from the <elfos.h> one so that we avoid multiple
106 labels in a function declaration (since pa.c seems determined to do
107 it differently) */
108
109 #undef ASM_DECLARE_FUNCTION_NAME
110 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
111 do \
112 { \
113 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
114 ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
115 } \
116 while (0)
117
118 /* As well as globalizing the label, we need to encode the label
119 to ensure a plabel is generated in an indirect call. */
120
121 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
122 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
123 do \
124 { \
125 if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \
126 pa_encode_label (FUN); \
127 (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \
128 } \
129 while (0)
130
131 #undef TARGET_GAS
132 #define TARGET_GAS 1
133
134 #undef TARGET_SYNC_LIBCALL
135 #define TARGET_SYNC_LIBCALL 1