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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
|
diff -ur builds/posix/make.defaults builds/posix/make.defaults
--- builds/posix/make.defaults 2016-07-07 13:56:13.036235166 +0200
+++ builds/posix/make.defaults 2016-07-07 14:29:52.368289242 +0200
@@ -102,7 +102,7 @@
#____________________________________________________________________________
# Firebird needs no RTTI
-RTTI_FLAG:= -fno-rtti
+RTTI_FLAG:=
# If this is defined then we use special rules useful for developers only
IsDeveloper = @DEVEL_FLG@
@@ -175,6 +175,7 @@
# Default extensions
ARCH_EXT= .lib
+OBJ_EXT= obj
EXEC_EXT= @EXEEXT@
SHRLIB_EXT=@SHRLIB_EXT@
LIB_PREFIX=
--- builds/posix/Makefile.in 2016-07-07 15:56:06.459221300 +0200
+++ builds/posix/Makefile.in 2016-07-13 12:44:57.134217200 +0200
@@ -665,7 +666,7 @@
include $(ROOT)/gen/make.shared.targets
-Dependencies = $(AllObjects:.o=.d)
+Dependencies = $(AllObjects:.$(OBJ_EXT)=.d)
-include $(Dependencies)
@@ -729,14 +730,14 @@
-$(MAKE) -C $(ROOT)/extern/libtommath clean
clean_objects:
- $(RM) `find $(TMP_ROOT)/ -type f -name '*.o' -print`
+ $(RM) `find $(TMP_ROOT)/ -type f -name '*.$(OBJ_EXT)' -print`
$(RM) `find $(TMP_ROOT)/ -type f -name '*.a' -print`
$(RM) `find $(TMP_ROOT)/ -type f -name '*.cpp' -print`
$(RM) `find $(TMP_ROOT)/ -type f -name '*.pas' -print`
clean_extern_objects:
$(RM) `find $(ROOT)/extern/ -type f -name '*.lo' -print`
- $(RM) `find $(ROOT)/extern/ -type f -name '*.o' -print`
+ $(RM) `find $(ROOT)/extern/ -type f -name '*.$(OBJ_EXT)' -print`
# Clear out dependancies files created by the gcc compiler
# since when .o and other files are deleted the dependant
diff -ur builds/posix/make.rules builds/posix/make.rules
--- builds/posix/make.rules 2016-07-07 13:56:13.036235166 +0200
+++ builds/posix/make.rules 2016-07-07 14:31:16.116291485 +0200
@@ -92,21 +92,21 @@
$(LIBO_TUNNEL_LIBRARY_PATH) $(GPRE_CURRENT) $(GPRE_FLAGS) $(firstword $<) $@
-.SUFFIXES: .lo .o .cpp .c
+.SUFFIXES: .lo .$(OBJ_EXT) .cpp .c
-%.o: %.c
+%.$(OBJ_EXT): %.c
$(CC) $(WCFLAGS) -c $(firstword $<) -o $@
-$(OBJ)/%.o: $(SRC_ROOT)/%.c
+$(OBJ)/%.$(OBJ_EXT): $(SRC_ROOT)/%.c
$(CC) $(WCFLAGS) -c $(firstword $<) -o $@
-$(OBJ)/%.o: $(OBJ)/%.cpp
+$(OBJ)/%.$(OBJ_EXT): $(OBJ)/%.cpp
$(CXX) $(WCXXFLAGS) -c $(firstword $<) -o $@
-$(OBJ)/%.o: $(SRC_ROOT)/%.cpp
+$(OBJ)/%.$(OBJ_EXT): $(SRC_ROOT)/%.cpp
$(CXX) $(WCXXFLAGS) -c $(firstword $<) -o $@
-$(OBJ)/%.o: $(ROOT)/%.cpp
+$(OBJ)/%.$(OBJ_EXT): $(ROOT)/%.cpp
$(CC) $(WCFLAGS) -c $(firstword $<) -o $@
.SUFFIXES: .epp .e
--- builds/posix/make.shared.variables.orig 2020-11-12 19:36:29.773409900 +0100
+++ builds/posix/make.shared.variables 2020-11-12 19:37:14.976503300 +0100
@@ -1,5 +1,5 @@
# Helper functions
-doObjects= $(patsubst %.y,%.o,$(patsubst %.epp,%.o,$(patsubst %.c,%.o,$(1:.cpp=.o))))
+doObjects= $(patsubst %.y,%.$(OBJ_EXT),$(patsubst %.epp,%.$(OBJ_EXT),$(patsubst %.c,%.$(OBJ_EXT),$(1:.cpp=.$(OBJ_EXT)))))
makeObjects= $(addprefix $(OBJ)/$(patsubst ../%,%,$(1))/,$(call doObjects,$2))
dirFiles= $(notdir $(wildcard ../src/$(1)/*.cpp)) $(notdir $(wildcard ../src/$(1)/*.c)) \
$(notdir $(wildcard ../src/$(1)/*.epp)) $(notdir $(wildcard ../src/$(1)/*.y))
--- src/include/gen/autoconfig.h.in.orig 2020-11-12 20:52:49.835722200 +0100
+++ src/include/gen/autoconfig.h.in 2020-11-12 20:53:18.148311100 +0100
@@ -773,7 +773,9 @@
#pragma warning(disable:4996) // 'identificator' was declared deprecated
#endif
+#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+#endif
//#ifdef _MSC_VER // don't know if this is useful for MinGW
#define NOATOM
--- builds/posix/prefix.mingw.orig 2020-11-12 21:37:39.574461300 +0100
+++ builds/posix/prefix.mingw 2020-11-12 21:37:55.448422500 +0100
@@ -20,8 +20,8 @@
#
# -Wno-unused-variable is used due to unused gpre generated variables
-PROD_FLAGS=-O2 -DMINGW -Dlint -DWIN32_LEAN_AND_MEAN
-DEV_FLAGS=-ggdb -DMINGW -Dlint -DWIN32_LEAN_AND_MEAN
+PROD_FLAGS=-O2 -DMINGW -Dlint -DWIN32_LEAN_AND_MEAN -wd4291 -wd4477
+DEV_FLAGS=-ggdb -DMINGW -Dlint -DWIN32_LEAN_AND_MEAN -wd4291 -wd4477
PLATFORM_PATH=os/win32
--- extern/btyacc/Makefile.orig 2020-11-12 21:39:13.833012400 +0100
+++ extern/btyacc/Makefile 2020-11-12 21:39:54.861473300 +0100
@@ -25,8 +25,8 @@
MAKEFILE = Makefile
-OBJS = closure.o error.o lalr.o lr0.o main.o mkpar.o output.o \
- mstring.o reader.o readskel.o skeleton.o symtab.o verbose.o warshall.o
+OBJS = closure.obj error.obj lalr.obj lr0.obj main.obj mkpar.obj output.obj \
+ mstring.obj reader.obj readskel.obj skeleton.obj symtab.obj verbose.obj warshall.obj
PRINT = pr -f -l88
@@ -44,7 +44,7 @@
$(PROGRAM): $(OBJS) $(LIBS)
$(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
-%.o: %.c
+%.obj: %.c
$(CC) $(CCFLAGS) -c $< -o $@
clean:; rm -f $(OBJS)
@@ -93,16 +93,16 @@
etags *.c *.h
###
-closure.o: defs.h
-error.o: defs.h
-lalr.o: defs.h
-lr0.o: defs.h
-main.o: defs.h
-mkpar.o: defs.h
-mstring.o: mstring.h
-output.o: defs.h
-reader.o: defs.h mstring.h
-skeleton.o: defs.h
-symtab.o: defs.h
-verbose.o: defs.h
-warshall.o: defs.h
+closure.obj: defs.h
+error.obj: defs.h
+lalr.obj: defs.h
+lr0.obj: defs.h
+main.obj: defs.h
+mkpar.obj: defs.h
+mstring.obj: mstring.h
+output.obj: defs.h
+reader.obj: defs.h mstring.h
+skeleton.obj: defs.h
+symtab.obj: defs.h
+verbose.obj: defs.h
+warshall.obj: defs.h
--- extern/cloop/Makefile.orig 2020-11-13 10:59:53.282923700 +0100
+++ extern/cloop/Makefile 2020-11-13 11:00:24.267079900 +0100
@@ -24,8 +24,8 @@
SRCS_C := $(foreach sdir,$(SRC_DIRS),$(wildcard $(sdir)/*.c))
SRCS_CPP := $(foreach sdir,$(SRC_DIRS),$(wildcard $(sdir)/*.cpp))
-OBJS_C := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS_C))
-OBJS_CPP := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRCS_CPP))
+OBJS_C := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.obj,$(SRCS_C))
+OBJS_CPP := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.obj,$(SRCS_CPP))
C_FLAGS := -fPIC
CXX_FLAGS := $(C_FLAGS)
@@ -43,10 +43,10 @@
vpath %.cpp $(SRC_DIRS)
define compile
-$1/%.o: %.c | $1
+$1/%.obj: %.c | $1
$(CC) -c $$(C_FLAGS) $$< -o $$@
-$1/%.o: %.cpp | $1
+$1/%.obj: %.cpp | $1
$(CXX) -c $$(CXX_FLAGS) $$< -o $$@
endef
@@ -75,11 +75,11 @@
-include $(addsuffix .d,$(basename $(OBJS_CPP)))
$(BIN_DIR)/cloop$(EXE_EXT): \
- $(OBJ_DIR)/cloop/Expr.o \
- $(OBJ_DIR)/cloop/Generator.o \
- $(OBJ_DIR)/cloop/Lexer.o \
- $(OBJ_DIR)/cloop/Parser.o \
- $(OBJ_DIR)/cloop/Main.o \
+ $(OBJ_DIR)/cloop/Expr.obj \
+ $(OBJ_DIR)/cloop/Generator.obj \
+ $(OBJ_DIR)/cloop/Lexer.obj \
+ $(OBJ_DIR)/cloop/Parser.obj \
+ $(OBJ_DIR)/cloop/Main.obj \
| $(BIN_DIR)
$(LD) $^ -o $@
@@ -105,24 +105,24 @@
$(SRC_DIR)/tests/test1/CppTest.cpp: $(SRC_DIR)/tests/test1/CalcCppApi.h
$(BIN_DIR)/test1-c$(SHRLIB_EXT): \
- $(OBJ_DIR)/tests/test1/CalcCApi.o \
- $(OBJ_DIR)/tests/test1/CTest.o \
+ $(OBJ_DIR)/tests/test1/CalcCApi.obj \
+ $(OBJ_DIR)/tests/test1/CTest.obj \
$(LD) $^ -o $@
$(BIN_DIR)/test1-c$(EXE_EXT): \
- $(OBJ_DIR)/tests/test1/CalcCApi.o \
- $(OBJ_DIR)/tests/test1/CTest.o \
+ $(OBJ_DIR)/tests/test1/CalcCApi.obj \
+ $(OBJ_DIR)/tests/test1/CTest.obj \
$(LD) $^ -o $@
$(BIN_DIR)/test1-cpp$(SHRLIB_EXT): \
- $(OBJ_DIR)/tests/test1/CppTest.o \
+ $(OBJ_DIR)/tests/test1/CppTest.obj \
$(LD) $^ -o $@
$(BIN_DIR)/test1-cpp$(EXE_EXT): \
- $(OBJ_DIR)/tests/test1/CppTest.o \
+ $(OBJ_DIR)/tests/test1/CppTest.obj \
$(LD) $^ -o $@
--- src/include/gen/autoconfig_msvc.h.orig 2020-11-13 12:42:36.231813100 +0100
+++ src/include/gen/autoconfig_msvc.h 2020-11-13 12:43:12.669012900 +0100
@@ -68,7 +68,9 @@
#pragma warning(disable:4996) // 'identificator' was declared deprecated
+#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+#endif
#ifdef _MSC_VER // don't know if this is useful for MinGW
#define NOATOM
diff -ur builds/posix/Makefile.in.examples builds/posix/Makefile.in.examples
--- builds/posix/Makefile.in.examples 2016-07-07 13:56:13.048235166 +0200
+++ builds/posix/Makefile.in.examples 2016-07-07 14:37:36.904301682 +0200
@@ -65,9 +65,9 @@
EXAMPLES_SRC= $(ROOT)/examples
-EMPBLD_Objects= $(EXAMPLES_DEST)/empbuild.o
+EMPBLD_Objects= $(EXAMPLES_DEST)/empbuild.$(OBJ_EXT)
-INTLBLD_Objects= $(EXAMPLES_DEST)/intlbld.o
+INTLBLD_Objects= $(EXAMPLES_DEST)/intlbld.$(OBJ_EXT)
INPUT_Files = empddl.sql empdml.sql indexoff.sql indexon.sql \
job.inp lang.inp proj.inp qtr.inp
@@ -172,3 +175,6 @@
$(EXAMPLES_DEST)/%.h: $(EXAMPLES_SRC)/common/%.h
$(CP) $^ $@
+
+$(EXAMPLES_DEST)/%.$(OBJ_EXT): $(EXAMPLES_DEST)/%.c
+ $(CC) -c $(firstword $<) -Fo$@ $(WCFLAGS)
--- src/lock/lock.cpp.orig 2020-11-13 17:57:23.485241200 +0100
+++ src/lock/lock.cpp 2020-11-13 17:57:51.001010600 +0100
@@ -463,6 +463,7 @@
LockTableGuard guard(This, FB_FUNCTION, owner_offset);
+#undef SRQ_BASE
#define SRQ_BASE ((UCHAR*) This->m_sharedMemory->getHeader())
own* owner = (own*) SRQ_ABS_PTR(owner_offset);
if (!owner->own_count)
@@ -486,6 +487,7 @@
// released before destroying the lock owner. This is not strictly required,
// but it enforces the proper object lifetime discipline through the codebase.
fb_assert(SRQ_EMPTY(owner->own_requests));
+#undef SRQ_BASE
#define SRQ_BASE ((UCHAR*) m_sharedMemory->getHeader())
This->purge_owner(owner_offset, owner);
--- builds/posix/Makefile.in.plugins_examples.orig 2020-11-13 20:25:55.865485400 +0100
+++ builds/posix/Makefile.in.plugins_examples 2020-11-13 20:26:13.084191800 +0100
@@ -104,5 +104,5 @@
include $(ROOT)/gen/make.shared.targets
-Dependencies = $(AllObjects:.o=.d)
+Dependencies = $(AllObjects:.$(OBJ_EXT)=.d)
-include $(Dependencies)
|