Package: boinc / 7.14.2+dfsg-3

static_scientific_apps.patch Patch series | download
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
Index: boinc/lib/Makefile.am
===================================================================
--- boinc.orig/lib/Makefile.am
+++ boinc/lib/Makefile.am
@@ -182,6 +182,10 @@
 libboinc_la_SOURCES = $(generic_sources) $(mac_sources) $(win_sources)
 libboinc_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
 libboinc_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
+libboinc_la_AR = gcc-ar
+libboinc_la_RANLIB = gcc-ranlib
+libboinc_a_AR = gcc-ar
+libboinc_a_RANLIB = gcc-ranlib
 libboinc_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
 libboinc_la_LIBADD =
 
@@ -190,6 +194,10 @@
 libboinc_crypt_la_SOURCES = crypt.cpp
 libboinc_crypt_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CFLAGS)
 libboinc_crypt_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CXXFLAGS)
+libboinc_crypt_la_AR = gcc-ar
+libboinc_crypt_la_RANLIB = gcc-ranlib
+libboinc_crypt_a_AR = gcc-ar
+libboinc_crypt_a_RANLIB = gcc-ranlib
 libboinc_crypt_la_LDFLAGS = -version-number $(LIBBOINC_VERSION) $(SSL_LIBS) $(RSA_LIBS)
 libboinc_crypt_la_LIBADD = $(LIBBOINC)
 endif
@@ -199,6 +207,10 @@
 libboinc_fcgi_la_SOURCES = $(libfcgi_sources) $(mac_sources) $(win_sources)
 libboinc_fcgi_la_CFLAGS = -D_USING_FCGI_ $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
 libboinc_fcgi_la_CXXFLAGS = -D_USING_FCGI_ $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
+libboinc_fcgi_la_AR = gcc-ar
+libboinc_fcgi_la_RANLIB = gcc-ranlib
+libboinc_fcgi_a_AR = gcc-ar
+libboinc_fcgi_a_RANLIB = gcc-ranlib
 libboinc_fcgi_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
 libboinc_fcgi_la_LIBADD =
 endif
@@ -262,7 +274,7 @@
 msg_test_LDADD = $(LIBBOINC)
 crypt_prog_SOURCES = crypt_prog.cpp
 crypt_prog_CXXFLAGS = $(PTHREAD_CFLAGS) $(SSL_CXXFLAGS)
-crypt_prog_LDADD = $(LIBBOINC_CRYPT_STATIC) $(LIBBOINC) $(SSL_LIBS)
+crypt_prog_LDADD = $(LIBBOINC_CRYPT) $(LIBBOINC) $(SSL_LIBS)
 parse_test_SOURCES = parse_test.cpp
 parse_test_CXXFLAGS = $(PTHREAD_CFLAGS)
 parse_test_LDADD = $(LIBBOINC)
Index: boinc/samples/condor/Makefile
===================================================================
--- boinc.orig/samples/condor/Makefile
+++ boinc/samples/condor/Makefile
@@ -1,18 +1,18 @@
 all: boinc_gahp
 
 clean:
-	rm -f boinc_gahp
+	rm -f boinc_gahp libcurl.a
 
 distclean: clean
 
 distclean-recursive: clean
 
-boinc_gahp: boinc_gahp.cpp ../../lib/remote_submit.h ../../lib/remote_submit.cpp ../../svn_version.h
-	g++ -g -O0 -I../../lib -I../.. \
+boinc_gahp: boinc_gahp.cpp ../../lib/remote_submit.h ../../lib/remote_submit.cpp ../../svn_version.h $(CXX) $(CPPFLAGS) -static -pthread -g -O0 -I../../lib -I../.. \
+	$(CXX) $(CPPFLAGS) -static -pthread -g -O0 -I../../lib -I../.. \
 	-o boinc_gahp boinc_gahp.cpp ../../lib/remote_submit.cpp \
