blob: 9e5c57a2dff84e1c52a78fcd0a10ab1e0077ce05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
$NetBSD: patch-ba,v 1.2 2002/01/03 20:40:44 tron Exp $
--- ../gcc-2.95.3/gcc/config/vax/netbsd.h.orig Wed Dec 16 22:14:22 1998
+++ ../gcc-2.95.3/gcc/config/vax/netbsd.h Thu Jan 3 20:37:54 2002
@@ -1,5 +1,22 @@
+#include <vax/vax.h>
+#ifdef NETBSD_ELF
+#include <elfos.h>
+#endif
+#include <netbsd.h>
+
#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Dvax -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(vax) -Amachine(vax)"
+#define CPP_PREDEFINES "-D__vax__ -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(vax) -Amachine(vax)"
+
+#undef CC1_SPEC
+#define CC1_SPEC "\
+ %{!fno-pic: \
+ %{!mno-pic: %{!fpic: %{!fPIC:-fPIC}}} \
+ %{!mindirect: %{!no-mindirect: -mno-indirect}}} \
+ %{mno-pic: -fno-pic -mindirect} \
+ %{fno-pic: \
+ %{!mindirect: %{!no-mindirect: -mindirect}}}"
+
+#define CC1PLUS_SPEC CC1_SPEC
/* Make gcc agree with <machine/ansi.h> */
@@ -21,4 +38,54 @@
/* Until they use ELF or something that handles dwarf2 unwinds
and initialization stuff better. */
#undef DWARF2_UNWIND_INFO
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT 0
+
+/* Function CSE screws up PLT .vs. GOT usage.
+ */
+#define NO_FUNCTION_CSE
+
+/* This makes use of a hook in varasm.c to mark all external functions
+ for us. We use this to make sure that external functions are correctly
+ referenced from the PLT. */
+
+#define NO_EXTERNAL_INDIRECT_ADDRESS
+
+/* Define this macro if references to a symbol must be treated
+ differently depending on something about the variable or
+ function named by the symbol (such as what section it is in).
+
+ On the VAX, if using PIC, mark a SYMBOL_REF for a non-global
+ symbol so that we may use indirect accesses with it. */
+
+#define ENCODE_SECTION_INFO(DECL) \
+do \
+ { \
+ if (flag_pic) \
+ { \
+ rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
+ ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \
+ \
+ if (GET_CODE (rtl) == MEM) \
+ { \
+ SYMBOL_REF_FLAG (XEXP (rtl, 0)) \
+ = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
+ || ! TREE_PUBLIC (DECL)); \
+ } \
+ } \
+ } \
+while (0)
+
+/* Put relocations in the constant pool in the writable data section. */
+#undef SELECT_RTX_SECTION
+#define SELECT_RTX_SECTION(MODE,RTX) \
+{ \
+ if (flag_pic && vax_symbolic_operand ((RTX), (MODE))) \
+ data_section (); \
+ else \
+ readonly_data_section (); \
+}
+
+/* Use sjlj exceptions. */
|