Mercurial > projects > ddmd
annotate dmdpatch.patch @ 192:eb38fdcb3e62 default tip
updated to compile with dmd2.062
author | korDen |
---|---|
date | Sat, 02 Mar 2013 01:25:52 -0800 |
parents | 190ba98276b3 |
children |
rev | line source |
---|---|
140 | 1 # HG changeset patch |
2 # User trass3r | |
3 # Date 1284418540 -7200 | |
4 # Node ID a4ec24e030fdda493d8d1249ef966e0beed13e1e | |
5 # Parent 0ebf1721e4d32cfb38376c6688a767627aa63758 | |
6 t | |
7 | |
8 diff -r 0ebf1721e4d3 -r a4ec24e030fd src/dmd/class.c | |
9 --- a/src/dmd/class.c Mon Sep 13 15:46:31 2010 +0200 | |
10 +++ b/src/dmd/class.c Tue Sep 14 00:55:40 2010 +0200 | |
11 @@ -61,7 +61,7 @@ | |
12 if (id) | |
13 { // Look for special class names | |
14 | |
15 - if (id == Id::__sizeof || id == Id::alignof || id == Id::mangleof) | |
183
190ba98276b3
Several changes to make it build on posix systems.
Jacob Carlborg <doob@me.com>
parents:
140
diff
changeset
|
16 + if (id == Id::__sizeof || id == Id::_alignof || id == Id::mangleof) |
140 | 17 error("illegal class name"); |
18 | |
19 // BUG: What if this is the wrong TypeInfo, i.e. it is nested? | |
20 diff -r 0ebf1721e4d3 -r a4ec24e030fd src/dmd/dsymbol.c | |
21 --- a/src/dmd/dsymbol.c Mon Sep 13 15:46:31 2010 +0200 | |
22 +++ b/src/dmd/dsymbol.c Tue Sep 14 00:55:40 2010 +0200 | |
23 @@ -488,7 +488,7 @@ | |
24 } | |
25 if (sd->isAggregateDeclaration() || sd->isEnumDeclaration()) | |
26 { | |
27 - if (ident == Id::__sizeof || ident == Id::alignof || ident == Id::mangleof) | |
183
190ba98276b3
Several changes to make it build on posix systems.
Jacob Carlborg <doob@me.com>
parents:
140
diff
changeset
|
28 + if (ident == Id::__sizeof || ident == Id::_alignof || ident == Id::mangleof) |
140 | 29 error(".%s property cannot be redefined", ident->toChars()); |
30 } | |
31 return 1; | |
32 diff -r 0ebf1721e4d3 -r a4ec24e030fd src/dmd/expression.c | |
33 --- a/src/dmd/expression.c Mon Sep 13 15:46:31 2010 +0200 | |
34 +++ b/src/dmd/expression.c Tue Sep 14 00:55:40 2010 +0200 | |
35 @@ -5953,7 +5953,7 @@ | |
36 } | |
37 else if (t1b->ty == Tpointer && | |
38 ident != Id::init && ident != Id::__sizeof && | |
39 - ident != Id::alignof && ident != Id::offsetof && | |
183
190ba98276b3
Several changes to make it build on posix systems.
Jacob Carlborg <doob@me.com>
parents:
140
diff
changeset
|
40 + ident != Id::_alignof && ident != Id::offsetof && |
140 | 41 ident != Id::mangleof && ident != Id::stringof) |
42 { /* Rewrite: | |
43 * p.ident | |
44 diff -r 0ebf1721e4d3 -r a4ec24e030fd src/dmd/idgen.c | |
45 --- a/src/dmd/idgen.c Mon Sep 13 15:46:31 2010 +0200 | |
46 +++ b/src/dmd/idgen.c Tue Sep 14 00:55:40 2010 +0200 | |
47 @@ -44,7 +44,7 @@ | |
48 { "init" }, | |
49 { "size" }, | |
50 { "__sizeof", "sizeof" }, | |
51 - { "alignof" }, | |
183
190ba98276b3
Several changes to make it build on posix systems.
Jacob Carlborg <doob@me.com>
parents:
140
diff
changeset
|
52 + { "_alignof", "alignof" }, |
140 | 53 { "mangleof" }, |
54 { "stringof" }, | |
55 { "tupleof" }, | |
56 diff -r 0ebf1721e4d3 -r a4ec24e030fd src/dmd/mtype.c | |
57 --- a/src/dmd/mtype.c Mon Sep 13 15:46:31 2010 +0200 | |
58 +++ b/src/dmd/mtype.c Tue Sep 14 00:55:40 2010 +0200 | |
59 @@ -1610,7 +1610,7 @@ | |
60 error(loc, ".size property should be replaced with .sizeof"); | |
61 e = new ErrorExp(); | |
62 } | |
63 - else if (ident == Id::alignof) | |
183
190ba98276b3
Several changes to make it build on posix systems.
Jacob Carlborg <doob@me.com>
parents:
140
diff
changeset
|
64 + else if (ident == Id::_alignof) |
140 | 65 { |
66 e = new IntegerExp(loc, alignsize(), Type::tsize_t); | |
67 } | |
68 @@ -1749,7 +1749,7 @@ | |
69 assert(sym); | |
70 | |
71 if (ident != Id::__sizeof && | |
72 - ident != Id::alignof && | |
183
190ba98276b3
Several changes to make it build on posix systems.
Jacob Carlborg <doob@me.com>
parents:
140
diff
changeset
|
73 + ident != Id::_alignof && |
140 | 74 ident != Id::init && |
75 ident != Id::mangleof && | |
76 ident != Id::stringof && | |
77 diff -r 0ebf1721e4d3 -r a4ec24e030fd src/dmd/win32.mak | |
78 --- a/src/dmd/win32.mak Mon Sep 13 15:46:31 2010 +0200 | |
79 +++ b/src/dmd/win32.mak Tue Sep 14 00:55:40 2010 +0200 | |
80 @@ -8,7 +8,8 @@ | |
81 DMDSVN=\svnproj\dmd\trunk\src | |
82 SCROOT=$D\dm | |
83 INCLUDE=$(SCROOT)\include | |
84 -CC=\dm\bin\dmc | |
85 +CC=$(SCROOT)\bin\dmc | |
86 +LIB=$(SCROOT)\bin\lib | |
87 LIBNT=$(SCROOT)\lib | |
88 SNN=$(SCROOT)\lib\snn | |
89 DIR=\dmd2 | |
90 @@ -24,7 +25,7 @@ | |
91 XFLG= | |
92 MODEL=n | |
93 OPT= | |
94 -DEBUG=-gl -D | |
95 +DEBUG=-g -D | |
96 #PREC=-H -HItotal.h -HO | |
97 PREC= | |
98 LFLAGS= | |
99 @@ -59,11 +60,17 @@ | |
100 $(MAKE) OPT=-o "DEBUG=" LFLAGS=-L/delexe dmd.exe | |
101 # $(MAKE) OPT=-o "DEBUG=" LFLAGS=-L/ma/co/delexe dmd.exe | |
102 | |
103 +lib: | |
104 + $(MAKE) OPT=-o "DEBUG=" dmd.lib | |
105 + | |
106 ################ NT COMMAND LINE DEBUG ######################### | |
107 | |
108 debdmd: | |
109 $(MAKE) OPT= "DEBUG=-D -g" LFLAGS=-L/ma/co dmd.exe | |
110 | |
111 +deblib: | |
112 + $(MAKE) OPT= "DEBUG=-D -g" dmd.lib | |
113 + | |
114 ######################################### | |
115 | |
116 # D front end | |
117 @@ -155,8 +162,11 @@ | |
118 ######################################### | |
119 | |
120 $(TARGET).exe : $(OBJS) win32.mak | |
121 - dmc -o$(TARGET).exe $(OBJS) -cpp -mn -Ar $(LFLAGS) | |
122 + $(CC) -o$(TARGET).exe $(OBJS) -cpp -mn -Ar $(LFLAGS) | |
123 | |
124 +$(TARGET).lib : $(OBJS) win32.mak | |
125 + $(LIB) -c -p128 $(TARGET).lib $(OBJ8) $(ROOTOBJS) msc.obj tk.obj util.obj entity.obj ph.obj eh.obj | |
126 + $(LIB) -d $(TARGET).lib iasm.obj | |
127 | |
128 ##################### INCLUDE MACROS ##################### | |
129 | |
130 @@ -171,11 +181,11 @@ | |
131 msgsx | |
132 | |
133 msgsx.exe : msgsx.c | |
134 - dmc msgsx -mn -D$(TARGET) $(DEFINES) $(WINLIBS) | |
135 + $(CC) msgsx -mn -D$(TARGET) $(DEFINES) $(WINLIBS) | |
136 | |
137 elxxx.c cdxxx.c optab.c debtab.c fltables.c tytab.c : \ | |
138 $C\cdef.h $C\cc.h $C\oper.h $C\ty.h $C\optabgen.c | |
139 - dmc -cpp -ooptabgen.exe $C\optabgen -DMARS -I$(TK) $(WINLIBS) #-L$(LINKS) | |
140 + $(CC) -cpp -ooptabgen.exe $C\optabgen -DMARS -I$(TK) $(WINLIBS) #-L$(LINKS) | |
141 optabgen | |
142 | |
143 impcnvtab.c : impcnvgen.c | |
144 @@ -183,7 +193,7 @@ | |
145 impcnvgen | |
146 | |
147 id.h id.c : idgen.c | |
148 - dmc -cpp idgen | |
149 + $(CC) -cpp idgen | |
150 idgen | |
151 | |
152 ##################### SPECIAL BUILDS ##################### | |
153 diff -r 0ebf1721e4d3 -r a4ec24e030fd src/druntime/win32.mak | |
154 --- a/src/druntime/win32.mak Mon Sep 13 15:46:31 2010 +0200 | |
155 +++ b/src/druntime/win32.mak Tue Sep 14 00:55:40 2010 +0200 | |
156 @@ -1,5 +1,5 @@ | |
157 | |
158 -DMD=dmd | |
159 +DMD=..\..\windows\bin\dmd | |
160 | |
161 CC=dmc | |
162 | |
163 @@ -300,7 +300,7 @@ | |
164 # NOTE: a pre-compiled minit.obj has been provided in dmd for Win32 and | |
165 # minit.asm is not used by dmd for Linux | |
166 | |
167 -OBJS= errno_c.obj complex.obj critical.obj deh.obj monitor.obj src\rt\minit.obj | |
168 +OBJS= errno_c.obj complex.obj critical.obj deh.obj monitor.obj minit.obj | |
169 OBJS_TO_DELETE= errno_c.obj complex.obj critical.obj deh.obj monitor.obj | |
170 | |
171 DOCS=\ | |
172 diff -r 0ebf1721e4d3 -r a4ec24e030fd src/phobos/win32.mak | |
173 --- a/src/phobos/win32.mak Mon Sep 13 15:46:31 2010 +0200 | |
174 +++ b/src/phobos/win32.mak Tue Sep 14 00:55:40 2010 +0200 | |
175 @@ -51,7 +51,7 @@ | |
176 | |
177 DMD=$(DIR)\bin\dmd | |
178 #DMD=..\dmd | |
179 -DMD=dmd | |
180 +DMD=..\..\windows\bin\dmd | |
181 | |
182 ## Location of where to write the html documentation files | |
183 |