-	-L../../lib -lboinc -lpthread -lcurl
+	$(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a libcurl.a
 
 test: test.cpp ../../lib/remote_submit.cpp ../../lib/remote_submit.h
-	g++ -g -o test -I../../lib \
+	$(CXX) $(CPPFLAGS) -static -g -o test -I../../lib \
 	test.cpp ../../lib/remote_submit.cpp \
-	-L../../lib -lboinc -lcurl
+	$(BOINC_LIB_DIR)/libboinc.a libcurl.a
Index: boinc/samples/multi_thread/Makefile
===================================================================
--- boinc.orig/samples/multi_thread/Makefile
+++ boinc/samples/multi_thread/Makefile
@@ -26,4 +26,4 @@
 	/bin/rm -f $(PROGS) *.o libstdc++.a
 
 multi_thread: multi_thread.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
-	$(CXX) $(CXXFLAGS) -o multi_thread multi_thread.o libstdc++.a -pthread -lboinc_api -lboinc
+	$(CXX) $(CPPFLAGS) -static -pthread -o multi_thread multi_thread.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
Index: boinc/samples/sleeper/Makefile
===================================================================
--- boinc.orig/samples/sleeper/Makefile
+++ boinc/samples/sleeper/Makefile
@@ -17,7 +17,7 @@
 all: $(PROGS)
 
 libstdc++.a:
-	ln -s `g++ -print-file-name=libstdc++.a`
+	ln -s `$(CXX) -print-file-name=libstdc++.a`
 
 clean: distclean
 
@@ -25,4 +25,4 @@
 	rm -f $(PROGS) *.o libstdc++.a
 
 sleeper: sleeper.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a
-	g++ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o sleeper sleeper.o libstdc++.a -pthread -lboinc_api -lboinc
+	$(CXX) $(CPPFLAGS) -static -pthread -o sleeper sleeper.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
Index: boinc/samples/vboxmonitor/Makefile
===================================================================
--- boinc.orig/samples/vboxmonitor/Makefile
+++ boinc/samples/vboxmonitor/Makefile
@@ -27,4 +27,4 @@
 	/bin/rm -f $(PROGS) *.o libstdc++.a
 
 vboxmonitor: vboxmonitor.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a
-	g++ $(CXXFLAGS) -o vboxmonitor vboxmonitor.o libstdc++.a -pthread -lboinc_api -lboinc
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -static -pthread -o vboxmonitor vboxmonitor.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
Index: boinc/samples/vboxwrapper/Makefile
===================================================================
--- boinc.orig/samples/vboxwrapper/Makefile
+++ boinc/samples/vboxwrapper/Makefile
@@ -27,25 +27,26 @@
 	/bin/rm -f $(PROGS) *.o libstdc++.a
 
 floppyio.o: floppyio.cpp
-	g++ $(CXXFLAGS) -c floppyio.cpp
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c floppyio.cpp
 
 vbox_common.o: vbox_common.cpp
-	g++ $(CXXFLAGS) -c vbox_common.cpp
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vbox_common.cpp
 
 vbox_vboxmanage.o: vbox_vboxmanage.cpp
-	g++ $(CXXFLAGS) -c vbox_vboxmanage.cpp
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vbox_vboxmanage.cpp
 
 vboxcheckpoint.o: vboxcheckpoint.cpp
-	g++ $(CXXFLAGS) -c vboxcheckpoint.cpp
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vboxcheckpoint.cpp
 
 vboxjob.o: vboxjob.cpp
-	g++ $(CXXFLAGS) -c vboxjob.cpp
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vboxjob.cpp
 
 vboxlogging.o: vboxlogging.cpp
-	g++ $(CXXFLAGS) -c vboxlogging.cpp
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vboxlogging.cpp
 
 vboxwrapper.o: vboxwrapper.cpp
-	g++ $(CXXFLAGS) -c vboxwrapper.cpp
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c vboxwrapper.cpp
 
 vboxwrapper: vboxwrapper.o vbox_common.o vbox_vboxmanage.o vboxcheckpoint.o vboxjob.o vboxlogging.o floppyio.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a
-	g++ $(CXXFLAGS) -o vboxwrapper vboxwrapper.o vbox_common.o vbox_vboxmanage.o vboxcheckpoint.o vboxjob.o vboxlogging.o floppyio.o libstdc++.a -pthread -lboinc_api -lboinc
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -static -pthread -o vboxwrapper vboxwrapper.o vbox_common.o vbox_vboxmanage.o vboxcheckpoint.o vboxjob.o vboxlogging.o floppyio.o \
+	libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
Index: boinc/samples/worker/Makefile
===================================================================
--- boinc.orig/samples/worker/Makefile
+++ boinc/samples/worker/Makefile
@@ -10,4 +10,4 @@
 	rm -f $(PROGS) *.o
 
 worker: worker.o
-	g++ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o worker worker.o
+	$(CXX) $(CPPFLAGS) -static -o worker worker.o
Index: boinc/samples/wrapper/Makefile
===================================================================
--- boinc.orig/samples/wrapper/Makefile
+++ boinc/samples/wrapper/Makefile
@@ -37,5 +37,5 @@
 	regexp_memory.o \
 	regexp_report.o
 
-wrapper: wrapper.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a $(REGEXP_OBJS)
-	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o wrapper wrapper.o $(REGEXP_OBJS) libstdc++.a $(PTHREAD) -lboinc_api -lboinc -lboinc_zip $(LDFLAGS)
+wrapper: wrapper.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_ZIP_DIR)/libboinc_zip.a $(REGEXP_OBJS)
+	$(CXX) $(CPPFLAGS) $(PTHREAD) -static -o wrapper wrapper.o $(REGEXP_OBJS) libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_ZIP_DIR)/libboinc_zip.a $(BOINC_LIB_DIR)/libboinc.a
Index: boinc/samples/wrappture/Makefile
===================================================================
--- boinc.orig/samples/wrappture/Makefile
+++ boinc/samples/wrappture/Makefile
@@ -29,10 +29,10 @@
 	/bin/rm -f $(PROGS) *.o libstdc++.a
 
 wrappture.o: wrappture.cpp
