comparison gcc/config/i386/openbsdelf.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* Configuration for an OpenBSD i386 target. 1 /* Configuration for an OpenBSD i386 target.
2 2
3 Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc. 3 Copyright (C) 2005-2017 Free Software Foundation, Inc.
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify 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 8 it under the terms of the GNU General Public License as published by
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see 18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */ 19 <http://www.gnu.org/licenses/>. */
20 20
21 /* This keeps us from using libraries compiled with the native cc, so
22 undef it. */
23 #undef NO_DOLLAR_IN_LABEL
24
25 /* Override the default comment-starter of "/". */
26 #undef ASM_COMMENT_START
27 #define ASM_COMMENT_START "#"
28
29 #undef DBX_REGISTER_NUMBER
30 #define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n]
31
32 /* This goes away when the math-emulator is fixed */
33 #undef TARGET_DEFAULT
34 #define TARGET_DEFAULT \
35 (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
36
37 /* Run-time target specifications */
38
39 #define TARGET_OS_CPP_BUILTINS() \ 21 #define TARGET_OS_CPP_BUILTINS() \
40 do \ 22 do \
41 { \ 23 { \
42 OPENBSD_OS_CPP_BUILTINS(); \ 24 OPENBSD_OS_CPP_BUILTINS(); \
43 } \ 25 } \
44 while (0) 26 while (0)
45 27
46 /* As an elf system, we need crtbegin/crtend stuff. */ 28 #undef DBX_REGISTER_NUMBER
47 #undef STARTFILE_SPEC 29 #define DBX_REGISTER_NUMBER(n) \
48 #define STARTFILE_SPEC "\ 30 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
49 %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
50 crtbegin%O%s} %{shared:crtbeginS%O%s}"
51 #undef ENDFILE_SPEC
52 #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
53 31
54 /* Layout of source language data types. */ 32 /* This must agree with <machine/_types.h>. */
55
56 /* This must agree with <machine/ansi.h> */
57 #undef SIZE_TYPE 33 #undef SIZE_TYPE
58 #define SIZE_TYPE "long unsigned int" 34 #define SIZE_TYPE "long unsigned int"
59 35
60 #undef PTRDIFF_TYPE 36 #undef PTRDIFF_TYPE
61 #define PTRDIFF_TYPE "long int" 37 #define PTRDIFF_TYPE "long int"
62 38
63 #undef WCHAR_TYPE 39 #undef WCHAR_TYPE
64 #define WCHAR_TYPE "int" 40 #define WCHAR_TYPE "int"
65 41
66 #undef WCHAR_TYPE_SIZE 42 #undef WCHAR_TYPE_SIZE
67 #define WCHAR_TYPE_SIZE BITS_PER_WORD 43 #define WCHAR_TYPE_SIZE 32
68 44
69 #undef WINT_TYPE 45 #undef WINT_TYPE
70 #define WINT_TYPE "int" 46 #define WINT_TYPE "int"
71 47
72 /* Assembler format: overall framework. */ 48 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
49 we want to retain compatibility with older gcc versions. */
50
51 #undef DEFAULT_PCC_STRUCT_RETURN
52 #define DEFAULT_PCC_STRUCT_RETURN 0
53
54 /* Override the default comment-starter of "/". */
55 #undef ASM_COMMENT_START
56 #define ASM_COMMENT_START "#"
73 57
74 #undef ASM_APP_ON 58 #undef ASM_APP_ON
75 #define ASM_APP_ON "#APP\n" 59 #define ASM_APP_ON "#APP\n"
76 60
77 #undef ASM_APP_OFF 61 #undef ASM_APP_OFF
78 #define ASM_APP_OFF "#NO_APP\n" 62 #define ASM_APP_OFF "#NO_APP\n"
79 63
80 #undef SET_ASM_OP 64 /* A C statement to output to the stdio stream FILE an assembler
81 #define SET_ASM_OP "\t.set\t" 65 command to advance the location counter to a multiple of 1<<LOG
66 bytes if it is within MAX_SKIP bytes.
82 67
83 /* The following macros were originally stolen from i386v4.h. 68 This is used to align code labels according to Intel recommendations. */
84 These have to be defined to get PIC code correct. */
85
86 /* Assembler format: dispatch tables. */
87
88 /* Assembler format: sections. */
89
90 /* Stack & calling: aggregate returns. */
91
92 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
93 we want to retain compatibility with older gcc versions. */
94 #define DEFAULT_PCC_STRUCT_RETURN 0
95
96 /* Assembler format: alignment output. */
97 69
98 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN 70 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
99 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ 71 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
100 if ((LOG) != 0) {\ 72 do { \
101 if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ 73 if ((LOG) != 0) { \
102 else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ 74 if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
103 } 75 else { \
76 fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
77 /* Make sure that we have at least 8 byte alignment if > 8 byte \
78 alignment is preferred. */ \
79 if ((LOG) > 3 \
80 && (1 << (LOG)) > ((MAX_SKIP) + 1) \
81 && (MAX_SKIP) >= 7) \
82 fputs ("\t.p2align 3\n", (FILE)); \
83 } \
84 } \
85 } while (0)
104 #endif 86 #endif
105 87
106 /* Stack & calling: profiling. */
107
108 /* OpenBSD's profiler recovers all information from the stack pointer. 88 /* OpenBSD's profiler recovers all information from the stack pointer.
109 The icky part is not here, but in machine/profile.h. */ 89 The icky part is not here, but in <machine/profile.h>. */
110 #undef FUNCTION_PROFILER 90 #undef FUNCTION_PROFILER
111 #define FUNCTION_PROFILER(FILE, LABELNO) \ 91 #define FUNCTION_PROFILER(FILE, LABELNO) \
112 fputs (flag_pic ? "\tcall __mcount@PLT\n": "\tcall __mcount\n", FILE); 92 fputs (flag_pic ? "\tcall __mcount@PLT\n": "\tcall __mcount\n", FILE);
113
114 /* Assembler format: exception region output. */
115
116 /* our configuration still doesn't handle dwarf2 correctly */
117 #define DWARF2_UNWIND_INFO 0
118
119 /* Assembler format: alignment output. */
120
121 /* Note that we pick up ASM_OUTPUT_MAX_SKIP_ALIGN from i386/gas.h */
122
123 /* Note that we pick up ASM_OUTPUT_MI_THUNK from unix.h. */
124 93
125 #undef LINK_SPEC 94 #undef LINK_SPEC
126 #define LINK_SPEC \ 95 #define LINK_SPEC \
127 "%{!shared:%{!nostdlib:%{!r:%{!e*:-e __start}}}} \ 96 "%{!shared:%{!nostdlib:%{!r:%{!e*:-e __start}}}} \
128 %{shared:-shared} %{R*} \ 97 %{shared:-shared} %{R*} \
129 %{static:-Bstatic} \ 98 %{static:-Bstatic} \
130 %{!static:-Bdynamic} \ 99 %{!static:-Bdynamic} \
131 %{assert*} \ 100 %{assert*} \
132 -dynamic-linker /usr/libexec/ld.so" 101 -dynamic-linker /usr/libexec/ld.so"
133 102
103 #undef STARTFILE_SPEC
104 #define STARTFILE_SPEC "\
105 %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
106 crtbegin%O%s} %{shared:crtbeginS%O%s}"
107
108 #undef ENDFILE_SPEC
109 #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
110
134 #define OBSD_HAS_CORRECT_SPECS 111 #define OBSD_HAS_CORRECT_SPECS
112
113 #define HAVE_ENABLE_EXECUTE_STACK