summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc/4.5/ghdl-ortho-cflags.patch
blob: 901534591c8f16a9a495953ffaaf9d770601e5eb (plain) (blame)
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
index 8f481df..681ac59 100644
--- a/gcc/vhdl/Make-lang.in
+++ b/gcc/vhdl/Make-lang.in
@@ -96,7 +96,7 @@ AGCC_GCCOBJ_DIR=../
 AGCC_INC_FLAGS=-I$(AGCC_GCCOBJ_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/include \
  -I$(AGCC_GCCSRC_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/gcc/config \
  -I$(AGCC_GCCSRC_DIR)/libcpp/include
-AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS)
+AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS) $(CFLAGS) $(INCLUDES)
 
 AGCC_LOCAL_OBJS=ortho-lang.o
 
@@ -140,7 +140,7 @@ ghdl$(exeext): force
 
 # Ghdl libraries.
 ghdllib: ghdl$(exeext) $(GCC_PASSES) force
-	$(MAKE_IN_VHDL) GRT_FLAGS="-O -g" ghdllib
+	$(MAKE_IN_VHDL) GRT_FLAGS="-O -g $(CFLAGS)" ghdllib
 
 # Build hooks:
 
diff --git a/gcc/vhdl/Makefile.in b/gcc/vhdl/Makefile.in
index d754c6c..07abc4a 100644
--- a/gcc/vhdl/Makefile.in
+++ b/gcc/vhdl/Makefile.in
@@ -80,7 +80,8 @@ T_CPPFLAGS =
 X_ADAFLAGS =
 T_ADAFLAGS =
 
-ADAC = $(CC)
+# Never use the bootstrapped compiler, as it may not be built for ada
+ADAC = gcc
 
 ECHO = echo
 CHMOD = chmod
diff --git a/gcc/vhdl/ortho-lang.c b/gcc/vhdl/ortho-lang.c
index 84aeb92..8eddd42 100644
--- a/gcc/vhdl/ortho-lang.c
+++ b/gcc/vhdl/ortho-lang.c
@@ -16,6 +16,7 @@
 #include "options.h"
 #include "real.h"
-#include "tree-gimple.h"
+#include "gimple.h"
+#include "tree.h"
 #include "function.h"
 #include "cgraph.h"
 #include "target.h"
@@ -680,38 +681,10 @@ type_for_mode (enum machine_mode mode, int unsignedp)
 
 const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
 
-/* Tree code classes.  */
-
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
-
-const enum tree_code_class tree_code_type[] = {
-#include "tree.def"
-  'x'
-};
-#undef DEFTREECODE
-
-/* Table indexed by tree code giving number of expression
-   operands beyond the fixed part of the node structure.
-   Not used for types or decls.  */
-
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
-
-const unsigned char tree_code_length[] = {
-#include "tree.def"
-  0
-};
-#undef DEFTREECODE
-
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) NAME,
-const char * const tree_code_name[] = {
-#include "tree.def"
-  "@@dummy"
-};
-#undef DEFTREECODE
 
 union lang_tree_node 
   GTY((desc ("0"),
-       chain_next ("(union lang_tree_node *) GENERIC_NEXT (&%h.generic)")))
+       chain_next ("(union lang_tree_node *) TREE_CHAIN (&%h.generic)")))
 {
   union tree_node GTY ((tag ("0"))) generic;
 };
@@ -1162,7 +1135,7 @@ new_access_type (tree dtype)
       res = make_node (POINTER_TYPE);
       TREE_TYPE (res) = NULL_TREE;
       /* Seems necessary.  */
-      TYPE_MODE (res) = Pmode;
+      SET_TYPE_MODE (res, Pmode);
       layout_type (res);
       return res;
     }
diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
index e201f64..f36fb97 100644
--- a/gcc/vhdl/Make-lang.in
+++ b/gcc/vhdl/Make-lang.in
@@ -132,7 +132,7 @@ ghdl1$(exeext): $(AGCC_OBJS) $(AGCC_DEPS) force
 	 -cargs $(CFLAGS) $(GHDL_ADAFLAGS)
 	$(GNATMAKE) -o $@ -aI$(srcdir)/vhdl -aOvhdl ortho_gcc-main \
 	 -bargs -E -cargs $(CFLAGS) $(GHDL_ADAFLAGS) \
-	 -largs $(AGCC_OBJS) $(LIBS) $(GMPLIBS)
+	 -largs $(AGCC_OBJS) $(LIBS) $(GMPLIBS) $(CLOOGLIBS) $(PPLLIBS)
 
 # The driver for ghdl.
 ghdl$(exeext): force