-	g++ $(CXXFLAGS) -c -o wrappture.o wrappture.cpp
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o wrappture.o wrappture.cpp
 
 wrappture_example: wrappture.o wrappture_example.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a $(RAPPTURE_DIR)/librappture.a
-	g++ $(CXXFLAGS) -o wrappture_example wrappture_example.o wrappture.o $(RAPPTURE_DIR)/librappture.a libstdc++.a -pthread -lboinc_api -lboinc -lexpat -lz
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -static -pthread -o wrappture_example wrappture_example.o wrappture.o $(RAPPTURE_DIR)/librappture.a libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
 
 fermi: fermi.cpp
-	g++ $(CSSFLAGS) -o fermi fermi.cpp
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -static -o fermi fermi.cpp
Index: boinc/samples/example_app/Makefile
===================================================================
--- boinc.orig/samples/example_app/Makefile
+++ boinc/samples/example_app/Makefile
@@ -61,17 +61,17 @@
 # because otherwise you might get a version in /usr/lib etc.
 
 uc2: uc2.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
-	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o uc2 uc2.o libstdc++.a -pthread \
+	$(CXX) $(CPPFLAGS) -static -pthread -o uc2 uc2.o libstdc++.a \
 	$(BOINC_API_DIR)/libboinc_api.a \
 	$(BOINC_LIB_DIR)/libboinc.a
 
 ucn: ucn.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
-	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o ucn ucn.o libstdc++.a -pthread \
+	$(CXX) $(CPPFLAGS) -static -pthread -o ucn ucn.o libstdc++.a \
 	$(BOINC_API_DIR)/libboinc_api.a \
 	$(BOINC_LIB_DIR)/libboinc.a
 
 uc2_graphics: uc2_graphics.o ttfont.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics2.a
-	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o uc2_graphics uc2_graphics.o ttfont.o libstdc++.a -pthread \
+	$(CXX) $(CPPFLAGS) -static -pthread -o uc2_graphics uc2_graphics.o ttfont.o libstdc++.a \
 	$(BOINC_API_DIR)/libboinc_graphics2.a \
 	$(BOINC_API_DIR)/libboinc_api.a \
 	$(BOINC_LIB_DIR)/libboinc.a \
@@ -79,7 +79,7 @@
     -lftgl -lGL -lX11 -lXmu -lm
 
 slide_show: slide_show.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics2.a
-	$(CXX) $(CXXFLAGS) -o slide_show slide_show.o libstdc++.a -pthread \
+	$(CXX) -static -pthread -o slide_show slide_show.o libstdc++.a \
 	$(BOINC_API_DIR)/libboinc_graphics2.a \
 	$(BOINC_API_DIR)/libboinc_api.a \
 	$(BOINC_LIB_DIR)/libboinc.a \
Index: boinc/api/Makefile.am
===================================================================
--- boinc.orig/api/Makefile.am
+++ boinc/api/Makefile.am
@@ -45,6 +45,10 @@
 libboinc_api_la_SOURCES = $(api_files)
 libboinc_api_la_LDFLAGS = -version-number $(LIBBOINC_VERSION) -lpthread
 libboinc_api_la_LIBADD = -L../lib/.libs $(LIBBOINC)
+libboinc_api_la_AR = gcc-ar
+libboinc_api_la_RANLIB = gcc-ranlib
+libboinc_api_a_AR = gcc-ar
+libboinc_api_a_RANLIB = gcc-ranlib
 
 if BUILD_GRAPHICS_API
 lib_LTLIBRARIES += libboinc_graphics2.la
@@ -52,12 +56,20 @@
 libboinc_graphics2_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/samples/image_libs
 libboinc_graphics2_la_LDFLAGS = -version-number $(LIBBOINC_VERSION) -ljpeg
 libboinc_graphics2_la_LIBADD = -L../lib/.libs $(APPLIBS)
+libboinc_graphics2_la_AR = gcc-ar
+libboinc_graphics2_la_RANLIB = gcc-ranlib
+libboinc_graphics2_a_AR = gcc-ar
+libboinc_graphics2_a_RANLIB = gcc-ranlib
 endif #BUILD_GRAPHICS_API
 
 lib_LTLIBRARIES += libboinc_opencl.la
 libboinc_opencl_la_SOURCES = $(opencl_files)
 libboinc_opencl_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
 libboinc_opencl_la_LIBADD = -L../lib/.libs $(APPLIBS)
+libboinc_opencl_la_AR = gcc-ar
+libboinc_opencl_la_RANLIB = gcc-ranlib
+libboinc_opencl_a_AR = gcc-ar
+libboinc_opencl_a_RANLIB = gcc-ranlib
 
 if INSTALL_HEADERS
 ## install only headers that are meant for exporting the API !!
Index: boinc/zip/Makefile.am
===================================================================
--- boinc.orig/zip/Makefile.am
+++ boinc/zip/Makefile.am
@@ -63,6 +63,10 @@
 libboinc_zip_la_SOURCES = $(libboinc_zip_sources)
 libboinc_zip_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
 libboinc_zip_la_LIBADD = $(LIBBOINC)
+libboinc_zip_la_AR = gcc-ar
+libboinc_zip_la_RANLIB = gcc-ranlib
+libboinc_zip_a_AR = gcc-ar
+libboinc_zip_a_RANLIB = gcc-ranlib
 
 # Some OSs may not prefix libraries with lib.
 # For example OS2
Index: boinc/configure.ac
===================================================================
--- boinc.orig/configure.ac
+++ boinc/configure.ac
@@ -69,6 +69,12 @@
 AC_LANG_PUSH(C)
 AM_PROG_CC_C_O
 
+dnl ------
+dnl  essential for LTO and static applications in apps and samples
+AC_PROG_RANLIB
+AM_PROG_AR
+dnl ------
+
 m4_divert_once([HELP_ENABLE],
   AS_HELP_STRING([BOINC Default enable values], [--enable-server --enable-client --enable-libraries --enable-manager: builds server, client, and libraries]))