Merge lp:~epics-core/epics-base/3.15-buildCompilerSpecific into lp:~epics-core/epics-base/3.15

Proposed by Jeff Hill on 2011-08-19
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
Reviewer Review Type Date Requested Status
EPICS Core Developers 2011-08-19 Pending
Review via email: mp+72258@code.launchpad.net

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/osi/compiler. That should make it mush easier to port EPICS to run on a new compiler.

o I also re-factored compilerDependencies.h into code that is compiler specific (one libCom/osi/compiler/xxx/compilerDependent.h for each compiler) and code that isn't libCom/osi/compilerDependencies.h (this is a new location and is no longer in libCom/misc). I also merged recent change to R3.15 that prevents use of the gnu deprecated attribute if its early gcc.

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 compilerDependencies.h then its somewhat problematic to test the build system change in the branch.

To post a comment you must log in.
Andrew Johnson (anj) wrote :

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/compilerSpecific.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

12230. By Andrew Johnson on 2011-08-31

configure: Adjust instructions for switching to clang

12231. By Andrew Johnson on 2011-08-31

Move default macros to compilerDependencies.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/gcc/compilerSpecific.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.

I suspect that you now see that I did implement a clang specific compilerDependent.h.
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__((deprecated))
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
> compilerDependent.h. I did include a #warning in that file because I don't
> 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://trac.macports.org/wiki/UsingTheRightCompiler

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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure/CONFIG.gnuCommon'
--- configure/CONFIG.gnuCommon 2009-11-25 17:15:47 +0000
+++ configure/CONFIG.gnuCommon 2011-08-31 22:40:21 +0000
@@ -12,6 +12,8 @@
1212
13GNU = YES13GNU = YES
1414
15CMPLR_CLASS = gcc
16
15GNU_BIN = $(GNU_DIR)/bin17GNU_BIN = $(GNU_DIR)/bin
16GNU_LIB = $(GNU_DIR)/lib18GNU_LIB = $(GNU_DIR)/lib
1719
1820
=== modified file 'configure/CONFIG_COMMON'
--- configure/CONFIG_COMMON 2011-08-17 21:36:38 +0000
+++ configure/CONFIG_COMMON 2011-08-31 22:40:21 +0000
@@ -133,11 +133,14 @@
133GENERIC_SRC_DIRS = .. $(SRC_DIRS)133GENERIC_SRC_DIRS = .. $(SRC_DIRS)
134OS_SRC_DIRS += . $(foreach dir, .. $(SRC_DIRS), \134OS_SRC_DIRS += . $(foreach dir, .. $(SRC_DIRS), \
135 $(addprefix $(dir)/, os/$(OS_CLASS) $(POSIX_$(POSIX)) os/default ))135 $(addprefix $(dir)/, os/$(OS_CLASS) $(POSIX_$(POSIX)) os/default ))
136ALL_SRC_DIRS = $(OS_SRC_DIRS) $(GENERIC_SRC_DIRS)136CMPLR_SRC_DIRS += . $(foreach dir, .. $(SRC_DIRS), \
137 $(addprefix $(dir)/, compiler/$(CMPLR_CLASS) compiler/default ))
138ALL_SRC_DIRS = $(CMPLR_SRC_DIRS) $(OS_SRC_DIRS) $(GENERIC_SRC_DIRS)
137139
138#--------------------------------------------------140#--------------------------------------------------
139# compile line include directories141# compile line include directories
140INSTALL_INCLUDES += \142INSTALL_INCLUDES += \
143 -I$(INSTALL_INCLUDE)/compiler/$(CMPLR_CLASS) \
141 -I$(INSTALL_INCLUDE)/os/$(OS_CLASS) \144 -I$(INSTALL_INCLUDE)/os/$(OS_CLASS) \
142 -I$(INSTALL_INCLUDE)145 -I$(INSTALL_INCLUDE)
143SRC_INCLUDES = -I$(COMMON_DIR) $(addprefix -I, $(wildcard $(ALL_SRC_DIRS)))146SRC_INCLUDES = -I$(COMMON_DIR) $(addprefix -I, $(wildcard $(ALL_SRC_DIRS)))
@@ -379,25 +382,36 @@
379#382#
380# auto determine the directory paths that things are installed to383# auto determine the directory paths that things are installed to
381# RULES:384# RULES:
382# 1) found in any one of several os specific area385# 0) found in any one of several compiler specific paths
386# => install to $(INSTALL_INCLUDE)/compiler/$(CMPLR_CLASS)
387# 1) not found in (0) and found in any one of several OS specific paths
383# => install to $(INSTALL_INCLUDE)/os/$(OS_CLASS)388# => install to $(INSTALL_INCLUDE)/os/$(OS_CLASS)
384# 2) not foundin (1) and found in generic area389# 2) not found in (1) and found in generic paths
385# => install to $(INSTALL_INCLUDE)390# => install to $(INSTALL_INCLUDE)
386# 3) not found in (1) or (2) then may be (not yet) computer generated391# 3) not found in (1) or (2) then may be (not yet) computer generated
387# => install into $(INSTALL_INCLUDE)/os/$(OS_CLASS) and let392# => install into $(INSTALL_INCLUDE)/os/$(OS_CLASS) and let
388# build rules work on vpath393# build rules work on vpath
389#394#
390# These rules guarantee that the users include from395# These rules guarantee that the users include from
391# no more than two directories396# no more than three directories
392#397#
393INSTALL_INC += $(foreach inc, $(INC), \398INSTALL_INC += $(foreach inc, $(INC), \
394 $(firstword \399 $(firstword \
400 $(CMPLR_INSTALL_INC) \
395 $(OS_INSTALL_INC) \401 $(OS_INSTALL_INC) \
396 $(GENERIC_INSTALL_INC) \402 $(GENERIC_INSTALL_INC) \
397 $(GENERATED_INSTALL_INC) ) )403 $(GENERATED_INSTALL_INC) ) )
398INSTALL_INC += $(addprefix $(INSTALL_INCLUDE)/os/$(OS_CLASS)/, $(INC_$(OS_CLASS)) )404INSTALL_INC += $(addprefix $(INSTALL_INCLUDE)/os/$(OS_CLASS)/, $(INC_$(OS_CLASS)) )
399405
400#406#
407# Rule 0
408#
409CMPLR_INSTALL_INC = $(addprefix $(INSTALL_INCLUDE)/compiler/$(CMPLR_CLASS)/, $(INSTALL_INC_jjj) )
410INSTALL_INC_jjj = $(foreach dir, $(CMPLR_SRC_DIRS), $(INSTALL_INC_iii) )
411INSTALL_INC_iii = $(subst $(dir)/, , $(INSTALL_INC_hhh) )
412INSTALL_INC_hhh = $(wildcard $(addsuffix /$(inc), $(dir)) )
413
414#
401# Rule 1415# Rule 1
402#416#
403OS_INSTALL_INC = $(addprefix $(INSTALL_INCLUDE)/os/$(OS_CLASS)/, $(INSTALL_INC_ggg) )417OS_INSTALL_INC = $(addprefix $(INSTALL_INCLUDE)/os/$(OS_CLASS)/, $(INSTALL_INC_ggg) )
404418
=== modified file 'configure/RULES_BUILD'
--- configure/RULES_BUILD 2010-12-20 15:48:12 +0000
+++ configure/RULES_BUILD 2011-08-31 22:40:21 +0000
@@ -408,7 +408,11 @@
408 @$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)408 @$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
409409
410$(INSTALL_INCLUDE)/os/$(OS_CLASS)/% : %410$(INSTALL_INCLUDE)/os/$(OS_CLASS)/% : %
411 $(ECHO) "Installing os dependent include file $@"411 $(ECHO) "Installing OS dependent include file $@"
412 @$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
413
414$(INSTALL_INCLUDE)/compiler/$(CMPLR_CLASS)/% : %
415 $(ECHO) "Installing compiler dependent include file $@"
412 @$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)416 @$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
413417
414$(INSTALL_DOC)/%: %418$(INSTALL_DOC)/%: %
415419
=== modified file 'configure/os/CONFIG.solarisCommon.solarisCommon'
--- configure/os/CONFIG.solarisCommon.solarisCommon 2010-10-05 19:27:37 +0000
+++ configure/os/CONFIG.solarisCommon.solarisCommon 2011-08-31 22:40:21 +0000
@@ -7,6 +7,8 @@
7# Sites may override these definitions in CONFIG_SITE.solaris-sparc.solaris-sparc7# Sites may override these definitions in CONFIG_SITE.solaris-sparc.solaris-sparc
8#-------------------------------------------------------8#-------------------------------------------------------
99
10CMPLR_CLASS = solStudio
11
10SPARCWORKS = /opt/SUNWspro12SPARCWORKS = /opt/SUNWspro
11GNU = NO13GNU = NO
1214
1315
=== modified file 'configure/os/CONFIG.win32-x86-borland.win32-x86-borland'
--- configure/os/CONFIG.win32-x86-borland.win32-x86-borland 2011-02-16 16:57:20 +0000
+++ configure/os/CONFIG.win32-x86-borland.win32-x86-borland 2011-08-31 22:40:21 +0000
@@ -7,6 +7,8 @@
7# Sites may override these definitions in CONFIG_SITE.win32-x86-borland.win32-x86-borland7# Sites may override these definitions in CONFIG_SITE.win32-x86-borland.win32-x86-borland
8#-------------------------------------------------------8#-------------------------------------------------------
99
10CMPLR_CLASS = borland
11
10# Win32 valid build types and include directory suffixes12# Win32 valid build types and include directory suffixes
1113
12VALID_BUILDS = Host Ioc14VALID_BUILDS = Host Ioc
1315
=== modified file 'configure/os/CONFIG.win32-x86.win32-x86'
--- configure/os/CONFIG.win32-x86.win32-x86 2011-08-17 21:36:38 +0000
+++ configure/os/CONFIG.win32-x86.win32-x86 2011-08-31 22:40:21 +0000
@@ -11,6 +11,8 @@
1111
12VALID_BUILDS = Host Ioc12VALID_BUILDS = Host Ioc
1313
14CMPLR_CLASS = msvc
15
14# convert UNIX path to native path16# convert UNIX path to native path
15PATH_FILTER = $(subst /,\\,$(1))17PATH_FILTER = $(subst /,\\,$(1))
1618
1719
=== modified file 'configure/os/CONFIG_SITE.Common.darwin-x86'
--- configure/os/CONFIG_SITE.Common.darwin-x86 2011-08-17 21:36:38 +0000
+++ configure/os/CONFIG_SITE.Common.darwin-x86 2011-08-31 22:40:21 +0000
@@ -14,10 +14,16 @@
14#ARCH_CLASS = x86_6414#ARCH_CLASS = x86_64
15#ARCH_CLASS = i386 x86_6415#ARCH_CLASS = i386 x86_64
1616
17#
18# Uncomment the followings lines to build with CLANG instead of GCC.17# Uncomment the followings lines to build with CLANG instead of GCC.
19#18#
19<<<<<<< TREE
20#CC = clang20#CC = clang
21#CCC = clang++21#CCC = clang++
22#GNU_LDLIBS_YES =22#GNU_LDLIBS_YES =
2323
24=======
25#GNU = NO
26#CMPLR_CLASS = clang
27#CC = clang
28#CCC = clang++
29>>>>>>> MERGE-SOURCE
2430
=== modified file 'configure/os/CONFIG_SITE.Common.linux-x86'
--- configure/os/CONFIG_SITE.Common.linux-x86 2011-08-26 21:49:36 +0000
+++ configure/os/CONFIG_SITE.Common.linux-x86 2011-08-31 22:40:21 +0000
@@ -33,6 +33,7 @@
33#COMMANDLINE_LIBRARY = READLINE_CURSES33#COMMANDLINE_LIBRARY = READLINE_CURSES
3434
35OP_SYS_CFLAGS += -g35OP_SYS_CFLAGS += -g
36<<<<<<< TREE
3637
37# Some Linux distributions provide clang as an alternative to GCC.38# Some Linux distributions provide clang as an alternative to GCC.
38# To use clang if you have it, uncomment these three lines:39# To use clang if you have it, uncomment these three lines:
@@ -40,3 +41,12 @@
40#CCC = clang++41#CCC = clang++
41#GNU_LDLIBS_YES =42#GNU_LDLIBS_YES =
4243
44=======
45
46# Uncomment the followings lines to build with CLANG instead of GCC.
47#
48#GNU = NO
49#CMPLR_CLASS = clang
50#CC = clang
51#CCC = clang++
52>>>>>>> MERGE-SOURCE
4353
=== modified file 'configure/os/CONFIG_SITE.Common.linux-x86_64'
--- configure/os/CONFIG_SITE.Common.linux-x86_64 2011-08-26 21:49:36 +0000
+++ configure/os/CONFIG_SITE.Common.linux-x86_64 2011-08-31 22:40:21 +0000
@@ -33,6 +33,7 @@
33#COMMANDLINE_LIBRARY = READLINE_CURSES33#COMMANDLINE_LIBRARY = READLINE_CURSES
3434
35OP_SYS_CFLAGS += -g35OP_SYS_CFLAGS += -g
36<<<<<<< TREE
3637
37# Some Linux distributions provide clang as an alternative to GCC.38# Some Linux distributions provide clang as an alternative to GCC.
38# To use clang if you have it, uncomment these three lines:39# To use clang if you have it, uncomment these three lines:
@@ -40,3 +41,12 @@
40#CCC = clang++41#CCC = clang++
41#GNU_LDLIBS_YES =42#GNU_LDLIBS_YES =
4243
44=======
45
46# Uncomment the followings lines to build with CLANG instead of GCC.
47#
48#GNU = NO
49#CMPLR_CLASS = clang
50#CC = clang
51#CCC = clang++
52>>>>>>> MERGE-SOURCE
4353
=== modified file 'src/libCom/Makefile'
--- src/libCom/Makefile 2011-08-23 22:28:20 +0000
+++ src/libCom/Makefile 2011-08-31 22:40:21 +0000
@@ -9,6 +9,7 @@
9TOP = ../..9TOP = ../..
10include $(TOP)/configure/CONFIG10include $(TOP)/configure/CONFIG
1111
12<<<<<<< TREE
12SRC = $(TOP)/src13SRC = $(TOP)/src
13LIBCOM = $(SRC)/libCom14LIBCOM = $(SRC)/libCom
1415
@@ -38,6 +39,281 @@
38include $(LIBCOM)/yacc/Makefile39include $(LIBCOM)/yacc/Makefile
3940
40# Library to build:41# Library to build:
42=======
43LIBCOM = $(TOP)/src/libCom
44
45# Command-line input support
46epicsReadline_CFLAGS += -DEPICS_COMMANDLINE_LIBRARY=EPICS_COMMANDLINE_LIBRARY_$(COMMANDLINE_LIBRARY)
47epicsReadline_INCLUDES += $(INCLUDES_$(COMMANDLINE_LIBRARY))
48
49#POSIX thread priority scheduling flag
50THREAD_CPPFLAGS_NO += -DDONT_USE_POSIX_THREAD_PRIORITY_SCHEDULING
51osdThread_CPPFLAGS += $(THREAD_CPPFLAGS_$(USE_POSIX_THREAD_PRIORITY_SCHEDULING))
52
53#epicsVersion is created by this Makefile
54INC += epicsVersion.h
55
56SRC_DIRS += $(LIBCOM)/bucketLib
57INC += bucketLib.h
58SRCS += bucketLib.c
59
60SRC_DIRS += $(LIBCOM)/ring
61#following needed for locating epicsRingPointer.h and epicsRingBytes.h
62INC += epicsRingPointer.h
63INC += epicsRingBytes.h
64SRCS += epicsRingPointer.cpp
65SRCS += epicsRingBytes.c
66
67SRC_DIRS += $(LIBCOM)/calc
68INC += postfix.h
69SRCS += postfix.c
70SRCS += calcPerform.c
71
72SRC_DIRS += $(LIBCOM)/cvtFast
73INC += cvtFast.h
74SRCS += cvtFast.c
75
76# From cppStd
77SRC_DIRS += $(LIBCOM)/cppStd
78INC += epicsAlgorithm.h
79INC += epicsExcept.h
80INC += epicsMemory.h
81
82# From cxxTemplates
83SRC_DIRS += $(LIBCOM)/cxxTemplates
84INC += resourceLib.h
85INC += tsDLList.h
86INC += tsSLList.h
87INC += tsMinMax.h
88INC += tsBTree.h
89INC += tsFreeList.h
90INC += epicsSingleton.h
91INC += epicsGuard.h
92INC += epicsOnce.h
93SRCS += resourceLib.cpp
94SRCS += epicsOnce.cpp
95SRCS += epicsSingletonMutex.cpp
96
97SRC_DIRS += $(LIBCOM)/dbmf
98INC += dbmf.h
99SRCS += dbmf.c
100
101SRC_DIRS += $(LIBCOM)/ellLib
102INC += ellLib.h
103SRCS += ellLib.c
104
105SRC_DIRS += $(LIBCOM)/env
106INC += envDefs.h
107SRCS += envSubr.c
108SRCS += envData.c
109
110SRC_DIRS += $(LIBCOM)/error
111INC += epicsPrint.h
112INC += errMdef.h
113INC += errSymTbl.h
114INC += errlog.h
115INC += error.h
116SRCS += errlog.c
117SRCS += errSymLib.c
118SRCS += errSymTbl.c
119
120SRC_DIRS += $(LIBCOM)/fdmgr
121INC += fdManager.h
122INC += fdmgr.h
123SRCS += fdmgr.cpp
124SRCS += fdManager.cpp
125
126SRC_DIRS += $(LIBCOM)/freeList
127INC += freeList.h
128SRCS += freeListLib.c
129HTMLS += freeList/freeList.html
130
131SRC_DIRS += $(LIBCOM)/gpHash
132INC += gpHash.h
133SRCS += gpHashLib.c
134HTMLS += gpHash/gpHash.html
135
136SRC_DIRS += $(LIBCOM)/iocsh
137INC += iocsh.h
138INC += registry.h
139INC += libComRegister.h
140SRCS += iocsh.cpp
141SRCS += registry.c
142SRCS += libComRegister.c
143
144SRC_DIRS += $(LIBCOM)/logClient
145INC += iocLog.h
146INC += logClient.h
147SRCS += iocLog.c
148SRCS += logClient.c
149
150SRC_DIRS += $(LIBCOM)/macLib
151INC += macLib.h
152SRCS += macCore.c
153SRCS += macEnv.c
154SRCS += macUtil.c
155
156SRC_DIRS += $(LIBCOM)/misc
157INC += adjustment.h
158INC += cantProceed.h
159INC += dbDefs.h
160INC += epicsConvert.h
161INC += epicsExit.h
162INC += epicsStdlib.h
163INC += epicsString.h
164INC += epicsTypes.h
165INC += shareLib.h
166INC += epicsExport.h
167INC += unixFileName.h
168INC += locationException.h
169INC += ipAddrToAsciiAsynchronous.h
170INC += epicsUnitTest.h
171INC += testMain.h
172SRCS += aToIPAddr.c
173SRCS += adjustment.c
174SRCS += cantProceed.c
175SRCS += epicsConvert.c
176SRCS += epicsExit.c
177SRCS += epicsStdlib.c
178SRCS += epicsString.c
179SRCS += truncateFile.c
180SRCS += ipAddrToAsciiAsynchronous.cpp
181SRCS += epicsUnitTest.c
182
183# From osi
184SRC_DIRS += $(LIBCOM)/osi
185INC += osiFileName.h
186INC += osiSock.h
187INC += osdSock.h
188INC += epicsInterrupt.h
189INC += osdInterrupt.h
190
191INC += epicsMutex.h
192INC += osdMutex.h
193INC += epicsEvent.h
194INC += osdEvent.h
195INC += epicsMath.h
196INC += osdMessageQueue.h
197INC += osdStrtod.h
198
199INC += epicsAssert.h
200INC += epicsFindSymbol.h
201INC += osiPoolStatus.h
202INC += osdPoolStatus.h
203INC += osdThread.h
204
205INC += epicsThread.h
206INC += epicsTime.h
207INC += epicsGeneralTime.h
208INC += osdTime.h
209INC += generalTimeSup.h
210INC += osiClockTime.h
211INC += epicsSignal.h
212INC += osiProcess.h
213INC += osiUnistd.h
214INC += osiWireFormat.h
215INC += osdWireFormat.h
216INC += osdWireConfig.h
217INC += epicsEndian.h
218INC += epicsReadline.h
219INC += epicsMessageQueue.h
220INC += epicsStdio.h
221INC += epicsStdioRedirect.h
222INC += epicsGetopt.h
223
224INC += devLib.h
225INC += devLibVME.h
226INC += devLibVMEImpl.h
227INC += osdVME.h
228INC += compilerDependencies.h
229INC += compilerSpecific.h
230
231SRCS += epicsThread.cpp
232SRCS += epicsMutex.cpp
233SRCS += epicsEvent.cpp
234SRCS += epicsTime.cpp
235SRCS += epicsMessageQueue.cpp
236SRCS += epicsMath.cpp
237
238SRCS += epicsGeneralTime.c
239SRCS += osiClockTime.c
240
241SRCS += osdSock.c
242SRCS += osdSockAddrReuse.cpp
243SRCS += osiSock.c
244SRCS += systemCallIntMech.cpp
245SRCS += epicsSocketConvertErrnoToString.cpp
246SRCS += osdAssert.c
247SRCS += osdFindSymbol.c
248SRCS += osdInterrupt.c
249SRCS += osdPoolStatus.c
250SRCS += osdSignal.cpp
251SRCS += osdEnv.c
252SRCS += epicsReadline.c
253SRCS += epicsTempFile.cpp
254SRCS += epicsStdio.c
255SRCS += osdStdio.c
256
257osdEnv_CFLAGS_WIN32= -U__STDC__
258
259SRCS += osdThread.c
260SRCS += osdMutex.c
261SRCS += osdEvent.c
262SRCS += osdTime.cpp
263SRCS += osdProcess.c
264SRCS += osdNetIntf.c
265SRCS += osdMessageQueue.c
266
267SRCS += devLibVME.c
268SRCS += devLibVMEOSD.c
269
270SRC_DIRS += $(LIBCOM)/taskwd
271INC += taskwd.h
272SRCS += taskwd.c
273
274SRC_DIRS += $(LIBCOM)/timer
275INC += epicsTimer.h
276SRCS += epicsTimer.cpp
277SRCS += timer.cpp
278SRCS += timerQueue.cpp
279SRCS += timerQueueActive.cpp
280SRCS += timerQueueActiveMgr.cpp
281SRCS += timerQueuePassive.cpp
282
283#tsDefs contains R3.13 compatibility tsStamp code
284SRC_DIRS += $(LIBCOM)/tsDefs
285INC += tsDefs.h
286SRCS += tsDefs.c
287
288# Time providers, in osi
289SRCS_vxWorks += osiNTPTime.c
290SRCS_RTEMS += osiNTPTime.c
291
292# These files are in osi/os/vxWorks
293# Special reboot hook
294SRCS_vxWorks += atReboot.cpp
295# For old vxWorks applications
296INC_vxWorks += camacLib.h
297INC_vxWorks += epicsDynLink.h
298INC_vxWorks += module_types.h
299INC_vxWorks += task_params.h
300SRCS_vxWorks += epicsDynLink.c
301SRCS_vxWorks += veclist.c
302SRCS_vxWorks += logMsgToErrlog.cpp
303
304#This forces the vxWorks compatibility stuff to be loaded
305OBJS_vxWorks = vxComLibrary
306
307# These files are in osi/os/WIN32
308SRCS_WIN32 += epicsGetopt.c
309SRCS_WIN32 += setThreadName.cpp
310#SRCS_WIN32 += dllmain.cpp
311SRCS_WIN32 += forceBadAllocException.cpp
312
313# Library to build:
314# lib$(LIBRARY).a or ..dll/..exp/..lib
315#
316>>>>>>> MERGE-SOURCE
41LIBRARY=Com317LIBRARY=Com
42318
43Com_SYS_LIBS_WIN32 = ws2_32 advapi32 user32319Com_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
44320
=== renamed file 'src/libCom/misc/compilerDependencies.h' => 'src/libCom/misc/compilerDependencies.h.THIS'
=== added directory 'src/libCom/osi/compiler'
=== added directory 'src/libCom/osi/compiler/borland'
=== added file 'src/libCom/osi/compiler/borland/compilerSpecific.h'
--- src/libCom/osi/compiler/borland/compilerSpecific.h 1970-01-01 00:00:00 +0000
+++ src/libCom/osi/compiler/borland/compilerSpecific.h 2011-08-31 22:40:21 +0000
@@ -0,0 +1,45 @@
1/*************************************************************************\
2* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
3* National Laboratory.
4* Copyright (c) 2002 The Regents of the University of California, as
5* Operator of Los Alamos National Laboratory.
6* EPICS BASE is distributed subject to a Software License Agreement found
7* in file LICENSE that is included with this distribution.
8\*************************************************************************/
9
10/*
11 * Author:
12 * Jeffrey O. Hill
13 * johill@lanl.gov
14 */
15
16#ifndef compilerSpecific_h
17#define compilerSpecific_h
18
19#ifndef __BORLANDC__
20# error compiler/borland/compilerSpecific.h is only for use with the Borland compiler
21#endif
22
23#ifdef __cplusplus
24
25/*
26 * in general we dont like ifdefs but they do allow us to check the
27 * compiler version and make the optimistic assumption that
28 * standards incompliance issues will be fixed by future compiler
29 * releases
30 */
31
32/*
33 * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
34 * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification
35 */
36#if __BORLANDC__ >= 0x600
37# define CXX_PLACEMENT_DELETE
38#endif
39
40#define CXX_THROW_SPECIFICATION
41
42#endif /* __cplusplus */
43
44
45#endif /* ifndef compilerSpecific_h */
046
=== added directory 'src/libCom/osi/compiler/clang'
=== added file 'src/libCom/osi/compiler/clang/compilerSpecific.h'
--- src/libCom/osi/compiler/clang/compilerSpecific.h 1970-01-01 00:00:00 +0000
+++ src/libCom/osi/compiler/clang/compilerSpecific.h 2011-08-31 22:40:21 +0000
@@ -0,0 +1,49 @@
1/*************************************************************************\
2* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
3* National Laboratory.
4* Copyright (c) 2002 The Regents of the University of California, as
5* Operator of Los Alamos National Laboratory.
6* EPICS BASE is distributed subject to a Software License Agreement found
7* in file LICENSE that is included with this distribution.
8\*************************************************************************/
9
10/*
11 * Author:
12 * Jeffrey O. Hill
13 * johill@lanl.gov
14 */
15
16#ifndef compilerSpecific_h
17#define compilerSpecific_h
18
19#ifndef __clang__
20# error compiler/clang/compilerSpecific.h is only for use with the clang compiler
21#endif
22
23#ifdef __cplusplus
24
25/*
26 * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
27 * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification
28 */
29#define CXX_PLACEMENT_DELETE
30#define CXX_THROW_SPECIFICATION
31
32#endif /* __cplusplus */
33
34/*
35 * __has_attribute() is not supported on all versions of clang yet
36 */
37
38/*
39 * Enable format-string checking
40 */
41#define EPICS_PRINTF_STYLE(f,a) __attribute__((format(__printf__,f,a)))
42
43/*
44 * Deprecation marker
45 */
46#define EPICS_DEPRECATED __attribute__((deprecated))
47
48
49#endif /* ifndef compilerSpecific_h */
050
=== added directory 'src/libCom/osi/compiler/default'
=== added file 'src/libCom/osi/compiler/default/compilerSpecific.h'
--- src/libCom/osi/compiler/default/compilerSpecific.h 1970-01-01 00:00:00 +0000
+++ src/libCom/osi/compiler/default/compilerSpecific.h 2011-08-31 22:40:21 +0000
@@ -0,0 +1,33 @@
1/*************************************************************************\
2* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
3* National Laboratory.
4* Copyright (c) 2002 The Regents of the University of California, as
5* Operator of Los Alamos National Laboratory.
6* EPICS BASE is distributed subject to a Software License Agreement found
7* in file LICENSE that is included with this distribution.
8\*************************************************************************/
9
10/*
11 * Author:
12 * Jeffrey O. Hill
13 * johill@lanl.gov
14 */
15
16#ifndef compilerSpecific_h
17#define compilerSpecific_h
18
19#ifdef __cplusplus
20
21/*
22 * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
23 * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification
24 *
25 * (our default guess is that the compiler implements the C++ 97 standard)
26 */
27#define CXX_THROW_SPECIFICATION
28#define CXX_PLACEMENT_DELETE
29
30#endif /* __cplusplus */
31
32
33#endif /* ifndef compilerSpecific_h */
034
=== added directory 'src/libCom/osi/compiler/gcc'
=== added file 'src/libCom/osi/compiler/gcc/compilerSpecific.h'
--- src/libCom/osi/compiler/gcc/compilerSpecific.h 1970-01-01 00:00:00 +0000
+++ src/libCom/osi/compiler/gcc/compilerSpecific.h 2011-08-31 22:40:21 +0000
@@ -0,0 +1,64 @@
1/*************************************************************************\
2* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
3* National Laboratory.
4* Copyright (c) 2002 The Regents of the University of California, as
5* Operator of Los Alamos National Laboratory.
6* EPICS BASE is distributed subject to a Software License Agreement found
7* in file LICENSE that is included with this distribution.
8\*************************************************************************/
9
10/*
11 * Author:
12 * Jeffrey O. Hill
13 * johill@lanl.gov
14 */
15
16#ifndef compilerSpecific_h
17#define compilerSpecific_h
18
19#ifndef __GNUC__
20# error compiler/gcc/compilerSpecific.h is only for use with the gnu compiler
21#endif
22
23#ifdef __clang__
24# error compiler/gcc/compilerSpecific.h is not for use with the clang compiler
25#endif
26
27#ifdef __cplusplus
28
29/*
30 * in general we dont like ifdefs but they do allow us to check the
31 * compiler version and make the optimistic assumption that
32 * standards incompliance issues will be fixed by future compiler
33 * releases
34 */
35
36/*
37 * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
38 * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification
39 */
40
41#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95 )
42# define CXX_THROW_SPECIFICATION
43#endif
44
45#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 96 )
46# define CXX_PLACEMENT_DELETE
47#endif
48
49#endif /* __cplusplus */
50
51/*
52 * Enable format-string checking if possible
53 */
54#define EPICS_PRINTF_STYLE(f,a) __attribute__((format(__printf__,f,a)))
55
56/*
57 * Deprecation marker if possible
58 */
59#if (__GNUC__ > 2)
60# define EPICS_DEPRECATED __attribute__((deprecated))
61#endif
62
63
64#endif /* ifndef compilerSpecific_h */
065
=== added directory 'src/libCom/osi/compiler/msvc'
=== added file 'src/libCom/osi/compiler/msvc/compilerSpecific.h'
--- src/libCom/osi/compiler/msvc/compilerSpecific.h 1970-01-01 00:00:00 +0000
+++ src/libCom/osi/compiler/msvc/compilerSpecific.h 2011-08-31 22:40:21 +0000
@@ -0,0 +1,47 @@
1/*************************************************************************\
2* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
3* National Laboratory.
4* Copyright (c) 2002 The Regents of the University of California, as
5* Operator of Los Alamos National Laboratory.
6* EPICS BASE is distributed subject to a Software License Agreement found
7* in file LICENSE that is included with this distribution.
8\*************************************************************************/
9
10/*
11 * Author:
12 * Jeffrey O. Hill
13 * johill@lanl.gov
14 */
15
16#ifndef compilerSpecific_h
17#define compilerSpecific_h
18
19#ifndef _MSC_VER
20# error compiler/msvc/compilerSpecific.h is only for use with the Microsoft compiler
21#endif
22
23#ifdef __cplusplus
24
25/*
26 * in general we dont like ifdefs but they do allow us to check the
27 * compiler version and make the optimistic assumption that
28 * standards incompliance issues will be fixed by future compiler
29 * releases
30 */
31
32/*
33 * CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
34 * CXX_THROW_SPECIFICATION - defined if compiler supports throw specification
35 */
36#if _MSC_VER >= 1200 /* visual studio 6.0 or later */
37# define CXX_PLACEMENT_DELETE
38#endif
39
40#if _MSC_VER > 1300 /* some release after visual studio 7 we hope */
41# define CXX_THROW_SPECIFICATION
42#endif
43
44#endif /* __cplusplus */
45
46
47#endif /* ifndef compilerSpecific_h */
048
=== added directory 'src/libCom/osi/compiler/solStudio'
=== added file 'src/libCom/osi/compilerDependencies.h'
--- src/libCom/osi/compilerDependencies.h 1970-01-01 00:00:00 +0000
+++ src/libCom/osi/compilerDependencies.h 2011-08-31 22:40:21 +0000
@@ -0,0 +1,62 @@
1/*************************************************************************\
2* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
3* National Laboratory.
4* Copyright (c) 2002 The Regents of the University of California, as
5* Operator of Los Alamos National Laboratory.
6* EPICS BASE is distributed subject to a Software License Agreement found
7* in file LICENSE that is included with this distribution.
8\*************************************************************************/
9
10/*
11 * Author:
12 * Jeffrey O. Hill
13 * johill@lanl.gov
14 */
15
16#ifndef compilerDependencies_h
17#define compilerDependencies_h
18
19#include "compilerSpecific.h"
20
21#ifdef __cplusplus
22
23/*
24 * usage: void func () epicsThrows (( std::bad_alloc, std::logic_error ))
25 *
26 * Note: now a widely accepted concensus (ref Meyers and C++ faq) is that
27 * one should avoid using throw specifications in C++ code
28 */
29#if defined ( CXX_THROW_SPECIFICATION )
30# define epicsThrows(X) throw X
31#else
32# define epicsThrows(X)
33#endif
34
35/*
36 * usage: epicsPlacementDeleteOperator (( void *, myMemoryManager & ))
37 */
38#if defined ( CXX_PLACEMENT_DELETE )
39# define epicsPlacementDeleteOperator(X) void operator delete X;
40#else
41# define epicsPlacementDeleteOperator(X)
42#endif
43
44#endif /* __cplusplus */
45
46
47#ifndef EPICS_PRINTF_STYLE
48/*
49 * No format-string checking
50 */
51# define EPICS_PRINTF_STYLE(f,a)
52#endif
53
54#ifndef EPICS_DEPRECATED
55/*
56 * No deprecation markers
57 */
58#define EPICS_DEPRECATED
59#endif
60
61
62#endif /* ifndef compilerDependencies_h */

Subscribers

People subscribed via source and target branches

to all changes: