Merge lp:~epics-core/epics-base/3.15-buildCompilerSpecific into lp:~epics-core/epics-base/3.15
- 3.15-buildCompilerSpecific
- Merge into 3.15
Status: | Merged |
---|---|
Merged at revision: | 12244 |
Proposed branch: | lp:~epics-core/epics-base/3.15-buildCompilerSpecific |
Merge into: | lp:~epics-core/epics-base/3.15 |
Diff against target: |
832 lines (+634/-6) (has conflicts) 16 files modified
configure/CONFIG.gnuCommon (+2/-0) configure/CONFIG_COMMON (+18/-4) configure/RULES_BUILD (+5/-1) configure/os/CONFIG.solarisCommon.solarisCommon (+2/-0) configure/os/CONFIG.win32-x86-borland.win32-x86-borland (+2/-0) configure/os/CONFIG.win32-x86.win32-x86 (+2/-0) configure/os/CONFIG_SITE.Common.darwin-x86 (+7/-1) configure/os/CONFIG_SITE.Common.linux-x86 (+10/-0) configure/os/CONFIG_SITE.Common.linux-x86_64 (+10/-0) src/libCom/Makefile (+276/-0) src/libCom/osi/compiler/borland/compilerSpecific.h (+45/-0) src/libCom/osi/compiler/clang/compilerSpecific.h (+49/-0) src/libCom/osi/compiler/default/compilerSpecific.h (+33/-0) src/libCom/osi/compiler/gcc/compilerSpecific.h (+64/-0) src/libCom/osi/compiler/msvc/compilerSpecific.h (+47/-0) src/libCom/osi/compilerDependencies.h (+62/-0) Text conflict in configure/os/CONFIG_SITE.Common.darwin-x86 Text conflict in configure/os/CONFIG_SITE.Common.linux-x86 Text conflict in configure/os/CONFIG_SITE.Common.linux-x86_64 Text conflict in src/libCom/Makefile Contents conflict in src/libCom/misc/compilerDependencies.h |
To merge this branch: | bzr merge lp:~epics-core/epics-base/3.15-buildCompilerSpecific |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
EPICS Core Developers | Pending | ||
Review via email: mp+72258@code.launchpad.net |
Commit message
Description of the change
o Upgrade the build system so that we can implement functionality which is compiler specific in a separate file for each compiler. This will avoid accumulating MxN ifdef's where M is the number of OS and N is the number of compilers (worst case). This will make it easier to find code that is compiler specific centralizing all of it under libCom/
o I also re-factored compilerDepende
Note that we don't want too much in each proposed merge. However, w/o a small code change such as the re-factoring of compilerDepende
Andrew Johnson (anj) wrote : | # |
- 12230. By Andrew Johnson
-
configure: Adjust instructions for switching to clang
- 12231. By Andrew Johnson
-
Move default macros to compilerDepende
ncies.h
Added check in gcc-specific header to error if __clang__ defined
Some versions of clang don't support __has_attribute()
Jeff Hill (johill-lanl) wrote : | # |
your changes look good
> Both darwin and linux can build Base using clang, but when I use clang on Linux
> with the gcc header it doesn't hit the #error in compiler/
> since clang defines __GNUC__ anyway. There needs to be an easy way to make that
> switch (including setting CC and CCC) based on a single CONFIG_SITE setting.
I suspect that you now see that I did implement a clang specific compilerDepende
I did include a #warning in that file because I don't yet have clang installed here
and it hasn't been tested.
I see that you added a commented out compiler class definition (which will cause the
clang specific file to be used) for clang in multiple places. Perhaps we can
conditionally include a clang specific configure file as we do with gcc so that
this can be consolidated? The typical approach is to add a suffix to the
arch - i.e. linux-x86-clang. That probably needs to be done, but it probably
should be considered orthogonal to this merge proposal (I prefer not to
block other layered merges)
> Have you based your atomic branch on this one? I'd like to drop your 12229 merge
> commit, but that would probably mess you up if I did.
For this branch I started with R3.15, and copied stuff over from the atomics branch.
I do have the following code in the atomics branch so it does apparently have 12229 but I
might have manually copied in the change.
+/*
833 + * Deprecation marker if possible
834 + */
835 +#if (__GNUC__ > 2)
836 +# define EPICS_DEPRECATED __attribute_
837 +#else
838 +# define EPICS_DEPRECATED
839 +#endif
Andrew Johnson (anj) wrote : | # |
Hi Jeff,
On 2011-08-31 Jeff Hill wrote:
> your changes look good
Thanks.
> I suspect that you now see that I did implement a clang specific
> compilerDepende
> yet have clang installed here and it hasn't been tested.
I removed it after testing on Linux, and I added a #error in the gcc-specific
header if it gets used by clang.
> I see that you added a commented out compiler class definition (which will
> cause the clang specific file to be used) for clang in multiple places.
> Perhaps we can conditionally include a clang specific configure file as we
> do with gcc so that this can be consolidated? The typical approach is to
> add a suffix to the arch - i.e. linux-x86-clang. That probably needs to be
> done, but it probably should be considered orthogonal to this merge
> proposal (I prefer not to block other layered merges)
You're probably right about adding *-x86-clang targets, although there may be
some complications on MacOS/X, see the discussion of gcc_select at
https:/
I'll talk to Janet about this.
> > Have you based your atomic branch on this one? I'd like to drop your
> > 12229 merge commit, but that would probably mess you up if I did.
Forget that idea of dropping 12229, it's not a problem.
I will try to merge this branch into lp:epics-base/3.15 today.
- Andrew
--
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham
Preview Diff
1 | === modified file 'configure/CONFIG.gnuCommon' |
2 | --- configure/CONFIG.gnuCommon 2009-11-25 17:15:47 +0000 |
3 | +++ configure/CONFIG.gnuCommon 2011-08-31 22:40:21 +0000 |
4 | @@ -12,6 +12,8 @@ |
5 | |
6 | GNU = YES |
7 | |
8 | +CMPLR_CLASS = gcc |
9 | + |
10 | GNU_BIN = $(GNU_DIR)/bin |
11 | GNU_LIB = $(GNU_DIR)/lib |
12 | |
13 | |
14 | === modified file 'configure/CONFIG_COMMON' |
15 | --- configure/CONFIG_COMMON 2011-08-17 21:36:38 +0000 |
16 | +++ configure/CONFIG_COMMON 2011-08-31 22:40:21 +0000 |
17 | @@ -133,11 +133,14 @@ |
18 | GENERIC_SRC_DIRS = .. $(SRC_DIRS) |
19 | OS_SRC_DIRS += . $(foreach dir, .. $(SRC_DIRS), \ |
20 | $(addprefix $(dir)/, os/$(OS_CLASS) $(POSIX_$(POSIX)) os/default )) |
21 | -ALL_SRC_DIRS = $(OS_SRC_DIRS) $(GENERIC_SRC_DIRS) |
22 | +CMPLR_SRC_DIRS += . $(foreach dir, .. $(SRC_DIRS), \ |
23 | + $(addprefix $(dir)/, compiler/$(CMPLR_CLASS) compiler/default )) |
24 | +ALL_SRC_DIRS = $(CMPLR_SRC_DIRS) $(OS_SRC_DIRS) $(GENERIC_SRC_DIRS) |
25 | |
26 | #-------------------------------------------------- |
27 | # compile line include directories |
28 | INSTALL_INCLUDES += \ |
29 | + -I$(INSTALL_INCLUDE)/compiler/$(CMPLR_CLASS) \ |
30 | -I$(INSTALL_INCLUDE)/os/$(OS_CLASS) \ |
31 | -I$(INSTALL_INCLUDE) |
32 | SRC_INCLUDES = -I$(COMMON_DIR) $(addprefix -I, $(wildcard $(ALL_SRC_DIRS))) |
33 | @@ -379,25 +382,36 @@ |
34 | # |
35 | # auto determine the directory paths that things are installed to |
36 | # RULES: |
37 | -# 1) found in any one of several os specific area |
38 | +# 0) found in any one of several compiler specific paths |
39 | +# => install to $(INSTALL_INCLUDE)/compiler/$(CMPLR_CLASS) |
40 | +# 1) not found in (0) and found in any one of several OS specific paths |
41 | # => install to $(INSTALL_INCLUDE)/os/$(OS_CLASS) |
42 | -# 2) not foundin (1) and found in generic area |
43 | +# 2) not found in (1) and found in generic paths |
44 | # => install to $(INSTALL_INCLUDE) |
45 | # 3) not found in (1) or (2) then may be (not yet) computer generated |
46 | # => install into $(INSTALL_INCLUDE)/os/$(OS_CLASS) and let |
47 | # build rules work on vpath |
48 | # |
49 | # These rules guarantee that the users include from |
50 | -# no more than two directories |
51 | +# no more than three directories |
52 | # |
53 | INSTALL_INC += $(foreach inc, $(INC), \ |
54 | $(firstword \ |
55 | + $(CMPLR_INSTALL_INC) \ |
56 | $(OS_INSTALL_INC) \ |
57 | $(GENERIC_INSTALL_INC) \ |
58 | $(GENERATED_INSTALL_INC) ) ) |
59 | INSTALL_INC += $(addprefix $(INSTALL_INCLUDE)/os/$(OS_CLASS)/, $(INC_$(OS_CLASS)) ) |
60 | |
61 | # |
62 | +# Rule 0 |
63 | +# |
64 | +CMPLR_INSTALL_INC = $(addprefix $(INSTALL_INCLUDE)/compiler/$(CMPLR_CLASS)/, $(INSTALL_INC_jjj) ) |
65 | +INSTALL_INC_jjj = $(foreach dir, $(CMPLR_SRC_DIRS), $(INSTALL_INC_iii) ) |
66 | +INSTALL_INC_iii = $(subst $(dir)/, , $(INSTALL_INC_hhh) ) |
67 | +INSTALL_INC_hhh = $(wildcard $(addsuffix /$(inc), $(dir)) ) |
68 | + |
69 | +# |
70 | # Rule 1 |
71 | # |
72 | OS_INSTALL_INC = $(addprefix $(INSTALL_INCLUDE)/os/$(OS_CLASS)/, $(INSTALL_INC_ggg) ) |
73 | |
74 | === modified file 'configure/RULES_BUILD' |
75 | --- configure/RULES_BUILD 2010-12-20 15:48:12 +0000 |
76 | +++ configure/RULES_BUILD 2011-08-31 22:40:21 +0000 |
77 | @@ -408,7 +408,11 @@ |
78 | @$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D) |
79 | |
80 | $(INSTALL_INCLUDE)/os/$(OS_CLASS)/% : % |
81 | - $(ECHO) "Installing os dependent include file $@" |
82 | + $(ECHO) "Installing OS dependent include file $@" |
83 | + @$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D) |
84 | + |
85 | +$(INSTALL_INCLUDE)/compiler/$(CMPLR_CLASS)/% : % |
86 | + $(ECHO) "Installing compiler dependent include file $@" |
87 | @$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D) |
88 | |
89 | $(INSTALL_DOC)/%: % |
90 | |
91 | === modified file 'configure/os/CONFIG.solarisCommon.solarisCommon' |
92 | --- configure/os/CONFIG.solarisCommon.solarisCommon 2010-10-05 19:27:37 +0000 |
93 | +++ configure/os/CONFIG.solarisCommon.solarisCommon 2011-08-31 22:40:21 +0000 |
94 | @@ -7,6 +7,8 @@ |
95 | # Sites may override these definitions in CONFIG_SITE.solaris-sparc.solaris-sparc |
96 | #------------------------------------------------------- |
97 | |
98 | +CMPLR_CLASS = solStudio |
99 | + |
100 | SPARCWORKS = /opt/SUNWspro |
101 | GNU = NO |
102 | |
103 | |
104 | === modified file 'configure/os/CONFIG.win32-x86-borland.win32-x86-borland' |
105 | --- configure/os/CONFIG.win32-x86-borland.win32-x86-borland 2011-02-16 16:57:20 +0000 |
106 | +++ configure/os/CONFIG.win32-x86-borland.win32-x86-borland 2011-08-31 22:40:21 +0000 |
107 | @@ -7,6 +7,8 @@ |
108 | # Sites may override these definitions in CONFIG_SITE.win32-x86-borland.win32-x86-borland |
109 | #------------------------------------------------------- |
110 | |
111 | +CMPLR_CLASS = borland |
112 | + |
113 | # Win32 valid build types and include directory suffixes |
114 | |
115 | VALID_BUILDS = Host Ioc |
116 | |
117 | === modified file 'configure/os/CONFIG.win32-x86.win32-x86' |
118 | --- configure/os/CONFIG.win32-x86.win32-x86 2011-08-17 21:36:38 +0000 |
119 | +++ configure/os/CONFIG.win32-x86.win32-x86 2011-08-31 22:40:21 +0000 |
120 | @@ -11,6 +11,8 @@ |
121 | |
122 | VALID_BUILDS = Host Ioc |
123 | |
124 | +CMPLR_CLASS = msvc |
125 | + |
126 | # convert UNIX path to native path |
127 | PATH_FILTER = $(subst /,\\,$(1)) |
128 | |
129 | |
130 | === modified file 'configure/os/CONFIG_SITE.Common.darwin-x86' |
131 | --- configure/os/CONFIG_SITE.Common.darwin-x86 2011-08-17 21:36:38 +0000 |
132 | +++ configure/os/CONFIG_SITE.Common.darwin-x86 2011-08-31 22:40:21 +0000 |
133 | @@ -14,10 +14,16 @@ |
134 | #ARCH_CLASS = x86_64 |
135 | #ARCH_CLASS = i386 x86_64 |
136 | |
137 | -# |
138 | # Uncomment the followings lines to build with CLANG instead of GCC. |
139 | # |
140 | +<<<<<<< TREE |
141 | #CC = clang |
142 | #CCC = clang++ |
143 | #GNU_LDLIBS_YES = |
144 | |
145 | +======= |
146 | +#GNU = NO |
147 | +#CMPLR_CLASS = clang |
148 | +#CC = clang |
149 | +#CCC = clang++ |
150 | +>>>>>>> MERGE-SOURCE |
151 | |
152 | === modified file 'configure/os/CONFIG_SITE.Common.linux-x86' |
153 | --- configure/os/CONFIG_SITE.Common.linux-x86 2011-08-26 21:49:36 +0000 |
154 | +++ configure/os/CONFIG_SITE.Common.linux-x86 2011-08-31 22:40:21 +0000 |
155 | @@ -33,6 +33,7 @@ |
156 | #COMMANDLINE_LIBRARY = READLINE_CURSES |
157 | |
158 | OP_SYS_CFLAGS += -g |
159 | +<<<<<<< TREE |
160 | |
161 | # Some Linux distributions provide clang as an alternative to GCC. |
162 | # To use clang if you have it, uncomment these three lines: |
163 | @@ -40,3 +41,12 @@ |
164 | #CCC = clang++ |
165 | #GNU_LDLIBS_YES = |
166 | |
167 | +======= |
168 | + |
169 | +# Uncomment the followings lines to build with CLANG instead of GCC. |
170 | +# |
171 | +#GNU = NO |
172 | +#CMPLR_CLASS = clang |
173 | +#CC = clang |
174 | +#CCC = clang++ |
175 | +>>>>>>> MERGE-SOURCE |
176 | |
177 | === modified file 'configure/os/CONFIG_SITE.Common.linux-x86_64' |
178 | --- configure/os/CONFIG_SITE.Common.linux-x86_64 2011-08-26 21:49:36 +0000 |
179 | +++ configure/os/CONFIG_SITE.Common.linux-x86_64 2011-08-31 22:40:21 +0000 |
180 | @@ -33,6 +33,7 @@ |
181 | #COMMANDLINE_LIBRARY = READLINE_CURSES |
182 | |
183 | OP_SYS_CFLAGS += -g |
184 | +<<<<<<< TREE |
185 | |
186 | # Some Linux distributions provide clang as an alternative to GCC. |
187 | # To use clang if you have it, uncomment these three lines: |
188 | @@ -40,3 +41,12 @@ |
189 | #CCC = clang++ |
190 | #GNU_LDLIBS_YES = |
191 | |
192 | +======= |
193 | + |
194 | +# Uncomment the followings lines to build with CLANG instead of GCC. |
195 | +# |
196 | +#GNU = NO |
197 | +#CMPLR_CLASS = clang |
198 | +#CC = clang |
199 | +#CCC = clang++ |
200 | +>>>>>>> MERGE-SOURCE |
201 | |
202 | === modified file 'src/libCom/Makefile' |
203 | --- src/libCom/Makefile 2011-08-23 22:28:20 +0000 |
204 | +++ src/libCom/Makefile 2011-08-31 22:40:21 +0000 |
205 | @@ -9,6 +9,7 @@ |
206 | TOP = ../.. |
207 | include $(TOP)/configure/CONFIG |
208 | |
209 | +<<<<<<< TREE |
210 | SRC = $(TOP)/src |
211 | LIBCOM = $(SRC)/libCom |
212 | |
213 | @@ -38,6 +39,281 @@ |
214 | include $(LIBCOM)/yacc/Makefile |
215 | |
216 | # Library to build: |
217 | +======= |
218 | +LIBCOM = $(TOP)/src/libCom |
219 | + |
220 | +# Command-line input support |
221 | +epicsReadline_CFLAGS += -DEPICS_COMMANDLINE_LIBRARY=EPICS_COMMANDLINE_LIBRARY_$(COMMANDLINE_LIBRARY) |
222 | +epicsReadline_INCLUDES += $(INCLUDES_$(COMMANDLINE_LIBRARY)) |
223 | + |
224 | +#POSIX thread priority scheduling flag |
225 | +THREAD_CPPFLAGS_NO += -DDONT_USE_POSIX_THREAD_PRIORITY_SCHEDULING |
226 | +osdThread_CPPFLAGS += $(THREAD_CPPFLAGS_$(USE_POSIX_THREAD_PRIORITY_SCHEDULING)) |
227 | + |
228 | +#epicsVersion is created by this Makefile |
229 | +INC += epicsVersion.h |
230 | + |
231 | +SRC_DIRS += $(LIBCOM)/bucketLib |
232 | +INC += bucketLib.h |
233 | +SRCS += bucketLib.c |
234 | + |
235 | +SRC_DIRS += $(LIBCOM)/ring |
236 | +#following needed for locating epicsRingPointer.h and epicsRingBytes.h |
237 | +INC += epicsRingPointer.h |
238 | +INC += epicsRingBytes.h |
239 | +SRCS += epicsRingPointer.cpp |
240 | +SRCS += epicsRingBytes.c |
241 | + |
242 | +SRC_DIRS += $(LIBCOM)/calc |
243 | +INC += postfix.h |
244 | +SRCS += postfix.c |
245 | +SRCS += calcPerform.c |
246 | + |
247 | +SRC_DIRS += $(LIBCOM)/cvtFast |
248 | +INC += cvtFast.h |
249 | +SRCS += cvtFast.c |
250 | + |
251 | +# From cppStd |
252 | +SRC_DIRS += $(LIBCOM)/cppStd |
253 | +INC += epicsAlgorithm.h |
254 | +INC += epicsExcept.h |
255 | +INC += epicsMemory.h |
256 | + |
257 | +# From cxxTemplates |
258 | +SRC_DIRS += $(LIBCOM)/cxxTemplates |
259 | +INC += resourceLib.h |
260 | +INC += tsDLList.h |
261 | +INC += tsSLList.h |
262 | +INC += tsMinMax.h |
263 | +INC += tsBTree.h |
264 | +INC += tsFreeList.h |
265 | +INC += epicsSingleton.h |
266 | +INC += epicsGuard.h |
267 | +INC += epicsOnce.h |
268 | +SRCS += resourceLib.cpp |
269 | +SRCS += epicsOnce.cpp |
270 | +SRCS += epicsSingletonMutex.cpp |
271 | + |
272 | +SRC_DIRS += $(LIBCOM)/dbmf |
273 | +INC += dbmf.h |
274 | +SRCS += dbmf.c |
275 | + |
276 | +SRC_DIRS += $(LIBCOM)/ellLib |
277 | +INC += ellLib.h |
278 | +SRCS += ellLib.c |
279 | + |
280 | +SRC_DIRS += $(LIBCOM)/env |
281 | +INC += envDefs.h |
282 | +SRCS += envSubr.c |
283 | +SRCS += envData.c |
284 | + |
285 | +SRC_DIRS += $(LIBCOM)/error |
286 | +INC += epicsPrint.h |
287 | +INC += errMdef.h |
288 | +INC += errSymTbl.h |
289 | +INC += errlog.h |
290 | +INC += error.h |
291 | +SRCS += errlog.c |
292 | +SRCS += errSymLib.c |
293 | +SRCS += errSymTbl.c |
294 | + |
295 | +SRC_DIRS += $(LIBCOM)/fdmgr |
296 | +INC += fdManager.h |
297 | +INC += fdmgr.h |
298 | +SRCS += fdmgr.cpp |
299 | +SRCS += fdManager.cpp |
300 | + |
301 | +SRC_DIRS += $(LIBCOM)/freeList |
302 | +INC += freeList.h |
303 | +SRCS += freeListLib.c |
304 | +HTMLS += freeList/freeList.html |
305 | + |
306 | +SRC_DIRS += $(LIBCOM)/gpHash |
307 | +INC += gpHash.h |
308 | +SRCS += gpHashLib.c |
309 | +HTMLS += gpHash/gpHash.html |
310 | + |
311 | +SRC_DIRS += $(LIBCOM)/iocsh |
312 | +INC += iocsh.h |
313 | +INC += registry.h |
314 | +INC += libComRegister.h |
315 | +SRCS += iocsh.cpp |
316 | +SRCS += registry.c |
317 | +SRCS += libComRegister.c |
318 | + |
319 | +SRC_DIRS += $(LIBCOM)/logClient |
320 | +INC += iocLog.h |
321 | +INC += logClient.h |
322 | +SRCS += iocLog.c |
323 | +SRCS += logClient.c |
324 | + |
325 | +SRC_DIRS += $(LIBCOM)/macLib |
326 | +INC += macLib.h |
327 | +SRCS += macCore.c |
328 | +SRCS += macEnv.c |
329 | +SRCS += macUtil.c |
330 | + |
331 | +SRC_DIRS += $(LIBCOM)/misc |
332 | +INC += adjustment.h |
333 | +INC += cantProceed.h |
334 | +INC += dbDefs.h |
335 | +INC += epicsConvert.h |
336 | +INC += epicsExit.h |
337 | +INC += epicsStdlib.h |
338 | +INC += epicsString.h |
339 | +INC += epicsTypes.h |
340 | +INC += shareLib.h |
341 | +INC += epicsExport.h |
342 | +INC += unixFileName.h |
343 | +INC += locationException.h |
344 | +INC += ipAddrToAsciiAsynchronous.h |
345 | +INC += epicsUnitTest.h |
346 | +INC += testMain.h |
347 | +SRCS += aToIPAddr.c |
348 | +SRCS += adjustment.c |
349 | +SRCS += cantProceed.c |
350 | +SRCS += epicsConvert.c |
351 | +SRCS += epicsExit.c |
352 | +SRCS += epicsStdlib.c |
353 | +SRCS += epicsString.c |
354 | +SRCS += truncateFile.c |
355 | +SRCS += ipAddrToAsciiAsynchronous.cpp |
356 | +SRCS += epicsUnitTest.c |
357 | + |
358 | +# From osi |
359 | +SRC_DIRS += $(LIBCOM)/osi |
360 | +INC += osiFileName.h |
361 | +INC += osiSock.h |
362 | +INC += osdSock.h |
363 | +INC += epicsInterrupt.h |
364 | +INC += osdInterrupt.h |
365 | + |
366 | +INC += epicsMutex.h |
367 | +INC += osdMutex.h |
368 | +INC += epicsEvent.h |
369 | +INC += osdEvent.h |
370 | +INC += epicsMath.h |
371 | +INC += osdMessageQueue.h |
372 | +INC += osdStrtod.h |
373 | + |
374 | +INC += epicsAssert.h |
375 | +INC += epicsFindSymbol.h |
376 | +INC += osiPoolStatus.h |
377 | +INC += osdPoolStatus.h |
378 | +INC += osdThread.h |
379 | + |
380 | +INC += epicsThread.h |
381 | +INC += epicsTime.h |
382 | +INC += epicsGeneralTime.h |
383 | +INC += osdTime.h |
384 | +INC += generalTimeSup.h |
385 | +INC += osiClockTime.h |
386 | +INC += epicsSignal.h |
387 | +INC += osiProcess.h |
388 | +INC += osiUnistd.h |
389 | +INC += osiWireFormat.h |
390 | +INC += osdWireFormat.h |
391 | +INC += osdWireConfig.h |
392 | +INC += epicsEndian.h |
393 | +INC += epicsReadline.h |
394 | +INC += epicsMessageQueue.h |
395 | +INC += epicsStdio.h |
396 | +INC += epicsStdioRedirect.h |
397 | +INC += epicsGetopt.h |
398 | + |
399 | +INC += devLib.h |
400 | +INC += devLibVME.h |
401 | +INC += devLibVMEImpl.h |
402 | +INC += osdVME.h |
403 | +INC += compilerDependencies.h |
404 | +INC += compilerSpecific.h |
405 | + |
406 | +SRCS += epicsThread.cpp |
407 | +SRCS += epicsMutex.cpp |
408 | +SRCS += epicsEvent.cpp |
409 | +SRCS += epicsTime.cpp |
410 | +SRCS += epicsMessageQueue.cpp |
411 | +SRCS += epicsMath.cpp |
412 | + |
413 | +SRCS += epicsGeneralTime.c |
414 | +SRCS += osiClockTime.c |
415 | + |
416 | +SRCS += osdSock.c |
417 | +SRCS += osdSockAddrReuse.cpp |
418 | +SRCS += osiSock.c |
419 | +SRCS += systemCallIntMech.cpp |
420 | +SRCS += epicsSocketConvertErrnoToString.cpp |
421 | +SRCS += osdAssert.c |
422 | +SRCS += osdFindSymbol.c |
423 | +SRCS += osdInterrupt.c |
424 | +SRCS += osdPoolStatus.c |
425 | +SRCS += osdSignal.cpp |
426 | +SRCS += osdEnv.c |
427 | +SRCS += epicsReadline.c |
428 | +SRCS += epicsTempFile.cpp |
429 | +SRCS += epicsStdio.c |
430 | +SRCS += osdStdio.c |
431 | + |
432 | +osdEnv_CFLAGS_WIN32= -U__STDC__ |
433 | + |
434 | +SRCS += osdThread.c |
435 | +SRCS += osdMutex.c |
436 | +SRCS += osdEvent.c |
437 | +SRCS += osdTime.cpp |
438 | +SRCS += osdProcess.c |
439 | +SRCS += osdNetIntf.c |
440 | +SRCS += osdMessageQueue.c |
441 | + |
442 | +SRCS += devLibVME.c |
443 | +SRCS += devLibVMEOSD.c |
444 | + |
445 | +SRC_DIRS += $(LIBCOM)/taskwd |
446 | +INC += taskwd.h |
447 | +SRCS += taskwd.c |
448 | + |
449 | +SRC_DIRS += $(LIBCOM)/timer |
450 | +INC += epicsTimer.h |
451 | +SRCS += epicsTimer.cpp |
452 | +SRCS += timer.cpp |
453 | +SRCS += timerQueue.cpp |
454 | +SRCS += timerQueueActive.cpp |
455 | +SRCS += timerQueueActiveMgr.cpp |
456 | +SRCS += timerQueuePassive.cpp |
457 | + |
458 | +#tsDefs contains R3.13 compatibility tsStamp code |
459 | +SRC_DIRS += $(LIBCOM)/tsDefs |
460 | +INC += tsDefs.h |
461 | +SRCS += tsDefs.c |
462 | + |
463 | +# Time providers, in osi |
464 | +SRCS_vxWorks += osiNTPTime.c |
465 | +SRCS_RTEMS += osiNTPTime.c |
466 | + |
467 | +# These files are in osi/os/vxWorks |
468 | +# Special reboot hook |
469 | +SRCS_vxWorks += atReboot.cpp |
470 | +# For old vxWorks applications |
471 | +INC_vxWorks += camacLib.h |
472 | +INC_vxWorks += epicsDynLink.h |
473 | +INC_vxWorks += module_types.h |
474 | +INC_vxWorks += task_params.h |
475 | +SRCS_vxWorks += epicsDynLink.c |
476 | +SRCS_vxWorks += veclist.c |
477 | +SRCS_vxWorks += logMsgToErrlog.cpp |
478 | + |
479 | +#This forces the vxWorks compatibility stuff to be loaded |
480 | +OBJS_vxWorks = vxComLibrary |
481 | + |
482 | +# These files are in osi/os/WIN32 |
483 | +SRCS_WIN32 += epicsGetopt.c |
484 | +SRCS_WIN32 += setThreadName.cpp |
485 | +#SRCS_WIN32 += dllmain.cpp |
486 | +SRCS_WIN32 += forceBadAllocException.cpp |
487 | + |
488 | +# Library to build: |
489 | +# lib$(LIBRARY).a or ..dll/..exp/..lib |
490 | +# |
491 | +>>>>>>> MERGE-SOURCE |
492 | LIBRARY=Com |
493 | |
494 | Com_SYS_LIBS_WIN32 = ws2_32 advapi32 user32 |
495 | |
496 | === renamed file 'src/libCom/misc/compilerDependencies.h' => 'src/libCom/misc/compilerDependencies.h.THIS' |
497 | === added directory 'src/libCom/osi/compiler' |
498 | === added directory 'src/libCom/osi/compiler/borland' |
499 | === added file 'src/libCom/osi/compiler/borland/compilerSpecific.h' |
500 | --- src/libCom/osi/compiler/borland/compilerSpecific.h 1970-01-01 00:00:00 +0000 |
501 | +++ src/libCom/osi/compiler/borland/compilerSpecific.h 2011-08-31 22:40:21 +0000 |
502 | @@ -0,0 +1,45 @@ |
503 | +/*************************************************************************\ |
504 | +* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne |
505 | +* National Laboratory. |
506 | +* Copyright (c) 2002 The Regents of the University of California, as |
507 | +* Operator of Los Alamos National Laboratory. |
508 | +* EPICS BASE is distributed subject to a Software License Agreement found |
509 | +* in file LICENSE that is included with this distribution. |
510 | +\*************************************************************************/ |
511 | + |
512 | +/* |
513 | + * Author: |
514 | + * Jeffrey O. Hill |
515 | + * johill@lanl.gov |
516 | + */ |
517 | + |
518 | +#ifndef compilerSpecific_h |
519 | +#define compilerSpecific_h |
520 | + |
521 | +#ifndef __BORLANDC__ |
522 | +# error compiler/borland/compilerSpecific.h is only for use with the Borland compiler |
523 | +#endif |
524 | + |
525 | +#ifdef __cplusplus |
526 | + |
527 | +/* |
528 | + * in general we dont like ifdefs but they do allow us to check the |
529 | + * compiler version and make the optimistic assumption that |
530 | + * standards incompliance issues will be fixed by future compiler |
531 | + * releases |
532 | + */ |
533 | + |
534 | +/* |
535 | + * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete |
536 | + * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification |
537 | + */ |
538 | +#if __BORLANDC__ >= 0x600 |
539 | +# define CXX_PLACEMENT_DELETE |
540 | +#endif |
541 | + |
542 | +#define CXX_THROW_SPECIFICATION |
543 | + |
544 | +#endif /* __cplusplus */ |
545 | + |
546 | + |
547 | +#endif /* ifndef compilerSpecific_h */ |
548 | |
549 | === added directory 'src/libCom/osi/compiler/clang' |
550 | === added file 'src/libCom/osi/compiler/clang/compilerSpecific.h' |
551 | --- src/libCom/osi/compiler/clang/compilerSpecific.h 1970-01-01 00:00:00 +0000 |
552 | +++ src/libCom/osi/compiler/clang/compilerSpecific.h 2011-08-31 22:40:21 +0000 |
553 | @@ -0,0 +1,49 @@ |
554 | +/*************************************************************************\ |
555 | +* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne |
556 | +* National Laboratory. |
557 | +* Copyright (c) 2002 The Regents of the University of California, as |
558 | +* Operator of Los Alamos National Laboratory. |
559 | +* EPICS BASE is distributed subject to a Software License Agreement found |
560 | +* in file LICENSE that is included with this distribution. |
561 | +\*************************************************************************/ |
562 | + |
563 | +/* |
564 | + * Author: |
565 | + * Jeffrey O. Hill |
566 | + * johill@lanl.gov |
567 | + */ |
568 | + |
569 | +#ifndef compilerSpecific_h |
570 | +#define compilerSpecific_h |
571 | + |
572 | +#ifndef __clang__ |
573 | +# error compiler/clang/compilerSpecific.h is only for use with the clang compiler |
574 | +#endif |
575 | + |
576 | +#ifdef __cplusplus |
577 | + |
578 | +/* |
579 | + * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete |
580 | + * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification |
581 | + */ |
582 | +#define CXX_PLACEMENT_DELETE |
583 | +#define CXX_THROW_SPECIFICATION |
584 | + |
585 | +#endif /* __cplusplus */ |
586 | + |
587 | +/* |
588 | + * __has_attribute() is not supported on all versions of clang yet |
589 | + */ |
590 | + |
591 | +/* |
592 | + * Enable format-string checking |
593 | + */ |
594 | +#define EPICS_PRINTF_STYLE(f,a) __attribute__((format(__printf__,f,a))) |
595 | + |
596 | +/* |
597 | + * Deprecation marker |
598 | + */ |
599 | +#define EPICS_DEPRECATED __attribute__((deprecated)) |
600 | + |
601 | + |
602 | +#endif /* ifndef compilerSpecific_h */ |
603 | |
604 | === added directory 'src/libCom/osi/compiler/default' |
605 | === added file 'src/libCom/osi/compiler/default/compilerSpecific.h' |
606 | --- src/libCom/osi/compiler/default/compilerSpecific.h 1970-01-01 00:00:00 +0000 |
607 | +++ src/libCom/osi/compiler/default/compilerSpecific.h 2011-08-31 22:40:21 +0000 |
608 | @@ -0,0 +1,33 @@ |
609 | +/*************************************************************************\ |
610 | +* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne |
611 | +* National Laboratory. |
612 | +* Copyright (c) 2002 The Regents of the University of California, as |
613 | +* Operator of Los Alamos National Laboratory. |
614 | +* EPICS BASE is distributed subject to a Software License Agreement found |
615 | +* in file LICENSE that is included with this distribution. |
616 | +\*************************************************************************/ |
617 | + |
618 | +/* |
619 | + * Author: |
620 | + * Jeffrey O. Hill |
621 | + * johill@lanl.gov |
622 | + */ |
623 | + |
624 | +#ifndef compilerSpecific_h |
625 | +#define compilerSpecific_h |
626 | + |
627 | +#ifdef __cplusplus |
628 | + |
629 | +/* |
630 | + * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete |
631 | + * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification |
632 | + * |
633 | + * (our default guess is that the compiler implements the C++ 97 standard) |
634 | + */ |
635 | +#define CXX_THROW_SPECIFICATION |
636 | +#define CXX_PLACEMENT_DELETE |
637 | + |
638 | +#endif /* __cplusplus */ |
639 | + |
640 | + |
641 | +#endif /* ifndef compilerSpecific_h */ |
642 | |
643 | === added directory 'src/libCom/osi/compiler/gcc' |
644 | === added file 'src/libCom/osi/compiler/gcc/compilerSpecific.h' |
645 | --- src/libCom/osi/compiler/gcc/compilerSpecific.h 1970-01-01 00:00:00 +0000 |
646 | +++ src/libCom/osi/compiler/gcc/compilerSpecific.h 2011-08-31 22:40:21 +0000 |
647 | @@ -0,0 +1,64 @@ |
648 | +/*************************************************************************\ |
649 | +* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne |
650 | +* National Laboratory. |
651 | +* Copyright (c) 2002 The Regents of the University of California, as |
652 | +* Operator of Los Alamos National Laboratory. |
653 | +* EPICS BASE is distributed subject to a Software License Agreement found |
654 | +* in file LICENSE that is included with this distribution. |
655 | +\*************************************************************************/ |
656 | + |
657 | +/* |
658 | + * Author: |
659 | + * Jeffrey O. Hill |
660 | + * johill@lanl.gov |
661 | + */ |
662 | + |
663 | +#ifndef compilerSpecific_h |
664 | +#define compilerSpecific_h |
665 | + |
666 | +#ifndef __GNUC__ |
667 | +# error compiler/gcc/compilerSpecific.h is only for use with the gnu compiler |
668 | +#endif |
669 | + |
670 | +#ifdef __clang__ |
671 | +# error compiler/gcc/compilerSpecific.h is not for use with the clang compiler |
672 | +#endif |
673 | + |
674 | +#ifdef __cplusplus |
675 | + |
676 | +/* |
677 | + * in general we dont like ifdefs but they do allow us to check the |
678 | + * compiler version and make the optimistic assumption that |
679 | + * standards incompliance issues will be fixed by future compiler |
680 | + * releases |
681 | + */ |
682 | + |
683 | +/* |
684 | + * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete |
685 | + * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification |
686 | + */ |
687 | + |
688 | +#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95 ) |
689 | +# define CXX_THROW_SPECIFICATION |
690 | +#endif |
691 | + |
692 | +#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 96 ) |
693 | +# define CXX_PLACEMENT_DELETE |
694 | +#endif |
695 | + |
696 | +#endif /* __cplusplus */ |
697 | + |
698 | +/* |
699 | + * Enable format-string checking if possible |
700 | + */ |
701 | +#define EPICS_PRINTF_STYLE(f,a) __attribute__((format(__printf__,f,a))) |
702 | + |
703 | +/* |
704 | + * Deprecation marker if possible |
705 | + */ |
706 | +#if (__GNUC__ > 2) |
707 | +# define EPICS_DEPRECATED __attribute__((deprecated)) |
708 | +#endif |
709 | + |
710 | + |
711 | +#endif /* ifndef compilerSpecific_h */ |
712 | |
713 | === added directory 'src/libCom/osi/compiler/msvc' |
714 | === added file 'src/libCom/osi/compiler/msvc/compilerSpecific.h' |
715 | --- src/libCom/osi/compiler/msvc/compilerSpecific.h 1970-01-01 00:00:00 +0000 |
716 | +++ src/libCom/osi/compiler/msvc/compilerSpecific.h 2011-08-31 22:40:21 +0000 |
717 | @@ -0,0 +1,47 @@ |
718 | +/*************************************************************************\ |
719 | +* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne |
720 | +* National Laboratory. |
721 | +* Copyright (c) 2002 The Regents of the University of California, as |
722 | +* Operator of Los Alamos National Laboratory. |
723 | +* EPICS BASE is distributed subject to a Software License Agreement found |
724 | +* in file LICENSE that is included with this distribution. |
725 | +\*************************************************************************/ |
726 | + |
727 | +/* |
728 | + * Author: |
729 | + * Jeffrey O. Hill |
730 | + * johill@lanl.gov |
731 | + */ |
732 | + |
733 | +#ifndef compilerSpecific_h |
734 | +#define compilerSpecific_h |
735 | + |
736 | +#ifndef _MSC_VER |
737 | +# error compiler/msvc/compilerSpecific.h is only for use with the Microsoft compiler |
738 | +#endif |
739 | + |
740 | +#ifdef __cplusplus |
741 | + |
742 | +/* |
743 | + * in general we dont like ifdefs but they do allow us to check the |
744 | + * compiler version and make the optimistic assumption that |
745 | + * standards incompliance issues will be fixed by future compiler |
746 | + * releases |
747 | + */ |
748 | + |
749 | +/* |
750 | + * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete |
751 | + * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification |
752 | + */ |
753 | +#if _MSC_VER >= 1200 /* visual studio 6.0 or later */ |
754 | +# define CXX_PLACEMENT_DELETE |
755 | +#endif |
756 | + |
757 | +#if _MSC_VER > 1300 /* some release after visual studio 7 we hope */ |
758 | +# define CXX_THROW_SPECIFICATION |
759 | +#endif |
760 | + |
761 | +#endif /* __cplusplus */ |
762 | + |
763 | + |
764 | +#endif /* ifndef compilerSpecific_h */ |
765 | |
766 | === added directory 'src/libCom/osi/compiler/solStudio' |
767 | === added file 'src/libCom/osi/compilerDependencies.h' |
768 | --- src/libCom/osi/compilerDependencies.h 1970-01-01 00:00:00 +0000 |
769 | +++ src/libCom/osi/compilerDependencies.h 2011-08-31 22:40:21 +0000 |
770 | @@ -0,0 +1,62 @@ |
771 | +/*************************************************************************\ |
772 | +* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne |
773 | +* National Laboratory. |
774 | +* Copyright (c) 2002 The Regents of the University of California, as |
775 | +* Operator of Los Alamos National Laboratory. |
776 | +* EPICS BASE is distributed subject to a Software License Agreement found |
777 | +* in file LICENSE that is included with this distribution. |
778 | +\*************************************************************************/ |
779 | + |
780 | +/* |
781 | + * Author: |
782 | + * Jeffrey O. Hill |
783 | + * johill@lanl.gov |
784 | + */ |
785 | + |
786 | +#ifndef compilerDependencies_h |
787 | +#define compilerDependencies_h |
788 | + |
789 | +#include "compilerSpecific.h" |
790 | + |
791 | +#ifdef __cplusplus |
792 | + |
793 | +/* |
794 | + * usage: void func () epicsThrows (( std::bad_alloc, std::logic_error )) |
795 | + * |
796 | + * Note: now a widely accepted concensus (ref Meyers and C++ faq) is that |
797 | + * one should avoid using throw specifications in C++ code |
798 | + */ |
799 | +#if defined ( CXX_THROW_SPECIFICATION ) |
800 | +# define epicsThrows(X) throw X |
801 | +#else |
802 | +# define epicsThrows(X) |
803 | +#endif |
804 | + |
805 | +/* |
806 | + * usage: epicsPlacementDeleteOperator (( void *, myMemoryManager & )) |
807 | + */ |
808 | +#if defined ( CXX_PLACEMENT_DELETE ) |
809 | +# define epicsPlacementDeleteOperator(X) void operator delete X; |
810 | +#else |
811 | +# define epicsPlacementDeleteOperator(X) |
812 | +#endif |
813 | + |
814 | +#endif /* __cplusplus */ |
815 | + |
816 | + |
817 | +#ifndef EPICS_PRINTF_STYLE |
818 | +/* |
819 | + * No format-string checking |
820 | + */ |
821 | +# define EPICS_PRINTF_STYLE(f,a) |
822 | +#endif |
823 | + |
824 | +#ifndef EPICS_DEPRECATED |
825 | +/* |
826 | + * No deprecation markers |
827 | + */ |
828 | +#define EPICS_DEPRECATED |
829 | +#endif |
830 | + |
831 | + |
832 | +#endif /* ifndef compilerDependencies_h */ |
This doesn't fully cover all our architectures yet.
Both darwin and linux can build Base using clang, but when I use clang on Linux with the gcc header it doesn't hit the #error in compiler/ gcc/compilerSpe cific.h since clang defines __GNUC__ anyway. There needs to be an easy way to make that switch (including setting CC and CCC) based on a single CONFIG_SITE setting.
Jeff: I'm happy to work on implementing these fixes back at ANL. Have you based your atomic branch on this one? I'd like to drop your 12229 merge commit, but that would probably mess you up if I did.
- Andrew