Compare commits
275 Commits
R7.0.8
...
PSI-7.0.7.
| Author | SHA1 | Date | |
|---|---|---|---|
| e2bb42d8d3 | |||
| abcada0d85 | |||
| 2c35d60a64 | |||
| af1b77eb0f | |||
| 93947eb027 | |||
| 961671259f | |||
|
|
db2482117d | ||
| a66caa5985 | |||
| 4803aae904 | |||
| 427be18e2e | |||
| fff690a449 | |||
| 428b836500 | |||
| 6c74507b11 | |||
| 122ca4e1d3 | |||
|
|
ba1bf00ce7 | ||
|
|
68fea5c2ca | ||
|
|
3f03efe7fe | ||
|
|
98dc97022a | ||
|
|
5d01b637a7 | ||
|
|
69a184ee1d | ||
|
|
aebacff3db | ||
|
|
27ad623d68 | ||
|
|
1b23701946 | ||
|
|
0502fe25e4 | ||
|
|
77a37781af | ||
|
|
ba21e655df | ||
|
|
2e727a0262 | ||
|
|
f4cb31d5d5 | ||
|
|
ab4e687816 | ||
|
|
1d1926eaf3 | ||
|
|
d31ba6ade3 | ||
| 609147dad0 | |||
|
|
5a5535aa5b | ||
|
|
de61390049 | ||
|
|
304d8217d9 | ||
|
|
2c95dc91e9 | ||
|
|
8cc15c6e68 | ||
|
|
680e1734a4 | ||
| 4aea7de032 | |||
|
|
bddbc38e0b | ||
|
|
67e669c5e5 | ||
|
|
e291ca0a03 | ||
|
|
5b84a86ccd | ||
|
|
cb6442da71 | ||
|
|
49b9573f3a | ||
|
|
42dfca2b54 | ||
|
|
3fd79a21a2 | ||
|
|
12f311b780 | ||
|
|
8abc9f8d03 | ||
|
|
ae6f01b8ee | ||
| 1d3a2defa2 | |||
| 43f6fd5060 | |||
|
|
c8d596034a | ||
|
|
1d3459982c | ||
|
|
9934242ccf | ||
|
|
e6dab90bf4 | ||
|
|
c680b9bebd | ||
|
|
9555ca05b8 | ||
|
|
0cd56fa40b | ||
|
|
485ac85fa5 | ||
| 1148931226 | |||
| 73f80cced9 | |||
| 152c72bab0 | |||
| 0f086126b7 | |||
| 5b058d7d27 | |||
| 28d33d43ec | |||
| b72fcff44d | |||
| d3dc2afd8d | |||
| e9237ef4e8 | |||
| c578148e36 | |||
| 92a461fbd9 | |||
| d5988446c6 | |||
| 26e1e94b90 | |||
| 64f67d036b | |||
| e33728362d | |||
| 23511c4a53 | |||
| 5db310813f | |||
| 6ec0c3b844 | |||
| 8bad990471 | |||
| cb4cb6f4d7 | |||
| 33ecfcb6bc | |||
| 565ccae0b5 | |||
| ddfa24e15d | |||
| 6dc7224cea | |||
| 25a2258663 | |||
|
|
13bd6bac5f | ||
| 39de02f350 | |||
| efd9e7908a | |||
| 96fe9306c7 | |||
| 0caa5a045c | |||
| 4ffa5c8c88 | |||
| 5e076e6d30 | |||
| dcb2c5affd | |||
| 3ac3906fea | |||
| 2d597a68b9 | |||
| 1bfe3dec3c | |||
| ea0b05c32b | |||
| 9c64469f1e | |||
| 2a4ebdf347 | |||
| d5756faef4 | |||
| 77fb5cf425 | |||
| 46141e98d5 | |||
| 5ac51f86ad | |||
| 0af4fce080 | |||
| 4fb42763a2 | |||
| 211d29c0e1 | |||
| da7bca9c16 | |||
| ec346a7b8d | |||
| 81d1082bfd | |||
| 3f8cee7d73 | |||
| aae9d68818 | |||
| f43d21eab3 | |||
| 9e1e4ddd91 | |||
| 8d1cd837d1 | |||
| dc277d1d99 | |||
|
|
b7ad6d906a | ||
|
|
3cfc16f5ff | ||
|
|
05bf567f3b | ||
|
|
ff1b9d4250 | ||
|
|
9b9de013db | ||
|
|
c546f6da23 | ||
| 8a08974f15 | |||
| 04d23354b9 | |||
| ddad6e7b6f | |||
| 9a17604e70 | |||
| c7e3359f08 | |||
| 16d068353a | |||
| f7b4c91163 | |||
| 55536a13db | |||
| 66abb7116f | |||
| bb89d5d24e | |||
| ad7a2ddf65 | |||
| 19031a7d11 | |||
| 1c9887bd45 | |||
| 209b979e56 | |||
| 34ce5c1d21 | |||
| 605aff2461 | |||
| ba1c40df7c | |||
| e25dafa9ca | |||
| ce78836328 | |||
| 8225c313b9 | |||
| be78b33570 | |||
| 9926fe3036 | |||
|
|
718390cfba | ||
|
|
6f864fc10e | ||
|
|
4b6cb2bcdd | ||
|
|
c866609f24 | ||
|
|
ee193edd42 | ||
|
|
40c55d65b3 | ||
|
|
a83b3a5331 | ||
|
|
65098a4120 | ||
|
|
0650fba936 | ||
|
|
16244acd3c | ||
|
|
fe52b0aa1a | ||
|
|
2af0fe894e | ||
|
|
387481799b | ||
|
|
d606155f17 | ||
|
|
c4d639e72a | ||
|
|
19d10b3161 | ||
|
|
220e2f9b12 | ||
|
|
3661874c92 | ||
|
|
a9a3ce535c | ||
|
|
6a81b2c6a0 | ||
|
|
139fac2928 | ||
| dcc6a36bf7 | |||
| 3b7fd004b8 | |||
| 2796764905 | |||
| 4c27619ee9 | |||
| a40737c06b | |||
| 34aebf7eea | |||
| da350d0d54 | |||
| 243807cbe5 | |||
| b3c18ebc4e | |||
| f25f067e9c | |||
| 74d269304c | |||
| c949cb5c8c | |||
| 2495919611 | |||
| 7ed4f6c704 | |||
| eb828f3807 | |||
| a98708302b | |||
| 0dae3e206f | |||
| 505e6f45c1 | |||
| 424de7d9c4 | |||
| 1a0de528e1 | |||
| d795dd76a6 | |||
|
|
45924d28e0 | ||
|
|
b1d0a0d036 | ||
|
|
45e9cf9a94 | ||
|
|
a8dcff2f0d | ||
| 53a7d25923 | |||
|
|
c701e7e98e | ||
|
|
bf8e097756 | ||
|
|
837a2bbdde | ||
|
|
6fb361a965 | ||
| 1db2cba81d | |||
| ce43a67cbd | |||
| 7ac8f056ed | |||
| d157e96aac | |||
| 1d1e3e9527 | |||
| 48d37e6b45 | |||
| 5d03f20831 | |||
| 9e72edb544 | |||
| 4476c71f62 | |||
| e9471b3072 | |||
| 4082cb27c3 | |||
| 88cdffddb6 | |||
| b27d1416b5 | |||
| ab97b5fe54 | |||
| bbaa207603 | |||
|
|
605937bbac | ||
|
|
594fcb9a0d | ||
|
|
e033c0cfb2 | ||
|
|
53ebbab941 | ||
| 86adc529ef | |||
| 3a774d37f8 | |||
| 5f6b1e2b16 | |||
| 584caf54b2 | |||
| d602c1cdcb | |||
| 12ce14b6e5 | |||
| e02709b3a4 | |||
| b19709039d | |||
| 3c4ffbf267 | |||
| 4942da0c88 | |||
| 5f547257ac | |||
| 1b99366887 | |||
| 871af36ac5 | |||
| 0ad6d2aec9 | |||
| 8837d2f275 | |||
| 09a17127a9 | |||
| 3699c5bc4c | |||
| 157b0867fa | |||
| 56529964f3 | |||
| c28e240fce | |||
| b04b2dab22 | |||
| 8edcd7b07f | |||
| ca78451122 | |||
| 4cc44e3dce | |||
| e81d3a1d7d | |||
| 53dd61b80a | |||
| 5b754d320f | |||
| 2be2658cfc | |||
| 2b157096e6 | |||
| 71eaddfd84 | |||
| 5589deb3ad | |||
| 0bb80e373b | |||
| 4acdd83984 | |||
| d12d38f970 | |||
| 74d9749255 | |||
| 3276ada78a | |||
| de378eec34 | |||
| dbb2d875fb | |||
| c7f966a1f5 | |||
| 7889dda6f8 | |||
| a2ccf3b631 | |||
| 57db34b303 | |||
| 4f790758af | |||
| ce9dfc6bb4 | |||
| 4f40ad1927 | |||
| a42a4010d6 | |||
| a2aa17fafc | |||
| 5bf2784db2 | |||
| 7a4e7b7600 | |||
| 70aa23513f | |||
| 71ded2f25f | |||
| 11103351b2 | |||
| 146a413977 | |||
| 4e44550f62 | |||
| 9952470486 | |||
| 02d30dedbc | |||
| 5ed0fe52a0 | |||
| 42b1f774da | |||
| 7738b68320 | |||
| 1199fabe90 | |||
| 1aefc5f2f0 | |||
| 6f666c6c22 |
2
.ci
2
.ci
Submodule .ci updated: 1e0e326f74...130e88b709
19
.github/workflows/ci-scripts-build.yml
vendored
19
.github/workflows/ci-scripts-build.yml
vendored
@@ -51,6 +51,25 @@ jobs:
|
||||
matrix:
|
||||
# Job names also name artifacts, character limitations apply
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
cmp: gcc-12
|
||||
name: "Ub-22 gcc-12 c++20 Werror"
|
||||
# Turn all warnings into errors,
|
||||
# except for those we could not fix (yet).
|
||||
# Remove respective -Wno-error=... flag once it is fixed.
|
||||
extra: "CMD_CXXFLAGS=-std=c++20
|
||||
CMD_CPPFLAGS='-fdiagnostics-color
|
||||
-Werror
|
||||
-Wno-error=deprecated-declarations
|
||||
-Wno-error=stringop-truncation
|
||||
-Wno-error=restrict
|
||||
-Wno-error=sizeof-pointer-memaccess
|
||||
-Wno-error=nonnull
|
||||
-Wno-error=dangling-pointer
|
||||
-Wno-error=format-overflow
|
||||
-Wno-error=format-security
|
||||
-Wno-error=stringop-overread'"
|
||||
|
||||
- os: ubuntu-20.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -17,3 +17,6 @@ O.*/
|
||||
*.log
|
||||
.*.swp
|
||||
.DS_Store
|
||||
.iocsh_history
|
||||
RPMS
|
||||
SRPMS
|
||||
|
||||
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,6 +1,7 @@
|
||||
[submodule "modules/pvData"]
|
||||
path = modules/pvData
|
||||
url = https://github.com/epics-base/pvDataCPP
|
||||
# url = https://github.com/epics-base/pvDataCPP
|
||||
url = git@git.psi.ch:epics_base/pvData.git
|
||||
branch = master
|
||||
[submodule "modules/pvAccess"]
|
||||
path = modules/pvAccess
|
||||
@@ -26,3 +27,6 @@
|
||||
path = .ci
|
||||
url = https://github.com/epics-base/ci-scripts
|
||||
branch = master
|
||||
[submodule "modules/pcas"]
|
||||
path = modules/pcas
|
||||
url = https://github.com/epics-modules/pcas
|
||||
|
||||
10
Makefile
10
Makefile
@@ -23,3 +23,13 @@ DIRS += modules
|
||||
modules_DEPEND_DIRS = src
|
||||
|
||||
include $(TOP)/configure/RULES_TOP
|
||||
|
||||
UNINSTALL_DIRS += $(INSTALL_LOCATION)/src
|
||||
copysrc:
|
||||
tar cf - --exclude-vcs --exclude-backups --exclude=O.* modules/*/src | tar xf - -C $(INSTALL_LOCATION)
|
||||
|
||||
tar:
|
||||
tar cfjP epics_base-$(EPICS_VERSION_NUMBER).tar.bz2 $(INSTALL_LOCATION)
|
||||
|
||||
rpm:
|
||||
rpmbuild -bb epics-base.spec
|
||||
|
||||
@@ -33,7 +33,11 @@ CODE_CFLAGS = $(PROF_CFLAGS_$(PROFILE)) $(GPROF_CFLAGS_$(GPROF))
|
||||
CODE_CFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN))
|
||||
WARN_CFLAGS_YES = -Wall -Werror-implicit-function-declaration
|
||||
WARN_CFLAGS_NO = -w
|
||||
OPT_CFLAGS_YES = -O3
|
||||
# It makes sense to include debugging symbols even in optimized builds
|
||||
# in case you want to attach gdb to the process or examine a core-dump.
|
||||
# This does cost disk space, but not memory as debug symbols are not
|
||||
# loaded into RAM when the binary is loaded.
|
||||
OPT_CFLAGS_YES = -O3 -g
|
||||
OPT_CFLAGS_NO = -g
|
||||
|
||||
PROF_CXXFLAGS_YES = -p
|
||||
@@ -42,7 +46,7 @@ CODE_CXXFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))
|
||||
CODE_CXXFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN))
|
||||
WARN_CXXFLAGS_YES = -Wall
|
||||
WARN_CXXFLAGS_NO = -w
|
||||
OPT_CXXFLAGS_YES = -O3
|
||||
OPT_CXXFLAGS_YES = -O3 -g
|
||||
OPT_CXXFLAGS_NO = -g
|
||||
|
||||
CODE_LDFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))
|
||||
|
||||
@@ -157,7 +157,9 @@ USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES
|
||||
|
||||
# Site version number, if set will append '-' and this string to the
|
||||
# EPICS version number string that is reported by many tools.
|
||||
EPICS_SITE_VERSION =
|
||||
ifeq ($(INSTALL_LOCATION),$(EPICS_BASE))
|
||||
EPICS_SITE_VERSION=$(shell $(PERL) -MPOSIX -e 'print strftime "%Y-%m-%d", localtime')
|
||||
endif
|
||||
|
||||
# For GNU compiler, use pipes rather than temporary files for
|
||||
# communication between the various stages of compilation.
|
||||
|
||||
@@ -100,6 +100,23 @@ include $(CONFIG)/RULES_FILE_TYPE
|
||||
|
||||
include $(CONFIG)/RULES.Db
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Do not build anything if current path matches SKIP_BUILDS
|
||||
|
||||
ifneq (,$(strip $(SKIP_BUILDS)))
|
||||
CURRENT_MODULE=$(subst modules/,,$(subst $(realpath $(TOP)/..)/,,$(subst $(realpath $(dir $(lastword $(MAKEFILE_LIST)))..)/,,$(realpath ..))))
|
||||
ifneq ($(filter $(SKIP_BUILDS) $(addsuffix /%,$(SKIP_BUILDS)),$(CURRENT_MODULE)),)
|
||||
$(info Skipping $(CURRENT_MODULE) for $(T_A))
|
||||
PROD=
|
||||
TESTPROD=
|
||||
LIBRARY=
|
||||
TESTLIBRARY=
|
||||
LOADABLE_LIBRARY=
|
||||
TESTS=
|
||||
SRC_FILES=
|
||||
endif
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Include defines and rules for prod, library and test* targets
|
||||
|
||||
@@ -226,7 +243,7 @@ $(LOADABLE_SHRLIBNAME): FINAL_DIR=$(INSTALL_SHRLIB)
|
||||
|
||||
$(TESTPRODNAME) $(PRODNAME): $(PRODUCT_OBJS) $(PROD_RESS) $(PROD_DEPLIBS)
|
||||
|
||||
$(TESTPRODNAME) $(PRODNAME): %$(EXE): | $(INSTALL_LIB)
|
||||
$(TESTPRODNAME) $(PRODNAME): %$(EXE):
|
||||
@$(RM) $@
|
||||
$(LINK.cpp)
|
||||
$(MT_EXE_COMMAND)
|
||||
@@ -329,10 +346,6 @@ $(LOADABLE_SHRLIBNAME): $(LOADABLE_SHRLIB_PREFIX)%$(LOADABLE_SHRLIB_SUFFIX):
|
||||
$(LINK.shrlib)
|
||||
$(MT_DLL_COMMAND)
|
||||
|
||||
$(LIBNAME) $(SHRLIBNAME) $(LOADABLE_SHRLIBNAME): | $(INSTALL_LIB)
|
||||
$(INSTALL_LIB):
|
||||
@$(MKDIR) $@
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# C++ munching for VxWorks
|
||||
|
||||
|
||||
6
configure/os/CONFIG.Common.RHEL7-x86_64
Normal file
6
configure/os/CONFIG.Common.RHEL7-x86_64
Normal file
@@ -0,0 +1,6 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
TOOLSET_LOCATION = /opt/rh
|
||||
TOOLSET = devtoolset-12
|
||||
STD_CXXFLAGS = -std=c++20
|
||||
1
configure/os/CONFIG.Common.RHEL7-x86_64-clang
Normal file
1
configure/os/CONFIG.Common.RHEL7-x86_64-clang
Normal file
@@ -0,0 +1 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-clang
|
||||
18
configure/os/CONFIG.Common.RHEL8-x86_64
Normal file
18
configure/os/CONFIG.Common.RHEL8-x86_64
Normal file
@@ -0,0 +1,18 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
TOOLSET_LOCATION = /opt/rh
|
||||
TOOLSET = gcc-toolset-12
|
||||
STD_CXXFLAGS = -std=c++20
|
||||
|
||||
# Fix bug in gcc-toolset-11 calling the old assembler
|
||||
ifneq ($(filter %-11,$(TOOLSET)),)
|
||||
TARGET_CPPFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
|
||||
TARGET_LDFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
|
||||
endif
|
||||
|
||||
ifneq (($(TOOLSET)),)
|
||||
# Perl requests (native) annobin incompatible with the annobin from any TOOLSET
|
||||
# Disable Perl specific CFLAGS
|
||||
override Cap5_CFLAGS=
|
||||
endif
|
||||
3
configure/os/CONFIG.Common.RHEL8-x86_64-clang
Normal file
3
configure/os/CONFIG.Common.RHEL8-x86_64-clang
Normal file
@@ -0,0 +1,3 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-clang
|
||||
|
||||
STD_CXXFLAGS = -std=c++2a
|
||||
18
configure/os/CONFIG.Common.RHEL9-x86_64
Normal file
18
configure/os/CONFIG.Common.RHEL9-x86_64
Normal file
@@ -0,0 +1,18 @@
|
||||
# Include definitions common to linux pentium targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
|
||||
|
||||
TOOLSET_LOCATION = /opt/rh
|
||||
TOOLSET = gcc-toolset-12
|
||||
STD_CXXFLAGS = -std=c++20
|
||||
|
||||
# Fix bug in gcc-toolset-11 calling the old assembler
|
||||
ifneq ($(filter %-11,$(TOOLSET)),)
|
||||
TARGET_CPPFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
|
||||
TARGET_LDFLAGS += $(TOOLSET_DIR:%=-B$(SYSROOT)%/bin)
|
||||
endif
|
||||
|
||||
ifneq (($(TOOLSET)),)
|
||||
# Perl requests (native) annobin incompatible with the annobin from any TOOLSET
|
||||
# Disable Perl specific CFLAGS
|
||||
override Cap5_CFLAGS=
|
||||
endif
|
||||
3
configure/os/CONFIG.Common.RHEL9-x86_64-clang
Normal file
3
configure/os/CONFIG.Common.RHEL9-x86_64-clang
Normal file
@@ -0,0 +1,3 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-clang
|
||||
|
||||
STD_CXXFLAGS = -std=c++2a
|
||||
@@ -32,7 +32,7 @@ OP_SYS_LDFLAGS += -Wl,-Ttext,0x100000
|
||||
|
||||
|
||||
# This check must appear after the above include
|
||||
ifneq ($(RTEMS_VERSION),5)
|
||||
ifneq ($(firstword $(subst ., ,$(RTEMS_VERSION))),5)
|
||||
$(info *** This target is not compatible with the configured RTEMS version.)
|
||||
$(info *** Build the RTEMS-pc386 (-qemu) target for RTEMS 4.x)
|
||||
$(error Can't continue)
|
||||
|
||||
@@ -22,7 +22,7 @@ ARCH_DEP_CFLAGS += -DRTEMS_HAS_ALTIVEC
|
||||
#OP_SYS_LDLIBS += -lbspExt #does not use posix stuff ... want to ignore
|
||||
OP_SYS_LDLIBS += -Wl,--gc-sections
|
||||
#ARCH_DEP_LDFLAGS = -mcpu=8540 -meabi -msdata=sysv -mstrict-align -mspe -mabi=spe -mfloat-gprs=double
|
||||
ARCH_DEP_LDFLAGS = -L$(RTEMS_BASE)/powerpc-rtems5/qoriq_e500/lib
|
||||
ARCH_DEP_LDFLAGS = -L$(RTEMS_BASE)/$(GNU_TARGET)$(RTEMS_VERSION)/$(RTEMS_BSP)/lib
|
||||
|
||||
MUNCH_SUFFIX = .img
|
||||
MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
|
||||
|
||||
2
configure/os/CONFIG.Common.RTEMS49-pc386
Normal file
2
configure/os/CONFIG.Common.RTEMS49-pc386
Normal file
@@ -0,0 +1,2 @@
|
||||
RTEMS_VERSION = 4.9
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS-pc386
|
||||
2
configure/os/CONFIG.Common.RTEMS51-pc686
Normal file
2
configure/os/CONFIG.Common.RTEMS51-pc686
Normal file
@@ -0,0 +1,2 @@
|
||||
RTEMS_VERSION = 5
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS-pc686
|
||||
8
configure/os/CONFIG.Common.T2-ppc604
Normal file
8
configure/os/CONFIG.Common.T2-ppc604
Normal file
@@ -0,0 +1,8 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 5.5.1
|
||||
WIND_BASE = /opt/VxWorks/Tornado2.2.1
|
||||
|
||||
#there is a problem with our ccppc and optimization
|
||||
# -O0 works, -O and -O1 and higher are buggy
|
||||
OPT_CFLAGS_YES = -O0
|
||||
OPT_CXXFLAGS_YES = -O0
|
||||
2
configure/os/CONFIG.Common.V62-ppc604
Normal file
2
configure/os/CONFIG.Common.V62-ppc604
Normal file
@@ -0,0 +1,2 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.2
|
||||
5
configure/os/CONFIG.Common.V63-ppc603
Normal file
5
configure/os/CONFIG.Common.V63-ppc603
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc603_long
|
||||
VXWORKS_VERSION = 6.3
|
||||
|
||||
# Buggy "uninitialized variable" warning produces many false positives
|
||||
ARCH_DEP_CXXFLAGS += -Wno-uninitialized
|
||||
5
configure/os/CONFIG.Common.V63-ppc604
Normal file
5
configure/os/CONFIG.Common.V63-ppc604
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.3
|
||||
|
||||
# Buggy "uninitialized variable" warning produces many false positives
|
||||
ARCH_DEP_CXXFLAGS += -Wno-uninitialized
|
||||
5
configure/os/CONFIG.Common.V64-ppc604
Normal file
5
configure/os/CONFIG.Common.V64-ppc604
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.4
|
||||
|
||||
# Buggy "uninitialized variable" warning produces many false positives
|
||||
ARCH_DEP_CXXFLAGS += -Wno-uninitialized
|
||||
2
configure/os/CONFIG.Common.V66-ppc603
Normal file
2
configure/os/CONFIG.Common.V66-ppc603
Normal file
@@ -0,0 +1,2 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc603_long
|
||||
VXWORKS_VERSION = 6.6
|
||||
2
configure/os/CONFIG.Common.V66-ppc604
Normal file
2
configure/os/CONFIG.Common.V66-ppc604
Normal file
@@ -0,0 +1,2 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.6
|
||||
8
configure/os/CONFIG.Common.V67-ppc604
Normal file
8
configure/os/CONFIG.Common.V67-ppc604
Normal file
@@ -0,0 +1,8 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.7
|
||||
|
||||
# needed when including memPartLib.h, e.g. through moduleLib.h or loadLib.h
|
||||
ARCH_DEP_CFLAGS += -D_VSB_CONFIG_FILE='<../lib/h/config/vsbConfig.h>'
|
||||
|
||||
# compiler tries to access license server (even though no license isneeded)
|
||||
export LM_LICENSE_FILE=37000@lic-windriver.psi.ch
|
||||
3
configure/os/CONFIG.Common.V69-ppc32
Normal file
3
configure/os/CONFIG.Common.V69-ppc32
Normal file
@@ -0,0 +1,3 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc32
|
||||
VXWORKS_VERSION = 6.9
|
||||
#export LD_LIBRARY_PATH=$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
|
||||
6
configure/os/CONFIG.Common.V69-ppc604
Normal file
6
configure/os/CONFIG.Common.V69-ppc604
Normal file
@@ -0,0 +1,6 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
|
||||
VXWORKS_VERSION = 6.9
|
||||
#export LD_LIBRARY_PATH=$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib
|
||||
|
||||
# -fno-implicit-fp causes error: "unable to find a register to spill in class 'FLOAT_REGS'"
|
||||
ARCH_DEP_CFLAGS = -mcpu=604 -mstrict-align
|
||||
22
configure/os/CONFIG.Common.deb10-x86_64
Normal file
22
configure/os/CONFIG.Common.deb10-x86_64
Normal file
@@ -0,0 +1,22 @@
|
||||
# Cross Debian 10 with gcc 8.3
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = x86_64
|
||||
|
||||
LDLIBS_SHARED_YES=LDLIBS
|
||||
|
||||
SDK = gcc
|
||||
SDK_DIR = /opt/xgcc/gcc-8.3.0-deb10
|
||||
GNU_ARCH = x86_64-deb10-linux-gnu
|
||||
SDKTARGETSYSROOT=$(SDK_DIR)/$(GNU_ARCH)/sys-root/
|
||||
GNU_DIR = $(SDK_DIR)
|
||||
GNU_BIN = $(GNU_DIR)/bin
|
||||
GNU_TARGET_INCLUDE_DIR =
|
||||
GNU_TARGET=x86_64-deb10-linux-gnu
|
||||
|
||||
ARCH_DEP_CPPFLAGS =
|
||||
AS=$(GNU_BIN)/$(GNU_TARGET)-as
|
||||
|
||||
STD_CXXFLAGS = -std=c++17
|
||||
28
configure/os/CONFIG.Common.eldk42-ppc4xxFP
Normal file
28
configure/os/CONFIG.Common.eldk42-ppc4xxFP
Normal file
@@ -0,0 +1,28 @@
|
||||
# DeltaTau PowerPMAC with ELDK 4.2
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
ELDK=/opt/eldk-4.2
|
||||
GNU_TARGET=ppc_4xxFP
|
||||
GNU_DIR=$(ELDK)/usr
|
||||
|
||||
# This cross tool chain is installed in a somehow weired way
|
||||
# Without the following lines it does not work on RHEL7
|
||||
# but it worked on SL6
|
||||
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2
|
||||
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2/powerpc-linux
|
||||
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2/backward
|
||||
|
||||
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(ELDK)/$(GNU_TARGET)/lib
|
||||
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(ELDK)/$(GNU_TARGET)/usr/lib
|
||||
|
||||
# have no C++11
|
||||
STD_CXXFLAGS =
|
||||
|
||||
# suppress strict alias warnings
|
||||
CODE_CPPFLAGS += -fno-strict-aliasing
|
||||
17
configure/os/CONFIG.Common.eldk51-ppc4xxSF
Normal file
17
configure/os/CONFIG.Common.eldk51-ppc4xxSF
Normal file
@@ -0,0 +1,17 @@
|
||||
# Virtex FPGA embedded Processor with ELDK 5.1
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = eldk
|
||||
SDK_DIR = /opt/eldk-5.1
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
|
||||
GNU_TARGET = powerpc-4xx-softfloat
|
||||
GNU_ARCH = ppc405-linux
|
||||
GNU_DIR = $(SDK_DIR)/$(GNU_TARGET)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
|
||||
|
||||
# have no full C++11
|
||||
STD_CXXFLAGS = -std=c++0x
|
||||
18
configure/os/CONFIG.Common.eldk52-e500v2
Normal file
18
configure/os/CONFIG.Common.eldk52-e500v2
Normal file
@@ -0,0 +1,18 @@
|
||||
# IOxOS IFC1210 with ELDK 5.2
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = eldk
|
||||
SDK_DIR = /opt/eldk-5.2
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
|
||||
GNU_TARGET = powerpc-e500v2
|
||||
GNU_ARCH = ppce500v2-linux-gnuspe
|
||||
GNU_DIR = $(SDK_DIR)/$(GNU_TARGET)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
|
||||
GNU_TARGET_INCLUDE_DIR =
|
||||
|
||||
# have no full C++11
|
||||
STD_CXXFLAGS = -std=c++0x
|
||||
20
configure/os/CONFIG.Common.eldk53-ppc4xxFP
Normal file
20
configure/os/CONFIG.Common.eldk53-ppc4xxFP
Normal file
@@ -0,0 +1,20 @@
|
||||
# DeltaTau PowerPMAC with ELDK 5.3
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = eldk
|
||||
SDK_DIR = /opt/eldk-5.3
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
|
||||
GNU_ARCH = ppc440e-linux
|
||||
SDKTARGETSYSROOT=$(SDK_DIR)/powerpc-4xx/sysroots
|
||||
GNU_DIR = $(SDKTARGETSYSROOT)/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
|
||||
GNU_TARGET_INCLUDE_DIR =
|
||||
GNU_TARGET=powerpc-linux
|
||||
SYSROOT = $(SDKTARGETSYSROOT)/$(GNU_ARCH)
|
||||
|
||||
ARCH_DEP_CPPFLAGS = -m32 -mcpu=440fp -mhard-float
|
||||
AS=$(GNU_BIN)/$(GNU_TARGET)-as
|
||||
17
configure/os/CONFIG.Common.fslqoriq20-e6500_64
Normal file
17
configure/os/CONFIG.Common.fslqoriq20-e6500_64
Normal file
@@ -0,0 +1,17 @@
|
||||
# IOxOS IFC1211 with Freescale QorIQ 2.0 toolchain
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = fslsdk
|
||||
SDK_DIR = /opt/fsl-qoriq/2.0
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH_64)-$(SDK)-$(GNU_HOST_OS)
|
||||
SDK_TARGET = ppc64e6500-fsl-linux
|
||||
GNU_TARGET = powerpc64-fsl-linux
|
||||
SYSROOT = $(SDK_DIR)/sysroots/$(SDK_TARGET)
|
||||
GNU_DIR = $(SDK_DIR)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_TARGET)
|
||||
|
||||
ARCH_DEP_CFLAGS = -mcpu=e6500 -m64 -mhard-float
|
||||
21
configure/os/CONFIG.Common.gcc8-ppc4xxFP
Normal file
21
configure/os/CONFIG.Common.gcc8-ppc4xxFP
Normal file
@@ -0,0 +1,21 @@
|
||||
# DeltaTau PowerPMAC with gcc 8.5
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = ppc
|
||||
|
||||
SDK = gcc
|
||||
SDK_DIR = /opt/xgcc/gcc-8.5.0
|
||||
GNU_ARCH = powerpc-ppmac-linux-gnu
|
||||
SDKTARGETSYSROOT=$(SDK_DIR)/$(GNU_ARCH)/sys-root/
|
||||
GNU_DIR = $(SDK_DIR)
|
||||
GNU_BIN = $(GNU_DIR)/bin/
|
||||
GNU_TARGET_INCLUDE_DIR =
|
||||
GNU_TARGET=powerpc-ppmac-linux-gnu
|
||||
|
||||
ARCH_DEP_CPPFLAGS = -m32 -mcpu=440fp -mhard-float
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath,/opt/xgcc/gcc-8.5.0/$(GNU_ARCH)/lib
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(SDKTARGETSYSROOT)/lib/powerpc-linux-gnu/
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(SDKTARGETSYSROOT)/usr/lib/powerpc-linux-gnu/
|
||||
AS=$(GNU_BIN)/$(GNU_TARGET)-as
|
||||
5
configure/os/CONFIG.Common.linux-clang
Normal file
5
configure/os/CONFIG.Common.linux-clang
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
GNU = NO
|
||||
CMPLR_CLASS = clang
|
||||
CC = clang
|
||||
CCC = clang++
|
||||
@@ -24,17 +24,23 @@ STATIC_LDFLAGS_NO=
|
||||
STATIC_LDLIBS_YES= -Wl,-Bdynamic
|
||||
|
||||
# Set runtime path for shared libraries if LINKER_USE_RPATH=YES
|
||||
SHRLIBDIR_RPATH_LDFLAGS_YES = $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%)
|
||||
SHRLIBDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%))
|
||||
SHRLIBDIR_RPATH_LDFLAGS_ORIGIN = $(shell $(MAKERPATH) -O '\$$ORIGIN' -F $(FINAL_DIR) -R $(LINKER_ORIGIN_ROOT) $(SHRLIB_DEPLIB_DIRS))
|
||||
SHRLIBDIR_LDFLAGS += \
|
||||
$(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
|
||||
# Set runtime path for products if LINKER_USE_RPATH=YES
|
||||
PRODDIR_RPATH_LDFLAGS_YES = $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%)
|
||||
PRODDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%))
|
||||
PRODDIR_RPATH_LDFLAGS_ORIGIN = $(shell $(MAKERPATH) -O '\$$ORIGIN' -F $(FINAL_DIR) -R $(LINKER_ORIGIN_ROOT) $(PROD_DEPLIB_DIRS))
|
||||
PRODDIR_LDFLAGS += \
|
||||
$(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
|
||||
ifneq ($(LINKER_USE_RPATH:NO=),)
|
||||
ifeq ($(T_A),$(EPICS_HOST_ARCH))
|
||||
LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH:%=%:)$(INSTALL_LIB)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Link libraries controlled by COMMANDLINE_LIBRARY
|
||||
# The newest Linux versions only need readline, older ones need both
|
||||
# readline and ncurses, and the oldest need readline and curses
|
||||
|
||||
26
configure/os/CONFIG.Common.moxa42-armv6l
Normal file
26
configure/os/CONFIG.Common.moxa42-armv6l
Normal file
@@ -0,0 +1,26 @@
|
||||
# Moxa DA-66x with SDK 4.2 and ARM7 processor
|
||||
|
||||
# Include definitions common to all Linux ARM targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-arm
|
||||
|
||||
GNU_DIR=/opt/moxa/arm-linux-4.4.2-v4
|
||||
GNU_TARGET=arm
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(GNU_DIR)/arm-none-linux-gnueabi/lib
|
||||
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(INSTALL_LIB)
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
# suppress note "the mangling of 'va_list' has changed in GCC 4.4"
|
||||
ARCH_DEP_CXXFLAGS += -Wno-psabi
|
||||
|
||||
ARCH_DEP_CFLAGS += -funwind-tables
|
||||
|
||||
# have no full C++11
|
||||
STD_CXXFLAGS = -std=c++0x
|
||||
|
||||
# suppress strict alias warnings
|
||||
CODE_CPPFLAGS += -fno-strict-aliasing
|
||||
|
||||
# accept4() exists but does not work
|
||||
# Give fake __rtems__ macro to posix/osdSock.c because that disables accept4()
|
||||
osdSock_CFLAGS += -D__rtems__
|
||||
18
configure/os/CONFIG.Common.mvl40-xscale_be
Normal file
18
configure/os/CONFIG.Common.mvl40-xscale_be
Normal file
@@ -0,0 +1,18 @@
|
||||
# Moxa DA-66x with Montavista Linux 4.0
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_CURSES
|
||||
|
||||
ARCH_CLASS = xscale
|
||||
|
||||
GNU_DIR=/opt/moxa/xscale_be/armv5teb-montavista-linuxeabi
|
||||
|
||||
ARCH_DEP_CFLAGS += -funwind-tables
|
||||
|
||||
# have no C++11
|
||||
STD_CXXFLAGS =
|
||||
|
||||
# Cannot build PVA because of missing boost support
|
||||
SKIP_BUILDS = pv% normativeTypes
|
||||
19
configure/os/CONFIG.Common.nilrt7-armv7a
Normal file
19
configure/os/CONFIG.Common.nilrt7-armv7a
Normal file
@@ -0,0 +1,19 @@
|
||||
# National Instruments CompactRIO running LabView RT 19.5.1
|
||||
# requires RPM gcc-c++-arm-linux-gnu
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = arm
|
||||
|
||||
GNU_TARGET = arm-linux-gnu
|
||||
|
||||
SYSROOT = /opt/LabVIEW-RT-19.5.1/arm/sysroots/armv7a-vfp-neon-nilrt-linux-gnueabi
|
||||
GNU_BIN = /opt/RHEL7/bin
|
||||
LD_LIBRARY_PATH=/usr/$$LIB:/opt/RHEL7/$$LIB
|
||||
|
||||
ARCH_DEP_CPPFLAGS += -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon
|
||||
ARCH_DEP_CXXFLAGS += -I=/usr/include/c++/4.7.2/arm-nilrt-linux-gnueabi
|
||||
ARCH_DEP_CXXFLAGS += -I=/usr/include/c++/4.7.2
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
41
configure/os/CONFIG.Common.raspbian-arm
Normal file
41
configure/os/CONFIG.Common.raspbian-arm
Normal file
@@ -0,0 +1,41 @@
|
||||
# RaspberryPi with github.com/raspberrypi/tools toolchain
|
||||
# Tested on:
|
||||
# * Raspberry 3B+ Raspbian 9
|
||||
# * Raspberry 2 Raspbian 7
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
# Using readline:
|
||||
# Due to missing/messed up libs in the toolchain, readline needs copies of
|
||||
# libtinfo.so.5.9 and libreadline.so.6.2 from a Raspbian 7 rootfs
|
||||
# /lib/arm-linux-gnueabihf/ to the toolchain, e.g.
|
||||
# $(SDK_DIR)/$(SDK_TARGET)/arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf/
|
||||
# and manually created links libtinfo.so.5 and libreadline.so.
|
||||
# For gcc-linaro-arm-linux-gnueabihf-raspbian, an existing incompatible
|
||||
# libtinfo.so.5 is in the way. Remove it.
|
||||
# (Built with glibc 2.16 like installed on Raspbian 9 but toolchain uses glibc 2.13.)
|
||||
# Also copy /usr/include/readline/ directory from some readline 6 installation
|
||||
# to $(SDK_DIR)/$(SDK_TARGET)/arm-linux-gnueabihf/libc/usr/include/
|
||||
|
||||
ARCH_CLASS = arm
|
||||
|
||||
SDK_DIR = /opt/raspberrypi/arm-bcm2708
|
||||
|
||||
# Available SDK_TARGETs:
|
||||
|
||||
# gcc 4.8.3 for 32 bit hosts with GLIBC 2.3 or higher
|
||||
# SDK_TARGET = gcc-linaro-arm-linux-gnueabihf-raspbian
|
||||
|
||||
# gcc 4.8.3 for 64 bit hosts with GLIBC 2.14 or higher
|
||||
SDK_TARGET = gcc-linaro-arm-linux-gnueabihf-raspbian-x64
|
||||
|
||||
# gcc 4.7.1 for 64 bit hosts with GLIBC 2.8 or higher
|
||||
# SDK_TARGET = arm-linux-gnueabihf
|
||||
|
||||
# gcc 4.7.1 for 32 bit hosts with GLIBC 2.4 or higher
|
||||
# SDK_TARGET = arm-bcm2708hardfp-linux-gnueabi
|
||||
# SDK_TARGET = arm-bcm2708-linux-gnueabi
|
||||
|
||||
GNU_DIR = $(SDK_DIR)/$(SDK_TARGET)
|
||||
GNU_TARGET = $(if $(filter arm-bcm2708%,SDK_TARGET),$(SDK_TARGET),arm-linux-gnueabihf)
|
||||
15
configure/os/CONFIG.Common.yocto21-aarch64
Normal file
15
configure/os/CONFIG.Common.yocto21-aarch64
Normal file
@@ -0,0 +1,15 @@
|
||||
# XILINX Zynq with Yocto 2.1 / Petalinux toolchain
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = arm64
|
||||
|
||||
SDK = petalinux
|
||||
SDK_DIR = /opt/petalinux-gfa/2018.1
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH_64)-$(SDK)-$(GNU_HOST_OS)
|
||||
SDK_TARGET = aarch64-xilinx-linux
|
||||
GNU_TARGET = $(SDK_TARGET)
|
||||
SYSROOT = $(SDK_DIR)/sysroots/$(SDK_TARGET)
|
||||
GNU_DIR = $(SDK_DIR)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_TARGET)
|
||||
19
configure/os/CONFIG.Common.yocto40-aarch64
Normal file
19
configure/os/CONFIG.Common.yocto40-aarch64
Normal file
@@ -0,0 +1,19 @@
|
||||
# XILINX Zynq with Yocto 4.0 toolchain
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = arm64
|
||||
|
||||
SDK = pokysdk
|
||||
SDK_DIR = /opt/yocto40-aarch64
|
||||
SDK_HOST_ARCH = $(GNU_HOST_ARCH_64)-$(SDK)-$(GNU_HOST_OS)
|
||||
SDK_TARGET = cortexa53-poky-linux
|
||||
GNU_TARGET = aarch64-poky-linux
|
||||
SYSROOT = $(SDK_DIR)/sysroots/$(SDK_TARGET)
|
||||
GNU_DIR = $(SDK_DIR)/sysroots/$(SDK_HOST_ARCH)/usr
|
||||
GNU_BIN = $(GNU_DIR)/bin/$(GNU_TARGET)
|
||||
|
||||
ARCH_DEP_CPPFLAGS = -mcpu=cortex-a53 -march=armv8-a+crc
|
||||
|
||||
STD_CXXFLAGS = -std=c++23
|
||||
10
configure/os/CONFIG.Linux.windows-x64
Normal file
10
configure/os/CONFIG.Linux.windows-x64
Normal file
@@ -0,0 +1,10 @@
|
||||
include $(CONFIG)/os/CONFIG.windows-x64.windows-x64
|
||||
|
||||
VALID_BUILDS = Ioc Command
|
||||
|
||||
MSVC_VERSION ?= 2019
|
||||
PATH := /opt/gfa-wine/bin:/opt/wine-msvc-$(MSVC_VERSION)/bin/x64:$(PATH)
|
||||
export WINEPREFIX = $(HOME)/.wine-$(EPICS_HOST_ARCH)
|
||||
export WINEDEBUG=fixme-all
|
||||
export WINEDLLOVERRIDES="mscoree,mshtml="
|
||||
export WINE = wine64
|
||||
3
configure/os/CONFIG.RHEL7-x86_64.Common
Normal file
3
configure/os/CONFIG.RHEL7-x86_64.Common
Normal file
@@ -0,0 +1,3 @@
|
||||
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
|
||||
#Include definitions common to linux hosts
|
||||
include $(CONFIG)/os/CONFIG.linux-x86_64.Common
|
||||
2
configure/os/CONFIG.RHEL7-x86_64.RHEL7-x86_64
Normal file
2
configure/os/CONFIG.RHEL7-x86_64.RHEL7-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
3
configure/os/CONFIG.RHEL7-x86_64.windows-x64
Normal file
3
configure/os/CONFIG.RHEL7-x86_64.windows-x64
Normal file
@@ -0,0 +1,3 @@
|
||||
# MSVC_VERSION 2019 in wine 4 for on RHEL7 would require winetricks
|
||||
MSVC_VERSION = 2017
|
||||
include $(CONFIG)/os/CONFIG.Linux.windows-x64
|
||||
3
configure/os/CONFIG.RHEL8-x86_64.Common
Normal file
3
configure/os/CONFIG.RHEL8-x86_64.Common
Normal file
@@ -0,0 +1,3 @@
|
||||
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
|
||||
#Include definitions common to linux hosts
|
||||
include $(CONFIG)/os/CONFIG.linux-x86_64.Common
|
||||
22
configure/os/CONFIG.RHEL8-x86_64.RHEL7-x86_64
Normal file
22
configure/os/CONFIG.RHEL8-x86_64.RHEL7-x86_64
Normal file
@@ -0,0 +1,22 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
|
||||
# "Cross compile" for RHEL7-x86_64
|
||||
# Expects RHEL7 RPMs c++ and readline-devel installed
|
||||
# in $(SYSROOT)
|
||||
# This can be installed on RHEL7 with:
|
||||
# yum install --installroot=$(SYSROOT) <packages>
|
||||
# (Assuming $(SYSROOT) is on a shared network volume.)
|
||||
# Optionally use a newer TOOLSET (installed on $(SYSROOT)).
|
||||
|
||||
SYSROOT = /opt/RHEL7
|
||||
|
||||
# "Cross" TOOLSET progs need to find their libraries
|
||||
LD_LIBRARY_PATH = $(TOOLSET_DIR:%=$(SYSROOT)%/usr/$$LIB)
|
||||
|
||||
# These programs have library problems when using them
|
||||
# from SYSROOT but without TOOLSET.
|
||||
# But provinding LD_LIBRARY PATH crashes other progams.
|
||||
# Our host versions work just fine.
|
||||
AR = ar -rc
|
||||
RANLIB = ranlib
|
||||
2
configure/os/CONFIG.RHEL8-x86_64.RHEL8-x86_64
Normal file
2
configure/os/CONFIG.RHEL8-x86_64.RHEL8-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
1
configure/os/CONFIG.RHEL8-x86_64.windows-x64
Normal file
1
configure/os/CONFIG.RHEL8-x86_64.windows-x64
Normal file
@@ -0,0 +1 @@
|
||||
include $(CONFIG)/os/CONFIG.Linux.windows-x64
|
||||
3
configure/os/CONFIG.RHEL9-x86_64.Common
Normal file
3
configure/os/CONFIG.RHEL9-x86_64.Common
Normal file
@@ -0,0 +1,3 @@
|
||||
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
|
||||
#Include definitions common to linux hosts
|
||||
include $(CONFIG)/os/CONFIG.linux-x86_64.Common
|
||||
18
configure/os/CONFIG.RHEL9-x86_64.RHEL7-x86_64
Normal file
18
configure/os/CONFIG.RHEL9-x86_64.RHEL7-x86_64
Normal file
@@ -0,0 +1,18 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
|
||||
# "Cross compile" for RHEL7-x86_64
|
||||
# Expects RHEL7 RPMs c++ and readline-devel installed
|
||||
# in $(SYSROOT)
|
||||
# This can be installed on RHEL7 with:
|
||||
# yum install --installroot=$(SYSROOT) <packages>
|
||||
# (Assuming $(SYSROOT) is on a shared network volume.)
|
||||
# Optionally use a newer TOOLSET (installed on $(SYSROOT)).
|
||||
|
||||
SYSROOT = /opt/RHEL7
|
||||
|
||||
# "Cross" TOOLSET progs need to find their libraries
|
||||
LD_LIBRARY_PATH = $(TOOLSET_DIR:%=$(SYSROOT)%/usr/$$LIB:)/usr/$$LIB:$(SYSROOT)/usr/$$LIB
|
||||
|
||||
# The linker has problems to find indirectly referenced libraries
|
||||
PROD_LDLIBS += $(LDLIBS)
|
||||
23
configure/os/CONFIG.RHEL9-x86_64.RHEL8-x86_64
Normal file
23
configure/os/CONFIG.RHEL9-x86_64.RHEL8-x86_64
Normal file
@@ -0,0 +1,23 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
|
||||
# "Cross compile" for RHEL8-x86_64
|
||||
# Expects RHEL8 RPMs gcc-toolset-12-gcc-c++ and readline-devel
|
||||
# to be installed in $(SYSROOT)
|
||||
# These can be installed on RHEL8 with:
|
||||
# yum install --installroot=$(SYSROOT) <packages>
|
||||
# (Assuming $(SYSROOT) is on a shared network volume.)
|
||||
|
||||
SYSROOT = /opt/RHEL8
|
||||
|
||||
# "Cross" TOOLSET progs need to find their libraries.
|
||||
# But linker gets confused with LD_LIBRARY_PATH.
|
||||
# Thus only wrap the compiler.
|
||||
WRAPPER = -wrapper env,LD_LIBRARY_PATH=$(TOOLSET_DIR:%=$(SYSROOT)%/usr/lib64:)/usr/lib64:$(SYSROOT)/usr/lib64
|
||||
TARGET_CPPFLAGS += $(WRAPPER)
|
||||
TARGET_PROD_LDFLAGS += $(WRAPPER)
|
||||
|
||||
# These programs as cross tools would also need LD_LIBRARY_PATH.
|
||||
# But but our host versions work just fine.
|
||||
AR = ar -rc
|
||||
RANLIB = ranlib
|
||||
2
configure/os/CONFIG.RHEL9-x86_64.RHEL9-x86_64
Normal file
2
configure/os/CONFIG.RHEL9-x86_64.RHEL9-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Include common linux definitions
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
|
||||
1
configure/os/CONFIG.RHEL9-x86_64.windows-x64
Normal file
1
configure/os/CONFIG.RHEL9-x86_64.windows-x64
Normal file
@@ -0,0 +1 @@
|
||||
include $(CONFIG)/os/CONFIG.Linux.windows-x64
|
||||
@@ -16,7 +16,7 @@ OPT_WHOLE_PROGRAM = YES
|
||||
|
||||
WINLINK = link
|
||||
|
||||
RCCMD = rc -l 0x409 $(INCLUDES) -fo $@ $<
|
||||
RCCMD = rc -nologo -l 0x409 $(INCLUDES) -fo $@ $<
|
||||
|
||||
ARCMD = lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
#RTEMS_VERSION = 5
|
||||
#RTEMS_BASE = /usr/local/vw/rtems/rtems-5.1
|
||||
|
||||
# PSI:
|
||||
RTEMS_BASE = /opt/rtems/$(RTEMS_VERSION)
|
||||
|
||||
# Cross-compile toolchain in $(RTEMS_TOOLS)/bin
|
||||
#
|
||||
RTEMS_TOOLS = $(RTEMS_BASE)
|
||||
|
||||
2
configure/os/CONFIG_SITE.Common.deb10-x86_64
Normal file
2
configure/os/CONFIG_SITE.Common.deb10-x86_64
Normal file
@@ -0,0 +1,2 @@
|
||||
# Debian 10
|
||||
COMMANDLINE_LIBRARY=READLINE_NCURSES
|
||||
2
configure/os/CONFIG_SITE.Common.gcc8-ppc4xxFP
Normal file
2
configure/os/CONFIG_SITE.Common.gcc8-ppc4xxFP
Normal file
@@ -0,0 +1,2 @@
|
||||
# DeltaTau PowerPMAC with gcc
|
||||
COMMANDLINE_LIBRARY=READLINE
|
||||
@@ -8,3 +8,16 @@
|
||||
# They must be set in the host+target specific file instead:
|
||||
# CONFIG_SITE.<linux-arch>.<linux-arch>
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
USR_CXXFLAGS += $(STD_CXXFLAGS)
|
||||
STD_CXXFLAGS = -std=c++11
|
||||
|
||||
TOOLSET_DIR = $(TOOLSET:%=$(TOOLSET_LOCATION)/%/root)
|
||||
GNU_DIR = $(SYSROOT)$(TOOLSET_DIR)
|
||||
TARGET_CPPFLAGS += $(SYSROOT:%=--sysroot=%)
|
||||
TARGET_LDFLAGS += $(SYSROOT:%=--sysroot=%)
|
||||
|
||||
ifeq ($(filter SL% RHEL%,$(T_A)),)
|
||||
VALID_BUILDS = Ioc Command
|
||||
endif
|
||||
|
||||
@@ -18,8 +18,82 @@ VXWORKS_VERSION = 6.9
|
||||
# architecture by adding it to an appropriate
|
||||
# CONFIG_SITE.$(EPICS_HOST_ARCH).vxWorksCommon file.
|
||||
|
||||
#### Fixes for CONFIG.Common.vxWorksCommon #######
|
||||
|
||||
VX_GNU_VERSION_7 = 4.8.1.11
|
||||
|
||||
|
||||
# These are needed for vxWorks 6.x; the GNU toolset version number
|
||||
# is in the path to the compiler tools:
|
||||
VX_GNU_VERSION_5 = 2.96
|
||||
VX_GNU_VERSION_6 = $(VX_GNU_VERSION_$(VXWORKS_VERSION))
|
||||
VX_GNU_VERSION = $(VX_GNU_VERSION_$(VXWORKS_MAJOR_VERSION))
|
||||
VX_GNU_MAJOR_VERSION = $(firstword $(subst ., ,$(VX_GNU_VERSION)))
|
||||
VX_GNU_MINOR_VERSION = $(word 2,$(subst ., ,$(VX_GNU_VERSION)))
|
||||
|
||||
# gcc version before 3.4 are "old" and need special treatment
|
||||
VX_OLD_GCC_2 = OLD
|
||||
VX_OLD_GCC_3.3 = OLD
|
||||
VX_OLD_GCC_3 = $(VX_OLD_GCC_3.$(VX_GNU_MINOR_VERSION))
|
||||
VX_OLD_GCC = $(VX_OLD_GCC_$(VX_GNU_MAJOR_VERSION))
|
||||
|
||||
# vxWorks directory definitions
|
||||
VX_DIR_5 = $(WIND_BASE)
|
||||
VX_DIR_6 = $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)
|
||||
VX_DIR_7 = $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)/pkgs/os
|
||||
VX_DIR = $(VX_DIR_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
VX_INCLUDE_DIRS_5 = $(VX_DIR)/target/h
|
||||
VX_INCLUDE_DIRS_6 = $(VX_DIR)/target/h
|
||||
VX_INCLUDE_DIRS_6 += $(VX_DIR)/target/h/wrn/coreip
|
||||
VX_INCLUDE_DIRS_7 = $(VX_DIR)/core/kernel-1.2.8.0/h
|
||||
VX_INCLUDE_DIRS_7 += $(VX_DIR)/lang-lib/libc-1.0.0.1/libc-kernel-1.0.8.0/h
|
||||
VX_INCLUDE_DIRS_7 += $(VX_DIR)/utils/ostools-1.0.5.0/h
|
||||
VX_INCLUDE_DIRS_7 += $(VX_DIR)/utils/ostools-1.0.5.0/shareh
|
||||
VX_INCLUDE_DIRS_7 += $(VX_DIR)/arch/ppc-1.3.4.0/kernel/base/h/
|
||||
VX_INCLUDE_DIRS_7 += $(VX_DIR)/arch/ppc-1.3.4.0/kernel/60x/h/arch/ppc/
|
||||
VX_INCLUDE_DIRS_7 += $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)/samples/prebuilt_projects/vsb_vxsim_linux/krnl/h/public
|
||||
GNU_TARGET_INCLUDE_DIR = $(VX_INCLUDE_DIRS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
TARGET_CPPFLAGS_5 = -isystem $(VX_DIR)/target/h
|
||||
TARGET_CPPFLAGS_6 = -isystem $(VX_DIR)/target/h
|
||||
TARGET_CPPFLAGS_7 = -isystem $(VX_DIR)/core/kernel-1.2.8.0/h -D_VSB_CONFIG_FILE='<$(WIND_BASE)/vxworks-$(VXWORKS_VERSION)/samples/prebuilt_projects/vsb_vxsim_linux/h/config/vsbConfig.h>'
|
||||
TARGET_CPPFLAGS = $(TARGET_CPPFLAGS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
# vxWorks GNU directories
|
||||
|
||||
GNU_DIR_5 = $(WIND_BASE)/host/$(WIND_HOST_TYPE)
|
||||
GNU_DIR_6 = $(WIND_BASE)/gnu/$(VX_GNU_VERSION)-vxworks-$(VXWORKS_VERSION)/$(WIND_HOST_TYPE)
|
||||
GNU_DIR_7 = $(WIND_BASE)/compilers/gnu-$(VX_GNU_VERSION)/$(WIND_HOST_TYPE)
|
||||
GNU_DIR = $(GNU_DIR_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
# Operating system flags
|
||||
|
||||
OP_SYS_INCLUDE_CPPFLAGS_5 += -include $(VX_DIR)/target/h/vxWorks.h
|
||||
OP_SYS_INCLUDE_CPPFLAGS_5 += -I$(EPICS_BASE)/include/os/vxWorks/vxWorks5
|
||||
OP_SYS_INCLUDE_CPPFLAGS_6 += -include $(VX_DIR)/target/h/vxWorks.h
|
||||
OP_SYS_INCLUDE_CPPFLAGS_7 += -include vxWorks.h
|
||||
OP_SYS_INCLUDE_CPPFLAGS = $(OP_SYS_INCLUDE_CPPFLAGS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
OP_SYS_LDFLAGS += $(OP_SYS_LDFLAGS_$@)
|
||||
OP_SYS_LDFLAGS_softIoc = -whole-archive
|
||||
OP_SYS_LDFLAGS_softIocPVA = -whole-archive
|
||||
|
||||
# code flags (delete -fno-implicit-templates)
|
||||
CODE_CXXFLAGS =
|
||||
|
||||
# WIND_BASE is where you installed the Wind River software.
|
||||
|
||||
#WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
|
||||
WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
|
||||
#WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
|
||||
#WIND_BASE = /ade/vxWorks/$(VXWORKS_VERSION)
|
||||
WIND_BASE = /opt/VxWorks/VxWorks$(VXWORKS_VERSION)
|
||||
|
||||
#--------------------------------------------------
|
||||
# Modules we cannot build with old compiler
|
||||
|
||||
PV_MODULES = pv% normativeTypes
|
||||
SKIP_BUILDS_5 = $(PV_MODULES)
|
||||
SKIP_BUILDS_OLD = $(PV_MODULES)
|
||||
SKIP_BUILDS_6 = $(SKIP_BUILDS_$(VX_OLD_GCC))
|
||||
SKIP_BUILDS = $(SKIP_BUILDS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
5
configure/os/CONFIG_SITE.RHEL7-x86_64.Common
Normal file
5
configure/os/CONFIG_SITE.RHEL7-x86_64.Common
Normal file
@@ -0,0 +1,5 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
|
||||
|
||||
# Improved error checking with clang
|
||||
CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86_64-clang
|
||||
CROSS_COMPILER_RUNTEST_ARCHS += RHEL7-x86_64-clang
|
||||
7
configure/os/CONFIG_SITE.RHEL8-x86_64.Common
Normal file
7
configure/os/CONFIG_SITE.RHEL8-x86_64.Common
Normal file
@@ -0,0 +1,7 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
|
||||
|
||||
# Improved error checking with clang
|
||||
CROSS_COMPILER_TARGET_ARCHS += RHEL8-x86_64-clang
|
||||
|
||||
# Build for old RHEL7 64 bit
|
||||
CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86_64
|
||||
10
configure/os/CONFIG_SITE.RHEL9-x86_64.Common
Normal file
10
configure/os/CONFIG_SITE.RHEL9-x86_64.Common
Normal file
@@ -0,0 +1,10 @@
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
|
||||
|
||||
# Improved error checking with clang
|
||||
CROSS_COMPILER_TARGET_ARCHS += RHEL9-x86_64-clang
|
||||
|
||||
# Build for old RHEL8 64 bit
|
||||
CROSS_COMPILER_TARGET_ARCHS += RHEL8-x86_64
|
||||
|
||||
# Build for old RHEL7 64 bit
|
||||
CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86_64
|
||||
@@ -5,3 +5,50 @@
|
||||
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-ppc32
|
||||
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100 RTEMS-pc386-qemu
|
||||
|
||||
INSTALL_LOCATION=/usr/local/epics/base-$(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
|
||||
|
||||
GNU_HOST_ARCH=i686
|
||||
GNU_HOST_OS=linux
|
||||
|
||||
# set LD_LIBRARY_PATH may cause problems for eldk53-ppc4xxFP
|
||||
# not exported LD_LIBRARY_PATH causes problem for RHEL7 cross compilation
|
||||
export LD_LIBRARY_PATH=
|
||||
|
||||
# vxWorks for MVxxxx boards
|
||||
#CROSS_COMPILER_TARGET_ARCHS += T2-ppc604
|
||||
#CROSS_COMPILER_TARGET_ARCHS += V67-ppc604
|
||||
CROSS_COMPILER_TARGET_ARCHS += V69-ppc604
|
||||
#CROSS_COMPILER_TARGET_ARCHS += V69-ppc32
|
||||
|
||||
# NI compact RIO
|
||||
#CROSS_COMPILER_TARGET_ARCHS += V63-ppc603
|
||||
|
||||
# MOXA montavista linux (No PVA because of missing boost support)
|
||||
CROSS_COMPILER_TARGET_ARCHS += mvl40-xscale_be
|
||||
|
||||
# MOXA SDK 4.2
|
||||
CROSS_COMPILER_TARGET_ARCHS += moxa42-armv6l
|
||||
|
||||
# Virtex embedded PPC
|
||||
CROSS_COMPILER_TARGET_ARCHS += eldk51-ppc4xxSF
|
||||
|
||||
# IOxOS IFC1210
|
||||
CROSS_COMPILER_TARGET_ARCHS += eldk52-e500v2
|
||||
|
||||
# DeltaTau PowerPMAC
|
||||
CROSS_COMPILER_TARGET_ARCHS += eldk42-ppc4xxFP
|
||||
CROSS_COMPILER_TARGET_ARCHS += eldk53-ppc4xxFP
|
||||
|
||||
# Test other vxWorks versions
|
||||
#CROSS_COMPILER_TARGET_ARCHS += V66-ppc603
|
||||
#CROSS_COMPILER_TARGET_ARCHS += V66-ppc604
|
||||
#CROSS_COMPILER_TARGET_ARCHS += V63-ppc604
|
||||
#CROSS_COMPILER_TARGET_ARCHS += V64-ppc604
|
||||
# (No PVA because of old compiler)
|
||||
#CROSS_COMPILER_TARGET_ARCHS += V62-ppc604
|
||||
|
||||
# RTEMS (Can only have 1 RTEMS major version in 1 EPICS installation
|
||||
# because they overwrite their header files.)
|
||||
#CROSS_COMPILER_TARGET_ARCHS += RTEMS49-pc386
|
||||
CROSS_COMPILER_TARGET_ARCHS += RTEMS51-pc686
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
# Site specific definitions for linux-x86 host - linux-x86 target builds
|
||||
#-------------------------------------------------------
|
||||
|
||||
# It makes sense to include debugging symbols even in optimized builds
|
||||
# in case you want to attach gdb to the process or examine a core-dump.
|
||||
# This does cost disk space, but not memory as debug symbols are not
|
||||
# loaded into RAM when the binary is loaded.
|
||||
OPT_CFLAGS_YES += -g
|
||||
OPT_CXXFLAGS_YES += -g
|
||||
|
||||
# Uncomment the followings lines to build with CLANG instead of GCC.
|
||||
#
|
||||
#GNU = NO
|
||||
|
||||
@@ -7,3 +7,28 @@
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100
|
||||
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
|
||||
|
||||
GNU_HOST_ARCH_64=x86_64
|
||||
|
||||
# Windows cross builds using Wine
|
||||
CROSS_COMPILER_TARGET_ARCHS += windows-x64
|
||||
|
||||
# IOxOS IFC1211
|
||||
#CROSS_COMPILER_TARGET_ARCHS += fslqoriq20-e6500_64
|
||||
|
||||
# Zynq
|
||||
#CROSS_COMPILER_TARGET_ARCHS += yocto21-aarch64
|
||||
CROSS_COMPILER_TARGET_ARCHS += yocto40-aarch64
|
||||
|
||||
# Debian 10
|
||||
CROSS_COMPILER_TARGET_ARCHS += deb10-x86_64
|
||||
|
||||
# Newer DeltaTau PowerPMAC
|
||||
CROSS_COMPILER_TARGET_ARCHS += gcc8-ppc4xxFP
|
||||
|
||||
# Raspberry Pi
|
||||
CROSS_COMPILER_TARGET_ARCHS += raspbian-arm
|
||||
|
||||
# NI Linux Real-Time 7.x
|
||||
CROSS_COMPILER_TARGET_ARCHS += nilrt7-armv7a
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
# Site specific definitions for linux-x86_64 host - linux-x86_64 target builds
|
||||
#-------------------------------------------------------
|
||||
|
||||
# It makes sense to include debugging symbols even in optimized builds
|
||||
# in case you want to attach gdb to the process or examine a core-dump.
|
||||
# This does cost disk space, but not memory as debug symbols are not
|
||||
# loaded into RAM when the binary is loaded.
|
||||
OPT_CFLAGS_YES += -g
|
||||
OPT_CXXFLAGS_YES += -g
|
||||
|
||||
# Uncomment the followings lines to build with CLANG instead of GCC.
|
||||
#
|
||||
#GNU = NO
|
||||
|
||||
@@ -22,6 +22,62 @@ should also be read to understand what has changed since earlier releases:
|
||||
|
||||
## Changes made on the 7.0 branch since 7.0.7
|
||||
|
||||
### PROC field changed to ASL0
|
||||
|
||||
The PROC field has been changed from access security level ASL1 to ASL0.
|
||||
This allows users to trigger processing a record without having the rights
|
||||
to reconfigure the records.
|
||||
|
||||
### bi "Raw Soft Channel" use MASK
|
||||
|
||||
If MASK is non-zero, The raw device support will now apply MASK to the
|
||||
value read into RVAL.
|
||||
eg. allows extraction of a bit from an input integer.
|
||||
|
||||
```
|
||||
record(longin, "integer") {
|
||||
field(VAL, "0xff")
|
||||
}
|
||||
record(bi, "bit1") {
|
||||
field(DESC, "extract bit 1")
|
||||
field(DTYP, "Raw Soft Channel")
|
||||
field(INP , "integer")
|
||||
field(MASK, "0x2")
|
||||
field(ZNAM, "Clear")
|
||||
field(ONAM, "Set")
|
||||
}
|
||||
```
|
||||
|
||||
### ANSI escapes in stderr
|
||||
|
||||
ANSI escape charactor sequences may now be printed to the stderr stream.
|
||||
These escapes will appear in logs captured from that stream.
|
||||
Tools which parse and/or render these logs may need to be adjusted to
|
||||
either strip out the escapes, or to translate them into markup.
|
||||
(see [ansi2html](https://pypi.org/project/ansi2html/) for example)
|
||||
|
||||
### Allow explicit append with `dbRecordsOnceOnly!=0`
|
||||
|
||||
Previously setting `dbRecordsOnceOnly!=0` prevented any further changes to a record via a .db file. eg.
|
||||
|
||||
```
|
||||
record(ai, "myrec") {}
|
||||
```
|
||||
|
||||
`dbRecordsOnceOnly!=0` previously disallowed appending fields with either form:
|
||||
|
||||
```
|
||||
record("*", "myrec") {} # error
|
||||
record(ai, "myrec") {} # error
|
||||
```
|
||||
|
||||
Beginning with this release, `dbRecordsOnceOnly!=0` allows appending when explicitly intended (when record type is `"*"`).
|
||||
|
||||
```
|
||||
record("*", "myrec") {} # allowed
|
||||
record(ai, "myrec") {} # error
|
||||
```
|
||||
|
||||
### Add `$EPICS_CLI_TIMEOUT`
|
||||
|
||||
Add support for CA tools timeout from environment variable `$EPICS_CLI_TIMEOUT`
|
||||
@@ -63,7 +119,7 @@ Previously, if a subRecord has an invalid `INP*` link, it was silently failing
|
||||
(and not running the proc function). Now the the status code returned by the
|
||||
subroutine is returned from `dbProcess()`.
|
||||
|
||||
### COMMANDLINE_LIBRARY fallback to GNU_DIR
|
||||
### COMMANDLINE\_LIBRARY fallback to GNU\_DIR
|
||||
|
||||
Fall back to the previous behavior when searching for `readline.h` with older compilers.
|
||||
|
||||
@@ -102,6 +158,10 @@ and string formats, some of which support full nanosecond precision.
|
||||
More information is included in the filters documentation, which can be found in
|
||||
the `html/filters.html` document that is generated during the build
|
||||
|
||||
### Allow adding new error symbols at any time
|
||||
|
||||
`errSymbolAdd` can now be called after early initialization.
|
||||
|
||||
### Add conditional output (OOPT) to the longout record
|
||||
|
||||
The longout record can now be configured using its new OOPT and OOCH fields
|
||||
@@ -114,7 +174,9 @@ This functionality was suggested in
|
||||
be added to other output record types if the community finds it useful,
|
||||
please send feedback about the feature to tech-talk.
|
||||
|
||||
### Tab completion for IOC shell
|
||||
### IOC Shell
|
||||
|
||||
#### Tab completion
|
||||
|
||||
When built with optional GNU libreadline support, the interactive IOC shell
|
||||
will perform tab completion for command names as well as for some arguments
|
||||
@@ -126,14 +188,25 @@ using the new `iocshArgStringRecord` and `iocshArgStringPath` argument types.
|
||||
Both function identically to `iocshArgString` but indicate how to suggest
|
||||
completion strings.
|
||||
|
||||
Builds on macOS (darwin-x86 or darwin-aarch64 targets) normally use Apple's
|
||||
Builds on macOS (`darwin-x86` or `darwin-aarch64` targets) normally use Apple's
|
||||
libedit library in readline compatibility mode, which doesn't support the tab
|
||||
completion API that GNU readline provides. You can use Homebrew or some other
|
||||
third-party package manager to install the GNU readline package, then edit the
|
||||
configure/os/CONFIG_SITE.darwinCommon.darwinCommon file to have EPICS use the
|
||||
`configure/os/CONFIG_SITE.darwinCommon.darwinCommon` file to have EPICS use the
|
||||
real thing to get tab completion in the IOC shell. The default settings in that
|
||||
file currently look for and use a Homebrew-installed readline if present.
|
||||
|
||||
#### Persist history
|
||||
|
||||
Attempt to read and write command to a file (`./.iocsh_history` by default).
|
||||
Name may be overwritten with by setting `$EPICS_IOCSH_HISTFILE` to an
|
||||
alternate path, or disabled by setting to an empty string.
|
||||
|
||||
#### Changes to help output
|
||||
|
||||
Rework the `help` command output to improve formatting and readability,
|
||||
and include a visual marker (a line of underlines) between different help commands.
|
||||
|
||||
### Add FMOD as CALC Expression
|
||||
|
||||
The floating point modulo function `FMOD(NUM,DEN)` has been added to the CALC
|
||||
@@ -580,6 +653,33 @@ make INSTALL_LOCATION=/tmp/build FINAL_LOCATION=/usr/lib/epics
|
||||
`FINAL_LOCATION` is now correctly used in systemd and sysv init scripts
|
||||
`caRepeater.service`, `S99caRepeater`, and `S99logServer`.
|
||||
|
||||
### epicsEnvShow accepts glob pattern
|
||||
|
||||
The optional argument to epicsEnvShow can now be a glob pattern.
|
||||
|
||||
### New function `epicsStrnGlobMatch()`
|
||||
|
||||
The function `epicsStrnGlobMatch(char* str, size_t len, char* pattern)`
|
||||
works exactly the same as `epicsStrGlobMatch()` but takes an additional
|
||||
length arguments which limits the number of characters of `str` to match.
|
||||
|
||||
### Glob pattern allowed in `var` command
|
||||
|
||||
When used with one argument, the `var` command can be used with a glob pattern
|
||||
for printing matching variables.
|
||||
|
||||
### Fix for input links marked "special"
|
||||
|
||||
The calcout record (and a number of synApps record types) marks its input
|
||||
link fields with the attribute `special(SPC_MOD)` and provides code in
|
||||
the record's `special()` routine to reinitialize the related value field
|
||||
whenever the input link field is set to a numeric constant. Unfortunately the
|
||||
changes to the link handling code broke this behaviour (reported as Launchpad
|
||||
[bug #1824277](https://bugs.launchpad.net/epics-base/+bug/1824277))
|
||||
back in the Base 3.16.1 release. This issue has been fixed in Base, although
|
||||
external record types may require some fixing to ensure they are correctly
|
||||
checking for and initializing the link in their `special()` routine.
|
||||
|
||||
### IOCsh sets `${PWD}`
|
||||
|
||||
IOC shell will now ensure `${PWD}` is set on startup,
|
||||
@@ -669,6 +769,33 @@ that the variables referenced by output pointers are initialized.
|
||||
```
|
||||
|
||||
|
||||
### Timeouts for Unit Test Programs
|
||||
|
||||
The unit test programs that are run by the `make runtests` or `make tapfiles`
|
||||
commands get executed by a `.t` wrapper script which is normally generated by
|
||||
the EPICS `makeTestfile.pl` program. Those generated wrapper scripts now
|
||||
impose a time-limit on the test program they execute, and will kill it if it
|
||||
runs for longer than 500 seconds (8 minutes 20) without exiting. That
|
||||
time-limit can be changed for any such test by modifying the Makefile which
|
||||
creates and runs the `.t` wrapper script.
|
||||
|
||||
Setting the environment variable `EPICS_UNITTEST_TIMEOUT` to the desired
|
||||
number of seconds while the Makefile is generating the test script changes the
|
||||
timeout in that script. For example:
|
||||
|
||||
```
|
||||
TESTSCRIPTS_HOST += hourLongTest.t
|
||||
hourLongTest.t: export EPICS_UNITTEST_TIMEOUT=3600
|
||||
```
|
||||
|
||||
When selecting such a timeout remember that different Continuous Integration
|
||||
systems such as GitHub Actions and Appveyor run on processors with different
|
||||
speeds, so allow enough head-room for slower systems to complete the test.
|
||||
|
||||
Test programs written directly in Perl as a `.plt` script should implement a
|
||||
similar timeout for themselves. The "netget" test in Base does this in a way
|
||||
that works on Windows as well as Unix-like hosts.
|
||||
|
||||
### Timeouts for Unit Test Programs
|
||||
|
||||
The unit test programs that are run by the `make runtests` or `make tapfiles`
|
||||
|
||||
8
epics-base.sh
Normal file
8
epics-base.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
_OLD_EXTGLOB=$(shopt -p extglob)
|
||||
shopt -s extglob
|
||||
test -n "$EPICS_BASE" || export EPICS_BASE=$(ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/ | head -n1)
|
||||
test -n "$EPICS_HOST_ARCH" || export EPICS_HOST_ARCH=$(/bin/sed "s%cpe:/o:redhat:enterprise_linux:\([0-9]*\).*%RHEL\1-`/bin/uname -m`%" /etc/system-release-cpe)
|
||||
PATH=${PATH//\/usr\/local\/epics\/base-+([0-9]).+([0-9]).+([0-9])\/bin\/$EPICS_HOST_ARCH}:$(echo $(ls -dvr /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/$EPICS_HOST_ARCH) | tr ' ' :)
|
||||
eval $_OLD_EXTGLOB
|
||||
unset _OLD_EXTGLOB
|
||||
|
||||
385
epics-base.spec
Normal file
385
epics-base.spec
Normal file
@@ -0,0 +1,385 @@
|
||||
# Always make sure EpicsVersion.Version-Release matches the git tag!
|
||||
|
||||
%define EpicsVersion 7.0.7
|
||||
|
||||
Name: epics-base-%{EpicsVersion}
|
||||
Summary: EPICS Base %{EpicsVersion}
|
||||
Version: 1
|
||||
Release: 4%{?dist}
|
||||
License: EPICS Open License
|
||||
Group: Development/Languages
|
||||
URL: https://git.psi.ch/epics_base/base-7.0
|
||||
|
||||
Obsoletes: caRepeater
|
||||
|
||||
%define module_name %{name}
|
||||
%define prog_folder /usr/local/epics/base-%{EpicsVersion}
|
||||
|
||||
%define debug_package %{nil}
|
||||
|
||||
# do not strip libraries
|
||||
%global __strip /bin/true
|
||||
%undefine __brp_strip
|
||||
|
||||
%undefine __brp_mangle_shebangs
|
||||
%undefine __brp_ldconfig
|
||||
%define _binaries_in_noarch_packages_terminate_build 0
|
||||
|
||||
%if %{defined rhel}
|
||||
%global epics_host_arch RHEL%{rhel}-%{_host_cpu}
|
||||
%endif
|
||||
|
||||
%description
|
||||
EPICS is a set of Open Source software tools, libraries and applications
|
||||
developed collaboratively and used worldwide to create distributed soft
|
||||
real-time control systems for scientific instruments such as a particle
|
||||
accelerators, telescopes and other large scientific experiments.
|
||||
This RPM is a binary-only package.
|
||||
|
||||
###########################################
|
||||
|
||||
%package host-devel
|
||||
Requires: make >= 3.80
|
||||
BuildRequires: make >= 3.80
|
||||
|
||||
Summary: Minimal stuff needed to build EPICS host apps
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
# This EPICS installation uses the toolset 12 compiler
|
||||
%if 0%{?rhel} == 7
|
||||
Requires: devtoolset-12-gcc-c++
|
||||
BuildRequires: devtoolset-12-gcc-c++
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} >= 8
|
||||
Requires: gcc-toolset-12-gcc-c++
|
||||
BuildRequires: gcc-toolset-12-gcc-c++
|
||||
%endif
|
||||
|
||||
# The perl stuff we need
|
||||
Requires: perl-interpreter >= 5.10.1
|
||||
BuildRequires: perl-interpreter >= 5.10.1
|
||||
|
||||
%if 0%{?rhel} >= 7
|
||||
Requires: perl-File-Path perl-Getopt-Long perl-Pod-Usage perl-Time-HiRes perl-Data-Dumper perl-Scalar-List-Utils
|
||||
BuildRequires: perl-File-Path perl-Getopt-Long perl-Pod-Usage perl-Time-HiRes perl-Data-Dumper perl-Scalar-List-Utils
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} >= 8
|
||||
Requires: perl-Text-Tabs+Wrap
|
||||
BuildRequires: perl-Text-Tabs+Wrap
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} >= 9
|
||||
Requires: perl-File-Find perl-File-Basename perl-File-Copy perl-FindBin perl-Getopt-Std perl-POSIX
|
||||
BuildRequires: perl-File-Find perl-File-Basename perl-File-Copy perl-FindBin perl-Getopt-Std perl-POSIX
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} == 7
|
||||
# Perl auto-detection is broken
|
||||
# It does not find all EPICS internal packages
|
||||
%global __requires_exclude_from ^%{prog_folder}/bin/.*\\.pl$
|
||||
%endif
|
||||
|
||||
%description host-devel
|
||||
Contains headers etc to build EPICS host applications.
|
||||
|
||||
###########################################
|
||||
|
||||
%package compat
|
||||
Summary: EPICS base %{EpicsVersion} for other RHEL versions
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
AutoReqProv: no
|
||||
|
||||
%description compat
|
||||
Contains EPICS binaries that run on other RHEL versions.
|
||||
|
||||
###########################################
|
||||
|
||||
%package wine
|
||||
Summary: EPICS base %{EpicsVersion} for wine
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: wine
|
||||
BuildRequires: wine
|
||||
|
||||
%description wine
|
||||
Allows to run EPICS in wine.
|
||||
|
||||
###########################################
|
||||
|
||||
%package boot
|
||||
Summary: EPICS base %{EpicsVersion} for boot servers
|
||||
BuildArch: noarch
|
||||
AutoReqProv: no
|
||||
Prefix: /usr/local/epics
|
||||
|
||||
%description boot
|
||||
Contains files needed on NFS server to boot EPICS targets from.
|
||||
This package can be relocated.
|
||||
|
||||
###########################################
|
||||
|
||||
%package devel
|
||||
Summary: EPICS base %{EpicsVersion} for development environments
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name}-host-devel = %{version}-%{release}
|
||||
Requires: %{name}-boot = %{version}-%{release}
|
||||
Requires: gfa-cross-compiler-links
|
||||
BuildArch: noarch
|
||||
AutoReqProv: no
|
||||
|
||||
%description devel
|
||||
All what is needed to develop EPICS for different target architectures.
|
||||
|
||||
###########################################
|
||||
|
||||
%package devel-static
|
||||
Summary: EPICS base %{EpicsVersion} for development environments including static libraries
|
||||
Requires: %{name}-devel = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
AutoReqProv: no
|
||||
|
||||
%description devel-static
|
||||
Contains the static libraries (*.a) for EPICS development systems.
|
||||
Only needed to build statically linked applications.
|
||||
|
||||
###########################################
|
||||
|
||||
%package src
|
||||
Summary: Sources code of EPICS base %{EpicsVersion}
|
||||
BuildArch: noarch
|
||||
AutoReqProv: no
|
||||
Prefix: /usr/local/epics
|
||||
|
||||
%description src
|
||||
The source code of EPICS base %{EpicsVersion}.
|
||||
May help when debugging
|
||||
|
||||
###########################################
|
||||
|
||||
%package doc
|
||||
Summary: EPICS base %{EpicsVersion} documentation
|
||||
BuildArch: noarch
|
||||
AutoReqProv: no
|
||||
Prefix: /usr/local/epics
|
||||
|
||||
%description doc
|
||||
The documentation of EPICS base %{EpicsVersion}.
|
||||
|
||||
###########################################
|
||||
|
||||
# Our sources are locally in this directory
|
||||
# and here we also build
|
||||
# RPMS and SRPMS will be stored here, too
|
||||
%define _topdir %(pwd)
|
||||
%define _sourcedir %{_topdir}
|
||||
%define _builddir %{_topdir}
|
||||
|
||||
%prep
|
||||
%{__rm} -rf %{buildroot}/usr/lib
|
||||
%{__rm} -f modules/RELEASE.*.local
|
||||
git submodule update --init modules
|
||||
%{__mkdir_p} RPMS
|
||||
|
||||
%build
|
||||
%if %{defined epics_host_arch}
|
||||
export EPICS_HOST_ARCH=%{epics_host_arch}
|
||||
%endif
|
||||
%{__make} -j $RPM_BUILD_NCPUS INSTALL_LOCATION=%{buildroot}/%{prog_folder} FINAL_LOCATION=%{prog_folder}
|
||||
%{__make} INSTALL_LOCATION=%{buildroot}/%{prog_folder} copysrc
|
||||
|
||||
# remove files we do not need
|
||||
shopt -s extglob
|
||||
%{__rm} -f %{buildroot}/%{prog_folder}/bin/{V,RTEMS}*/{*Harness,softIoc,softIocPVA}
|
||||
%{__rm} -f %{buildroot}/%{prog_folder}/bin/RTEMS*/TEMP.*
|
||||
|
||||
# install the profile script
|
||||
%{__install} epics-base.sh %{buildroot}/%{prog_folder}/bin
|
||||
|
||||
# Do not use install section because build already installed
|
||||
# and install will delete our buildroot!
|
||||
|
||||
%clean
|
||||
%{__make} realclean
|
||||
%{__rm} -f modules/RELEASE.*.local
|
||||
|
||||
# Link caRepeater and profile script to highest installed EPICS version after install and uninstall
|
||||
%post
|
||||
shopt -s extglob
|
||||
|
||||
if [ -e /etc/profile.d/epics-base.sh ]
|
||||
then
|
||||
%{__rm} -f /etc/profile.d/epics-base.sh
|
||||
fi
|
||||
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/epics-base.sh | /usr/bin/head -n1)" /etc/profile.d/
|
||||
|
||||
SYSTEMD_DIR=$(pkg-config systemd --variable=systemdsystemunitdir)
|
||||
if [ -n "$SYSTEMD_DIR" ]
|
||||
then
|
||||
systemctl is-enabled caRepeater.service 2>/dev/null && systemctl disable --now caRepeater.service
|
||||
test -e $SYSTEMD_DIR/caRepeater.service && %{__rm} $SYSTEMD_DIR/caRepeater.service
|
||||
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/%{epics_host_arch}/caRepeater.service | /usr/bin/head -n1)" $SYSTEMD_DIR/
|
||||
systemctl daemon-reload
|
||||
killall caRepeater 2>/dev/null
|
||||
systemctl enable --now caRepeater.service
|
||||
fi
|
||||
|
||||
%postun
|
||||
shopt -s extglob
|
||||
|
||||
if [ -e /etc/profile.d/epics-base.sh ]
|
||||
then
|
||||
%{__rm} -f /etc/profile.d/epics-base.sh
|
||||
fi
|
||||
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/epics-base.sh 2>/dev/null | /usr/bin/head -n1)" /etc/profile.d/ 2>/dev/null
|
||||
|
||||
SYSTEMD_DIR=$(pkg-config systemd --variable=systemdsystemunitdir)
|
||||
if [ -n "$SYSTEMD_DIR" ]
|
||||
then
|
||||
systemctl disable --now caRepeater.service
|
||||
%{__rm} -f $SYSTEMD_DIR/caRepeater.service
|
||||
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/%{epics_host_arch}/caRepeater.service 2>/dev/null | /usr/bin/head -n1)" $SYSTEMD_DIR/ 2>/dev/null
|
||||
systemctl daemon-reload
|
||||
if [ -e $SYSTEMD_DIR/caRepeater.service ]
|
||||
then
|
||||
killall caRepeater 2>/dev/null
|
||||
systemctl enable --now caRepeater.service
|
||||
fi
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{prog_folder}
|
||||
%dir %{prog_folder}/configure
|
||||
%{prog_folder}/configure/CONFIG_BASE_VERSION
|
||||
|
||||
%dir %{prog_folder}/dbd
|
||||
%{prog_folder}/dbd/softIoc*.dbd
|
||||
|
||||
%dir %{prog_folder}/bin
|
||||
%dir %{prog_folder}/lib
|
||||
%{prog_folder}/db
|
||||
|
||||
%{prog_folder}/bin/epics-base.sh
|
||||
|
||||
# Install host binaries but avoid installing *.pl scripts
|
||||
# and other development tools
|
||||
|
||||
%if %{defined rhel}
|
||||
%dir %{prog_folder}/bin/RHEL%{rhel}*
|
||||
%{prog_folder}/bin/RHEL%{rhel}*/[Scips]*[^.]??
|
||||
%{prog_folder}/bin/RHEL%{rhel}*/p2p
|
||||
%{prog_folder}/bin/RHEL%{rhel}*/msi
|
||||
%dir %{prog_folder}/lib/RHEL%{rhel}*
|
||||
%{prog_folder}/lib/RHEL%{rhel}*/*.so*
|
||||
%endif
|
||||
|
||||
###########################################
|
||||
|
||||
%files compat
|
||||
%if %{?rhel} > 7
|
||||
%{prog_folder}/bin/RHEL7*
|
||||
%dir %{prog_folder}/lib/RHEL7*
|
||||
%{prog_folder}/lib/RHEL7*/*.so*
|
||||
%endif
|
||||
|
||||
%if %{?rhel} > 8
|
||||
%{prog_folder}/bin/RHEL8*
|
||||
%dir %{prog_folder}/lib/RHEL8*
|
||||
%{prog_folder}/lib/RHEL8*/*.so*
|
||||
%endif
|
||||
|
||||
%if %{?rhel} > 9
|
||||
%{prog_folder}/bin/RHEL9*
|
||||
%dir %{prog_folder}/lib/RHEL9*
|
||||
%{prog_folder}/lib/RHEL9*/*.so*
|
||||
%endif
|
||||
|
||||
###########################################
|
||||
|
||||
%files wine
|
||||
%{prog_folder}/bin/win*
|
||||
|
||||
###########################################
|
||||
|
||||
%files boot
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{prog_folder}/configure
|
||||
%{prog_folder}/configure/CONFIG_BASE_VERSION
|
||||
|
||||
%dir %{prog_folder}/dbd
|
||||
%{prog_folder}/dbd/softIoc*.dbd
|
||||
%{prog_folder}/db
|
||||
|
||||
%dir %{prog_folder}/lib
|
||||
# avoid pulling in pkgconfig and perl
|
||||
%dir %{prog_folder}/lib/[a-z]*-*
|
||||
%{prog_folder}/lib/[a-z]*-*/*.so*
|
||||
|
||||
%dir %{prog_folder}/bin
|
||||
# avoid pulling in host files again
|
||||
# but get all cross architectures (mostly lower case)
|
||||
# including all Windows dlls (hence listed twice: here and in wine)
|
||||
%dir %{prog_folder}/bin/[a-z]*
|
||||
%{prog_folder}/bin/[a-z]*/[Scips]*[^.]??
|
||||
%{prog_folder}/bin/[a-z]*/msi*
|
||||
%{prog_folder}/bin/[a-z]*/*.dll
|
||||
|
||||
# vxWorks and RTEMS
|
||||
%dir %{prog_folder}/bin/V*
|
||||
%{prog_folder}/bin/V*/*.munch
|
||||
%{prog_folder}/bin/V*/*.o
|
||||
%dir %{prog_folder}/bin/RTEMS*
|
||||
%{prog_folder}/bin/RTEMS*/*.boot
|
||||
|
||||
###########################################
|
||||
|
||||
%files host-devel
|
||||
%defattr(-,root,root,-)
|
||||
%{prog_folder}/configure
|
||||
%{prog_folder}/cfg
|
||||
%{prog_folder}/include
|
||||
%{prog_folder}/templates
|
||||
%if %{defined rhel}
|
||||
%{prog_folder}/bin/RHEL%{rhel}*/[^Scips]*[^.]??
|
||||
%{prog_folder}/bin/RHEL%{rhel}*/*.??
|
||||
%endif
|
||||
%{prog_folder}/lib/pkgconfig
|
||||
%{prog_folder}/lib/perl
|
||||
%{prog_folder}/lib/win*
|
||||
%{prog_folder}/lib/RTEMS*
|
||||
%{prog_folder}/dbd
|
||||
|
||||
###########################################
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
%{prog_folder}/bin/[a-z]*/[^Scips]*[^.]??
|
||||
|
||||
# VxWorks and RTEMS need static libs
|
||||
%{prog_folder}/lib/V*
|
||||
|
||||
###########################################
|
||||
|
||||
%files devel-static
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
# Install bulky static libs for Linux targets only on request
|
||||
%{prog_folder}/lib/RHEL*/*.a
|
||||
%{prog_folder}/lib/[a-z]*/*.a
|
||||
|
||||
###########################################
|
||||
|
||||
%files src
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{prog_folder}
|
||||
%{prog_folder}/modules
|
||||
|
||||
###########################################
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{prog_folder}
|
||||
%docdir %{prog_folder}/html
|
||||
%{prog_folder}/html
|
||||
@@ -37,6 +37,9 @@ pva2pva_DEPEND_DIRS = pvAccess
|
||||
SUBMODULES += example
|
||||
example_DEPEND_DIRS = pva2pva pvaClient
|
||||
|
||||
SUBMODULES += pcas
|
||||
pcas_DEPEND_DIRS = ca
|
||||
|
||||
# Allow sites to add extra submodules
|
||||
-include Makefile.local
|
||||
|
||||
|
||||
@@ -549,7 +549,7 @@ void epicsStdCall caRepeaterRegistrationMessage (
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString (
|
||||
sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
fprintf ( stderr, "error sending registration message to CA repeater daemon was \"%s\"\n",
|
||||
fprintf ( stderr, ERL_ERROR " sending registration message to CA repeater daemon was \"%s\"\n",
|
||||
sockErrBuf );
|
||||
}
|
||||
}
|
||||
@@ -813,13 +813,13 @@ bool udpiiu::exceptionRespAction (
|
||||
|
||||
if ( msg.m_postsize > sizeof ( caHdr ) ){
|
||||
errlogPrintf (
|
||||
"error condition \"%s\" detected by %s with context \"%s\" at %s\n",
|
||||
ERL_ERROR " condition \"%s\" detected by %s with context \"%s\" at %s\n",
|
||||
ca_message ( msg.m_available ),
|
||||
name, reinterpret_cast <const char *> ( &reqMsg + 1 ), date );
|
||||
}
|
||||
else{
|
||||
errlogPrintf (
|
||||
"error condition \"%s\" detected by %s at %s\n",
|
||||
ERL_ERROR " condition \"%s\" detected by %s at %s\n",
|
||||
ca_message ( msg.m_available ), name, date );
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <epicsStdlib.h>
|
||||
|
||||
#include <cadef.h>
|
||||
#include <errlog.h>
|
||||
#include <epicsGetopt.h>
|
||||
#include <epicsEvent.h>
|
||||
#include <epicsString.h>
|
||||
@@ -549,7 +550,7 @@ int main (int argc, char *argv[])
|
||||
result = ca_array_put (dbrType, count, pvs[0].chid, pbuf);
|
||||
}
|
||||
if (result != ECA_NORMAL) {
|
||||
fprintf(stderr, "Error from put operation: %s\n", ca_message(result));
|
||||
fprintf(stderr, ERL_ERROR " from put operation: %s\n", ca_message(result));
|
||||
free(sbuf); free(dbuf); free(ebuf);
|
||||
return 1;
|
||||
}
|
||||
@@ -570,7 +571,7 @@ int main (int argc, char *argv[])
|
||||
}
|
||||
|
||||
if (result != ECA_NORMAL) {
|
||||
fprintf(stderr, "Error occured writing data: %s\n", ca_message(result));
|
||||
fprintf(stderr, ERL_ERROR " occured writing data: %s\n", ca_message(result));
|
||||
free(sbuf); free(dbuf); free(ebuf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#include "dbDefs.h"
|
||||
#include "errlog.h"
|
||||
#include "ellLib.h"
|
||||
#include "cvtTable.h"
|
||||
|
||||
@@ -125,12 +126,12 @@ int main(int argc, char **argv)
|
||||
}
|
||||
inFile = fopen(argv[1],"r");
|
||||
if(!inFile) {
|
||||
fprintf(stderr,"Error opening %s\n",argv[1]);
|
||||
fprintf(stderr,ERL_ERROR " opening %s\n",argv[1]);
|
||||
exit(-1);
|
||||
}
|
||||
outFile = fopen(outFilename,"w");
|
||||
if(!outFile) {
|
||||
fprintf(stderr,"Error opening %s\n",outFilename);
|
||||
fprintf(stderr,ERL_ERROR " opening %s\n",outFilename);
|
||||
exit(-1);
|
||||
}
|
||||
while(fgets(inbuf,MAX_LINE_SIZE,inFile)) {
|
||||
|
||||
@@ -42,6 +42,7 @@ INC += dbState.h
|
||||
INC += db_access_routines.h
|
||||
INC += db_convert.h
|
||||
INC += dbUnitTest.h
|
||||
INC += dbCaPvt.h
|
||||
|
||||
# Generate menuGlobal.dbd, not really by concatenation, see RULES
|
||||
DBDCAT += menuGlobal.dbd
|
||||
|
||||
@@ -344,6 +344,10 @@ int callbackRequest(epicsCallback *pcallback)
|
||||
epicsInterruptContextMessage("callbackRequest: " ERL_ERROR " pcallback was NULL\n");
|
||||
return S_db_notInit;
|
||||
}
|
||||
if (!pcallback->callback) {
|
||||
epicsInterruptContextMessage("callbackRequest: " ERL_ERROR " pcallback->callback was NULL\n");
|
||||
return S_db_notInit;
|
||||
}
|
||||
priority = pcallback->priority;
|
||||
if (priority < 0 || priority >= NUM_CALLBACK_PRIORITIES) {
|
||||
epicsInterruptContextMessage("callbackRequest: " ERL_ERROR " Bad priority\n");
|
||||
|
||||
@@ -798,18 +798,13 @@ int dbLoadRecords(const char* file, const char* subs)
|
||||
return -1;
|
||||
}
|
||||
status = dbReadDatabase(&pdbbase, file, 0, subs);
|
||||
switch(status)
|
||||
{
|
||||
case 0:
|
||||
if(status==0) {
|
||||
if(dbLoadRecordsHook)
|
||||
dbLoadRecordsHook(file, subs);
|
||||
break;
|
||||
case -2:
|
||||
errlogPrintf("dbLoadRecords: failed to load '%s'\n"
|
||||
" Records cannot be loaded after iocInit!\n", file);
|
||||
break;
|
||||
default:
|
||||
errlogPrintf("dbLoadRecords: failed to load '%s'\n", file);
|
||||
} else {
|
||||
fprintf(stderr, ERL_ERROR " failed to load '%s'\n", file);
|
||||
if(status==-2)
|
||||
fprintf(stderr, " Records cannot be loaded after iocInit!\n");
|
||||
}
|
||||
return status;
|
||||
}
|
||||
@@ -1177,7 +1172,44 @@ static long dbPutFieldLink(DBADDR *paddr,
|
||||
|
||||
if (!status) status = dbSetLink(plink, &link_info, new_devsup);
|
||||
|
||||
if (!status && special) status = dbPutSpecial(paddr, 1);
|
||||
if (status) {
|
||||
if (isDevLink) {
|
||||
precord->dset = NULL;
|
||||
precord->pact = TRUE;
|
||||
}
|
||||
goto postScanEvent;
|
||||
}
|
||||
|
||||
/* We need to initialize any links with a link support layer, i.e.
|
||||
* any CONSTANT, JSON_LINK, or PV_LINK types. However for a PV_LINK
|
||||
* when isDevLink is set (i.e. this is the record's INP or OUT link)
|
||||
* we must wait until after calling dsxt->add_record(). This allows
|
||||
* the Async Soft Channel input supports to change it to a PN_LINK.
|
||||
* For other cases we initialize the link before the second call to
|
||||
* dbPutSpecial() because some record types such as calcout need to
|
||||
* be able to call link support methods from prset->special().
|
||||
*/
|
||||
|
||||
switch (plink->type) { /* New type */
|
||||
case PV_LINK:
|
||||
if (isDevLink)
|
||||
break;
|
||||
/* else fall through */
|
||||
case CONSTANT:
|
||||
case JSON_LINK:
|
||||
dbAddLink(&locker, plink, pfldDes->field_type, chan);
|
||||
chan = NULL; /* we used it, don't clean it up */
|
||||
}
|
||||
|
||||
if (special) status = dbPutSpecial(paddr, 1);
|
||||
|
||||
if (!status && isDevLink) {
|
||||
precord->dpvt = NULL;
|
||||
precord->dset = new_dset;
|
||||
precord->pact = FALSE;
|
||||
|
||||
status = new_dsxt->add_record(precord);
|
||||
}
|
||||
|
||||
if (status) {
|
||||
if (isDevLink) {
|
||||
@@ -1187,29 +1219,21 @@ static long dbPutFieldLink(DBADDR *paddr,
|
||||
goto postScanEvent;
|
||||
}
|
||||
|
||||
if (isDevLink) {
|
||||
precord->dpvt = NULL;
|
||||
precord->dset = new_dset;
|
||||
precord->pact = FALSE;
|
||||
|
||||
status = new_dsxt->add_record(precord);
|
||||
if (status) {
|
||||
precord->dset = NULL;
|
||||
precord->pact = TRUE;
|
||||
goto postScanEvent;
|
||||
}
|
||||
}
|
||||
|
||||
switch (plink->type) { /* New link type */
|
||||
case PV_LINK:
|
||||
case CONSTANT:
|
||||
case CA_LINK:
|
||||
case DB_LINK:
|
||||
case PN_LINK:
|
||||
case JSON_LINK:
|
||||
dbAddLink(&locker, plink, pfldDes->field_type, chan);
|
||||
chan = NULL; /* don't clean it up */
|
||||
break;
|
||||
|
||||
case DB_LINK:
|
||||
case CA_LINK:
|
||||
case PV_LINK:
|
||||
if (isDevLink) {
|
||||
dbAddLink(&locker, plink, pfldDes->field_type, chan);
|
||||
chan = NULL; /* we used it, don't clean it up */
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_LINK:
|
||||
break; /* should never get here */
|
||||
|
||||
@@ -1218,7 +1242,6 @@ static long dbPutFieldLink(DBADDR *paddr,
|
||||
status = S_db_badHWaddr;
|
||||
goto postScanEvent;
|
||||
}
|
||||
break;
|
||||
}
|
||||
db_post_events(precord, plink, DBE_VALUE | DBE_LOG);
|
||||
|
||||
|
||||
@@ -41,20 +41,35 @@ extern "C" {
|
||||
/**
|
||||
* event subscription
|
||||
*/
|
||||
typedef struct evSubscrip {
|
||||
struct evSubscrip;
|
||||
|
||||
typedef struct evSubscrip evSubscrip;
|
||||
|
||||
#ifdef EPICS_PRIVATE_API
|
||||
struct evSubscrip {
|
||||
ELLNODE node;
|
||||
struct dbChannel * chan;
|
||||
/* user_sub==NULL used to indicate db_cancel_event() */
|
||||
EVENTFUNC * user_sub;
|
||||
void * user_arg;
|
||||
/* associated queue, may be shared with other evSubscrip */
|
||||
struct event_que * ev_que;
|
||||
/* NULL if !npend. if npend!=0, pointer to last event added to event_que::valque */
|
||||
db_field_log ** pLastLog;
|
||||
unsigned long npend; /**< n times this event is on the queue */
|
||||
unsigned long nreplace; /**< n times replacing event on the queue */
|
||||
/* n times this event is on the queue */
|
||||
unsigned long npend;
|
||||
/* n times replacing event on the queue */
|
||||
unsigned long nreplace;
|
||||
/* DBE mask */
|
||||
unsigned char select;
|
||||
/* if set, subscription will yield dbfl_type_val */
|
||||
char useValque;
|
||||
/* event_task is handling this subscription */
|
||||
char callBackInProgress;
|
||||
/* this node added to dbCommon::mlis */
|
||||
char enabled;
|
||||
} evSubscrip;
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef struct chFilter chFilter;
|
||||
|
||||
|
||||
@@ -240,6 +240,7 @@ The B<SPVT> field is for internal use by the scanning system.
|
||||
}
|
||||
field(PROC,DBF_UCHAR) {
|
||||
prompt("Force Processing")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
interest(3)
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ typedef struct parseContext {
|
||||
short dbrType;
|
||||
short dbrSize;
|
||||
char *pdest;
|
||||
int elems;
|
||||
size_t elems;
|
||||
} parseContext;
|
||||
|
||||
static int dbcj_null(void *ctx) {
|
||||
@@ -64,19 +64,20 @@ static int dbcj_double(void *ctx, double num) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dblsj_number(void *ctx, const char *val, size_t len) {
|
||||
errlogPrintf("dbLSConvertJSON: Numeric value %.*s provided, string expected\n",
|
||||
(int)len, val);
|
||||
return 0; /* Illegal */
|
||||
}
|
||||
|
||||
static int dbcj_string(void *ctx, const unsigned char *val, size_t len) {
|
||||
parseContext *parser = (parseContext *) ctx;
|
||||
char *pdest = parser->pdest;
|
||||
|
||||
/* Not attempting to handle char-array fields here, they need more
|
||||
* metadata about the field than we have available at the moment.
|
||||
*/
|
||||
if (parser->dbrType == DBF_CHAR || parser->dbrType == DBF_UCHAR) {
|
||||
/* Treating char array as long string */
|
||||
if (len > parser->elems)
|
||||
len = parser->elems;
|
||||
strncpy(pdest, (const char *) val, len);
|
||||
parser->elems -= len;
|
||||
parser->pdest += len;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (parser->dbrType != DBF_STRING) {
|
||||
errlogPrintf("dbConvertJSON: String \"%.*s\" provided, numeric value expected\n",
|
||||
(int)len, val);
|
||||
@@ -94,21 +95,6 @@ static int dbcj_string(void *ctx, const unsigned char *val, size_t len) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dblsj_string(void *ctx, const unsigned char *val, size_t len) {
|
||||
parseContext *parser = (parseContext *) ctx;
|
||||
char *pdest = parser->pdest;
|
||||
|
||||
if (parser->elems > 0) {
|
||||
if (len > parser->dbrSize - 1)
|
||||
len = parser->dbrSize - 1;
|
||||
strncpy(pdest, (const char *) val, len);
|
||||
pdest[len] = 0;
|
||||
parser->pdest = pdest + len;
|
||||
parser->elems = 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dbcj_start_map(void *ctx) {
|
||||
errlogPrintf("dbConvertJSON: Map type not supported\n");
|
||||
return 0; /* Illegal */
|
||||
@@ -148,6 +134,11 @@ long dbPutConvertJSON(const char *json, short dbrType,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!jlen) {
|
||||
*pnRequest = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
parser->depth = 0;
|
||||
parser->dbrType = dbrType;
|
||||
parser->dbrSize = dbValueSize(dbrType);
|
||||
@@ -183,20 +174,10 @@ long dbPutConvertJSON(const char *json, short dbrType,
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
static yajl_callbacks dblsj_callbacks = {
|
||||
dbcj_null, dbcj_boolean, NULL, NULL, dblsj_number, dblsj_string,
|
||||
dbcj_start_map, NULL, NULL,
|
||||
dbcj_start_array, NULL
|
||||
};
|
||||
|
||||
long dbLSConvertJSON(const char *json, char *pdest, epicsUInt32 size,
|
||||
epicsUInt32 *plen)
|
||||
{
|
||||
parseContext context, *parser = &context;
|
||||
yajl_handle yh;
|
||||
yajl_status ys;
|
||||
size_t jlen = strlen(json);
|
||||
long nRequest = size-1;
|
||||
long status;
|
||||
|
||||
if (!size) {
|
||||
@@ -204,35 +185,8 @@ long dbLSConvertJSON(const char *json, char *pdest, epicsUInt32 size,
|
||||
return 0;
|
||||
}
|
||||
|
||||
parser->depth = 0;
|
||||
parser->dbrType = DBF_STRING;
|
||||
parser->dbrSize = size;
|
||||
parser->pdest = pdest;
|
||||
parser->elems = 1;
|
||||
|
||||
yh = yajl_alloc(&dblsj_callbacks, NULL, parser);
|
||||
if (!yh) {
|
||||
errlogPrintf("dbLSConvertJSON: out of memory\n");
|
||||
return S_db_noMemory;
|
||||
}
|
||||
|
||||
ys = yajl_parse(yh, (const unsigned char *) json, jlen);
|
||||
|
||||
switch (ys) {
|
||||
case yajl_status_ok:
|
||||
*plen = (char *) parser->pdest - pdest + 1;
|
||||
status = 0;
|
||||
break;
|
||||
|
||||
default: {
|
||||
unsigned char *err = yajl_get_error(yh, 1,
|
||||
(const unsigned char *) json, jlen);
|
||||
errlogPrintf("dbLSConvertJSON: %s", err);
|
||||
yajl_free_error(yh, err);
|
||||
status = S_db_badField;
|
||||
}
|
||||
}
|
||||
|
||||
yajl_free(yh);
|
||||
status = dbPutConvertJSON(json, DBF_CHAR, pdest, &nRequest);
|
||||
pdest[nRequest++] = 0;
|
||||
*plen = nRequest;
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* Ralph Lange <Ralph.Lange@bessy.de>
|
||||
*/
|
||||
|
||||
#define EPICS_PRIVATE_API
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -75,23 +76,23 @@ struct event_que {
|
||||
unsigned short getix;
|
||||
unsigned short quota; /* the number of assigned entries*/
|
||||
unsigned short nDuplicates; /* N events duplicated on this q */
|
||||
unsigned short nCanceled; /* the number of canceled entries */
|
||||
unsigned possibleStall;
|
||||
};
|
||||
|
||||
struct event_user {
|
||||
struct event_que firstque; /* the first event que */
|
||||
|
||||
ELLLIST waiters; /* event_waiter::node */
|
||||
|
||||
epicsMutexId lock;
|
||||
epicsEventId ppendsem; /* Wait while empty */
|
||||
epicsEventId pflush_sem; /* wait for flush */
|
||||
epicsEventId pexitsem; /* wait for event task to join */
|
||||
|
||||
EXTRALABORFUNC *extralabor_sub;/* off load to event task */
|
||||
void *extralabor_arg;/* parameter to above */
|
||||
|
||||
epicsThreadId taskid; /* event handler task id */
|
||||
struct evSubscrip *pSuicideEvent; /* event that is deleting itself */
|
||||
epicsUInt32 pflush_seq; /* worker cycle count for synchronization */
|
||||
unsigned queovr; /* event que overflow count */
|
||||
unsigned char pendexit; /* exit pend task */
|
||||
unsigned char extra_labor; /* if set call extra labor func */
|
||||
@@ -101,6 +102,11 @@ struct event_user {
|
||||
epicsThreadId init_func_arg;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
ELLNODE node; /* event_user::waiters */
|
||||
epicsEventId wake;
|
||||
} event_waiter;
|
||||
|
||||
/*
|
||||
* Reliable intertask communication requires copying the current value of the
|
||||
* channel for later queuing so 3 stepper motor steps of 10 each do not turn
|
||||
@@ -122,10 +128,9 @@ static void *dbevFieldLogFreeList;
|
||||
|
||||
static char *EVENT_PEND_NAME = "eventTask";
|
||||
|
||||
static struct evSubscrip canceledEvent;
|
||||
|
||||
static epicsMutexId stopSync;
|
||||
|
||||
/* unused space in queue (EVENTQUESIZE when empty) */
|
||||
static unsigned short ringSpace ( const struct event_que *pevq )
|
||||
{
|
||||
if ( pevq->evque[pevq->putix] == EVENTQEMPTY ) {
|
||||
@@ -139,17 +144,11 @@ static unsigned short ringSpace ( const struct event_que *pevq )
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* db_event_list ()
|
||||
*/
|
||||
int db_event_list ( const char *pname, unsigned level )
|
||||
{
|
||||
return dbel ( pname, level );
|
||||
}
|
||||
|
||||
/*
|
||||
* dbel ()
|
||||
*/
|
||||
int dbel ( const char *pname, unsigned level )
|
||||
{
|
||||
DBADDR addr;
|
||||
@@ -217,7 +216,6 @@ int dbel ( const char *pname, unsigned level )
|
||||
|
||||
if ( level > 2 ) {
|
||||
unsigned nDuplicates;
|
||||
unsigned nCanceled;
|
||||
if ( pevent->nreplace ) {
|
||||
printf (", discarded by replacement=%ld", pevent->nreplace);
|
||||
}
|
||||
@@ -226,14 +224,10 @@ int dbel ( const char *pname, unsigned level )
|
||||
}
|
||||
LOCKEVQUE(pevent->ev_que);
|
||||
nDuplicates = pevent->ev_que->nDuplicates;
|
||||
nCanceled = pevent->ev_que->nCanceled;
|
||||
UNLOCKEVQUE(pevent->ev_que);
|
||||
if ( nDuplicates ) {
|
||||
printf (", duplicate count =%u\n", nDuplicates );
|
||||
}
|
||||
if ( nCanceled ) {
|
||||
printf (", canceled count =%u\n", nCanceled );
|
||||
}
|
||||
}
|
||||
|
||||
if ( level > 3 ) {
|
||||
@@ -318,9 +312,6 @@ dbEventCtx db_init_events (void)
|
||||
evUser->ppendsem = epicsEventCreate(epicsEventEmpty);
|
||||
if (!evUser->ppendsem)
|
||||
goto fail;
|
||||
evUser->pflush_sem = epicsEventCreate(epicsEventEmpty);
|
||||
if (!evUser->pflush_sem)
|
||||
goto fail;
|
||||
evUser->lock = epicsMutexCreate();
|
||||
if (!evUser->lock)
|
||||
goto fail;
|
||||
@@ -330,7 +321,6 @@ dbEventCtx db_init_events (void)
|
||||
|
||||
evUser->flowCtrlMode = FALSE;
|
||||
evUser->extraLaborBusy = FALSE;
|
||||
evUser->pSuicideEvent = NULL;
|
||||
return (dbEventCtx) evUser;
|
||||
fail:
|
||||
if(evUser->lock)
|
||||
@@ -339,8 +329,6 @@ fail:
|
||||
epicsMutexDestroy (evUser->firstque.writelock);
|
||||
if(evUser->ppendsem)
|
||||
epicsEventDestroy (evUser->ppendsem);
|
||||
if(evUser->pflush_sem)
|
||||
epicsEventDestroy (evUser->pflush_sem);
|
||||
if(evUser->pexitsem)
|
||||
epicsEventDestroy (evUser->pexitsem);
|
||||
freeListFree(dbevEventUserFreeList,evUser);
|
||||
@@ -404,7 +392,6 @@ void db_close_events (dbEventCtx ctx)
|
||||
|
||||
epicsEventDestroy(evUser->pexitsem);
|
||||
epicsEventDestroy(evUser->ppendsem);
|
||||
epicsEventDestroy(evUser->pflush_sem);
|
||||
epicsMutexDestroy(evUser->lock);
|
||||
|
||||
epicsMutexUnlock (stopSync);
|
||||
@@ -461,8 +448,7 @@ dbEventSubscription db_add_event (
|
||||
while ( TRUE ) {
|
||||
int success = 0;
|
||||
LOCKEVQUE ( ev_que );
|
||||
success = ( ev_que->quota + ev_que->nCanceled <
|
||||
EVENTQUESIZE - EVENTENTRIES );
|
||||
success = ( ev_que->quota < EVENTQUESIZE - EVENTENTRIES );
|
||||
if ( success ) {
|
||||
ev_que->quota += EVENTENTRIES;
|
||||
}
|
||||
@@ -579,62 +565,62 @@ static void event_remove ( struct event_que *ev_que,
|
||||
void db_cancel_event (dbEventSubscription event)
|
||||
{
|
||||
struct evSubscrip * const pevent = (struct evSubscrip *) event;
|
||||
unsigned short getix;
|
||||
struct event_que *que = pevent->ev_que;
|
||||
char sync = 0;
|
||||
|
||||
db_event_disable ( event );
|
||||
|
||||
/*
|
||||
* flag the event as canceled by NULLing out the callback handler
|
||||
*
|
||||
* make certain that the event isn't being accessed while
|
||||
* its call back changes
|
||||
*/
|
||||
LOCKEVQUE (pevent->ev_que);
|
||||
LOCKEVQUE (que);
|
||||
|
||||
pevent->user_sub = NULL;
|
||||
pevent->user_sub = NULL; /* callback pointer doubles as canceled flag */
|
||||
|
||||
/*
|
||||
* purge this event from the queue
|
||||
*
|
||||
* Its better to take this approach rather than waiting
|
||||
* for the event thread to finish removing this event
|
||||
* from the queue because the event thread will not
|
||||
* process if we are in flow control mode. Since blocking
|
||||
* here will block CA's TCP input queue then a dead lock
|
||||
* would be possible.
|
||||
*/
|
||||
for ( getix = pevent->ev_que->getix;
|
||||
pevent->ev_que->evque[getix] != EVENTQEMPTY; ) {
|
||||
if ( pevent->ev_que->evque[getix] == pevent ) {
|
||||
assert ( pevent->ev_que->nCanceled < USHRT_MAX );
|
||||
pevent->ev_que->nCanceled++;
|
||||
event_remove ( pevent->ev_que, getix, &canceledEvent );
|
||||
}
|
||||
getix = RNGINC ( getix );
|
||||
if ( getix == pevent->ev_que->getix ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert ( pevent->npend == 0u );
|
||||
if(pevent->callBackInProgress) {
|
||||
/* this event callback is pending or in-progress in event_task. */
|
||||
if(pevent->ev_que->evUser->taskid != epicsThreadGetIdSelf())
|
||||
sync = 1; /* concurrent to event_task, so wait */
|
||||
|
||||
if ( pevent->ev_que->evUser->taskid == epicsThreadGetIdSelf() ) {
|
||||
pevent->ev_que->evUser->pSuicideEvent = pevent;
|
||||
}
|
||||
else {
|
||||
while ( pevent->callBackInProgress ) {
|
||||
UNLOCKEVQUE (pevent->ev_que);
|
||||
epicsEventMustWait ( pevent->ev_que->evUser->pflush_sem );
|
||||
LOCKEVQUE (pevent->ev_que);
|
||||
}
|
||||
} else if(pevent->npend) {
|
||||
/* some (now defunct) events in the queue, defer free() to event_task */
|
||||
|
||||
} else {
|
||||
/* no other references, cleanup now */
|
||||
|
||||
pevent->ev_que->quota -= EVENTENTRIES;
|
||||
freeListFree ( dbevEventSubscriptionFreeList, pevent );
|
||||
}
|
||||
|
||||
pevent->ev_que->quota -= EVENTENTRIES;
|
||||
UNLOCKEVQUE (que);
|
||||
|
||||
UNLOCKEVQUE (pevent->ev_que);
|
||||
if(sync) {
|
||||
/* cycle through worker */
|
||||
struct event_user *evUser = que->evUser;
|
||||
epicsUInt32 curSeq;
|
||||
event_waiter wait;
|
||||
wait.wake = epicsEventCreate(epicsEventEmpty); /* may fail */
|
||||
|
||||
freeListFree ( dbevEventSubscriptionFreeList, pevent );
|
||||
epicsMutexMustLock ( evUser->lock );
|
||||
ellAdd(&evUser->waiters, &wait.node);
|
||||
/* grab current cycle counter, then wait for it to change */
|
||||
curSeq = evUser->pflush_seq;
|
||||
do {
|
||||
epicsMutexUnlock( evUser->lock );
|
||||
/* ensure worker will cycle at least once */
|
||||
epicsEventMustTrigger(evUser->ppendsem);
|
||||
|
||||
return;
|
||||
if(wait.wake) {
|
||||
epicsEventMustWait(wait.wake);
|
||||
} else {
|
||||
epicsThreadSleep(0.01); /* ick. but better than cantProceed() */
|
||||
}
|
||||
|
||||
epicsMutexMustLock ( evUser->lock );
|
||||
} while(curSeq == evUser->pflush_seq);
|
||||
ellDelete(&evUser->waiters, &wait.node);
|
||||
/* destroy under lock to ensure epicsEventMustTrigger() has returned */
|
||||
if(wait.wake)
|
||||
epicsEventDestroy(wait.wake);
|
||||
epicsMutexUnlock( evUser->lock );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -934,10 +920,7 @@ void db_post_single_event (dbEventSubscription event)
|
||||
*/
|
||||
static int event_read ( struct event_que *ev_que )
|
||||
{
|
||||
db_field_log *pfl;
|
||||
int notifiedRemaining = 0;
|
||||
void ( *user_sub ) ( void *user_arg, struct dbChannel *chan,
|
||||
int eventsRemaining, db_field_log *pfl );
|
||||
|
||||
/*
|
||||
* evUser ring buffer must be locked for the multiple
|
||||
@@ -958,19 +941,7 @@ static int event_read ( struct event_que *ev_que )
|
||||
while ( ev_que->evque[ev_que->getix] != EVENTQEMPTY ) {
|
||||
struct evSubscrip *pevent = ev_que->evque[ev_que->getix];
|
||||
int eventsRemaining;
|
||||
|
||||
pfl = ev_que->valque[ev_que->getix];
|
||||
if ( pevent == &canceledEvent ) {
|
||||
ev_que->evque[ev_que->getix] = EVENTQEMPTY;
|
||||
if (ev_que->valque[ev_que->getix]) {
|
||||
db_delete_field_log(ev_que->valque[ev_que->getix]);
|
||||
ev_que->valque[ev_que->getix] = NULL;
|
||||
}
|
||||
ev_que->getix = RNGINC ( ev_que->getix );
|
||||
assert ( ev_que->nCanceled > 0 );
|
||||
ev_que->nCanceled--;
|
||||
continue;
|
||||
}
|
||||
db_field_log *pfl = ev_que->valque[ev_que->getix];
|
||||
|
||||
/*
|
||||
* Simple type values queued up for reliable interprocess
|
||||
@@ -980,13 +951,7 @@ static int event_read ( struct event_que *ev_que )
|
||||
|
||||
event_remove ( ev_que, ev_que->getix, EVENTQEMPTY );
|
||||
ev_que->getix = RNGINC ( ev_que->getix );
|
||||
eventsRemaining = ev_que->evque[ev_que->getix] != EVENTQEMPTY && !ev_que->nCanceled;
|
||||
|
||||
/*
|
||||
* create a local copy of the call back parameters while
|
||||
* we still have the lock
|
||||
*/
|
||||
user_sub = pevent->user_sub;
|
||||
eventsRemaining = ev_que->evque[ev_que->getix] != EVENTQEMPTY;
|
||||
|
||||
/*
|
||||
* Next event pointer can be used by event tasks to determine
|
||||
@@ -998,14 +963,12 @@ static int event_read ( struct event_que *ev_que )
|
||||
* record lock, and it is calling db_post_events() waiting
|
||||
* for the event queue lock (which this thread now has).
|
||||
*/
|
||||
if ( user_sub ) {
|
||||
/*
|
||||
* This provides a way to test to see if an event is in use
|
||||
* despite the fact that the event queue does not point to
|
||||
* it.
|
||||
*/
|
||||
if ( pevent->user_sub ) {
|
||||
EVENTFUNC* user_sub = pevent->user_sub;
|
||||
pevent->callBackInProgress = TRUE;
|
||||
|
||||
UNLOCKEVQUE (ev_que);
|
||||
|
||||
/* Run post-event-queue filter chain */
|
||||
if (ellCount(&pevent->chan->post_chain)) {
|
||||
pfl = dbChannelRunPostChain(pevent->chan, pfl);
|
||||
@@ -1016,27 +979,15 @@ static int event_read ( struct event_que *ev_que )
|
||||
eventsRemaining, pfl );
|
||||
notifiedRemaining = eventsRemaining;
|
||||
}
|
||||
|
||||
LOCKEVQUE (ev_que);
|
||||
|
||||
/*
|
||||
* check to see if this event has been canceled each
|
||||
* time that the callBackInProgress flag is set to false
|
||||
* while we have the event queue lock, and post the flush
|
||||
* complete sem if there are no longer any events on the
|
||||
* queue
|
||||
*/
|
||||
if ( ev_que->evUser->pSuicideEvent == pevent ) {
|
||||
ev_que->evUser->pSuicideEvent = NULL;
|
||||
}
|
||||
else {
|
||||
if ( pevent->user_sub==NULL && pevent->npend==0u ) {
|
||||
pevent->callBackInProgress = FALSE;
|
||||
epicsEventSignal ( ev_que->evUser->pflush_sem );
|
||||
}
|
||||
else {
|
||||
pevent->callBackInProgress = FALSE;
|
||||
}
|
||||
}
|
||||
pevent->callBackInProgress = FALSE;
|
||||
}
|
||||
/* callback may have called db_cancel_event(), so must check user_sub again */
|
||||
if(!pevent->user_sub && !pevent->npend) {
|
||||
pevent->ev_que->quota -= EVENTENTRIES;
|
||||
freeListFree ( dbevEventSubscriptionFreeList, pevent );
|
||||
}
|
||||
db_delete_field_log(pfl);
|
||||
}
|
||||
@@ -1051,9 +1002,6 @@ static int event_read ( struct event_que *ev_que )
|
||||
return DB_EVENT_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* EVENT_TASK()
|
||||
*/
|
||||
static void event_task (void *pParm)
|
||||
{
|
||||
struct event_user * const evUser = (struct event_user *) pParm;
|
||||
@@ -1094,13 +1042,25 @@ static void event_task (void *pParm)
|
||||
}
|
||||
evUser->extraLaborBusy = FALSE;
|
||||
|
||||
for ( ev_que = &evUser->firstque; ev_que;
|
||||
ev_que = ev_que->nextque ) {
|
||||
for ( ev_que = &evUser->firstque; ev_que; ev_que = ev_que->nextque ) {
|
||||
/* unlock during iteration is safe as event_que will not be free'd */
|
||||
epicsMutexUnlock ( evUser->lock );
|
||||
event_read (ev_que);
|
||||
epicsMutexMustLock ( evUser->lock );
|
||||
}
|
||||
pendexit = evUser->pendexit;
|
||||
|
||||
evUser->pflush_seq++;
|
||||
if(ellCount(&evUser->waiters)) {
|
||||
/* hold lock throughout to avoid race between event trigger and destroy */
|
||||
ELLNODE *cur;
|
||||
for(cur = ellFirst(&evUser->waiters); cur; cur = ellNext(cur)) {
|
||||
event_waiter *w = CONTAINER(cur, event_waiter, node);
|
||||
if(w->wake)
|
||||
epicsEventMustTrigger(w->wake);
|
||||
}
|
||||
}
|
||||
|
||||
epicsMutexUnlock ( evUser->lock );
|
||||
|
||||
} while( ! pendexit );
|
||||
|
||||
@@ -359,6 +359,8 @@ typedef struct lset {
|
||||
* @param plink the link
|
||||
* @param rtn routine to execute
|
||||
* @returns status value
|
||||
*
|
||||
* @since 3.16.1
|
||||
*/
|
||||
long (*doLocked)(struct link *plink, dbLinkUserCallback rtn, void *priv);
|
||||
|
||||
|
||||
@@ -869,7 +869,7 @@ nosplit:
|
||||
}
|
||||
}
|
||||
|
||||
static char *msstring[4]={"NMS","MS","MSI","MSS"};
|
||||
static const char *msstring[4]={"NMS","MS","MSI","MSS"};
|
||||
|
||||
long dblsr(char *recordname,int level)
|
||||
{
|
||||
|
||||
@@ -24,18 +24,64 @@ extern "C" {
|
||||
|
||||
struct dbCommon;
|
||||
struct dbBase;
|
||||
/** @brief Lock multiple records.
|
||||
*
|
||||
* A dbLocker allows a caller to simultaneously lock multiple records.
|
||||
* The list of records is provided to dbLockerAlloc().
|
||||
* And the resulting dbLocker can be locked/unlocked repeatedly.
|
||||
*
|
||||
* Each thread can only lock one dbLocker at a time.
|
||||
* While locked, dbScanLock() may be called only on those records
|
||||
* included in the dbLocker.
|
||||
*
|
||||
* @since 3.16.0.1
|
||||
*/
|
||||
struct dbLocker;
|
||||
typedef struct dbLocker dbLocker;
|
||||
|
||||
/** @brief Lock a record for modification.
|
||||
*
|
||||
* While locked, caller may access record using eg. dbGet() or dbPut(),
|
||||
* but not dbGetField() or dbPutField().
|
||||
* The caller must later call dbScanUnlock().
|
||||
* dbScanLock() may be called again as the record lock behaves as a recursive mutex.
|
||||
*/
|
||||
DBCORE_API void dbScanLock(struct dbCommon *precord);
|
||||
/** @brief Unlock a record.
|
||||
*
|
||||
* Reverse the action of dbScanLock()
|
||||
*/
|
||||
DBCORE_API void dbScanUnlock(struct dbCommon *precord);
|
||||
|
||||
/** @brief Prepare to lock a set of records.
|
||||
* @param precs Array of nrecs dbCommon pointers.
|
||||
* @param nrecs Length of precs array
|
||||
* @param flags Set to 0
|
||||
* @return NULL on error
|
||||
* @since 3.16.0.1
|
||||
*/
|
||||
DBCORE_API dbLocker *dbLockerAlloc(struct dbCommon * const *precs,
|
||||
size_t nrecs,
|
||||
unsigned int flags);
|
||||
|
||||
DBCORE_API void dbLockerFree(dbLocker *);
|
||||
/** @brief Free dbLocker allocated by dbLockerAlloc()
|
||||
* @param plocker Must not be NULL
|
||||
* @since 3.16.0.1
|
||||
*/
|
||||
DBCORE_API void dbLockerFree(dbLocker *plocker);
|
||||
|
||||
/** @brief Lock all records of dbLocker
|
||||
*
|
||||
* While locked, caller may access any associated record passed to dbLockerAlloc() .
|
||||
* dbScanLockMany() may not be called again (multi-lock is not recursive).
|
||||
* dbScanLock()/dbScanUnlock() may be called on individual record.
|
||||
* The caller must later call dbScanUnlockMany().
|
||||
* @since 3.16.0.1
|
||||
*/
|
||||
DBCORE_API void dbScanLockMany(dbLocker*);
|
||||
/** @brief Unlock all records of dbLocker
|
||||
* @since 3.16.0.1
|
||||
*/
|
||||
DBCORE_API void dbScanUnlockMany(dbLocker*);
|
||||
|
||||
DBCORE_API unsigned long dbLockGetLockId(
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#define DBLOCKPVT_H
|
||||
|
||||
#include "dbLock.h"
|
||||
#include "epicsMutex.h"
|
||||
#include "epicsSpin.h"
|
||||
|
||||
/* Define to enable additional error checking */
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
\*************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
|
||||
@@ -1068,7 +1068,7 @@ int dbRecordNameValidate(const char *name)
|
||||
const char *pos = name;
|
||||
|
||||
if (!*name) {
|
||||
yyerrorAbort("Error: Record/Alias name can't be empty");
|
||||
yyerrorAbort(ERL_ERROR ": Record/Alias name can't be empty");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1086,7 +1086,7 @@ int dbRecordNameValidate(const char *name)
|
||||
name, c);
|
||||
|
||||
} else if(c==' ' || c=='\t' || c=='"' || c=='\'' || c=='.' || c=='$') {
|
||||
epicsPrintf("Error: Bad character '%c' in Record/Alias name \"%s\"\n",
|
||||
epicsPrintf(ERL_ERROR ": Bad character '%c' in Record/Alias name \"%s\"\n",
|
||||
c, name);
|
||||
yyerrorAbort(NULL);
|
||||
return 1;
|
||||
@@ -1110,14 +1110,10 @@ static void dbRecordHead(char *recordType, char *name, int visible)
|
||||
allocTemp(pdbentry);
|
||||
|
||||
if (recordType[0] == '*' && recordType[1] == 0) {
|
||||
if (dbRecordsOnceOnly)
|
||||
epicsPrintf("Record-type \"*\" not valid with dbRecordsOnceOnly\n");
|
||||
else {
|
||||
status = dbFindRecord(pdbentry, name);
|
||||
if (status == 0)
|
||||
return; /* done */
|
||||
epicsPrintf("Record \"%s\" not found\n", name);
|
||||
}
|
||||
status = dbFindRecord(pdbentry, name);
|
||||
if (status == 0)
|
||||
return; /* done */
|
||||
epicsPrintf(ERL_ERROR ": Record \"%s\" not found\n", name);
|
||||
yyerror(NULL);
|
||||
duplicate = TRUE;
|
||||
return;
|
||||
@@ -1136,15 +1132,16 @@ static void dbRecordHead(char *recordType, char *name, int visible)
|
||||
status = dbCreateRecord(pdbentry,name);
|
||||
if (status == S_dbLib_recExists) {
|
||||
if (strcmp(recordType, dbGetRecordTypeName(pdbentry)) != 0) {
|
||||
epicsPrintf("Record \"%s\" of type \"%s\" redefined with new type "
|
||||
epicsPrintf(ERL_ERROR ": Record \"%s\" of type \"%s\" redefined with new type "
|
||||
"\"%s\"\n", name, dbGetRecordTypeName(pdbentry), recordType);
|
||||
yyerror(NULL);
|
||||
duplicate = TRUE;
|
||||
return;
|
||||
}
|
||||
else if (dbRecordsOnceOnly) {
|
||||
epicsPrintf("Record \"%s\" already defined (dbRecordsOnceOnly is "
|
||||
"set)\n", name);
|
||||
epicsPrintf(ERL_ERROR ": Record \"%s\" already defined and dbRecordsOnceOnly set.\n"
|
||||
"Used record type \"*\" to append.\n",
|
||||
name);
|
||||
yyerror(NULL);
|
||||
duplicate = TRUE;
|
||||
}
|
||||
@@ -1170,8 +1167,28 @@ static void dbRecordField(char *name,char *value)
|
||||
pdbentry = ptempListNode->item;
|
||||
status = dbFindField(pdbentry,name);
|
||||
if (status) {
|
||||
epicsPrintf("Record \"%s\" does not have a field \"%s\"\n",
|
||||
dbGetRecordName(pdbentry), name);
|
||||
epicsPrintf("%s Record \"%s\" does not have a field \"%s\"\n",
|
||||
dbGetRecordTypeName(pdbentry), dbGetRecordName(pdbentry), name);
|
||||
if(dbGetRecordName(pdbentry)) {
|
||||
DBENTRY temp;
|
||||
double bestSim = -1.0;
|
||||
const dbFldDes *bestFld = NULL;
|
||||
dbCopyEntryContents(pdbentry, &temp);
|
||||
for(status = dbFirstField(&temp, 0); !status; status = dbNextField(&temp, 0)) {
|
||||
double sim = epicsStrSimilarity(name, temp.pflddes->name);
|
||||
if(!bestFld || sim > bestSim) {
|
||||
bestSim = sim;
|
||||
bestFld = temp.pflddes;
|
||||
}
|
||||
}
|
||||
dbFinishEntry(&temp);
|
||||
if(bestSim>0.0) {
|
||||
epicsPrintf(" Did you mean \"%s\"?", bestFld->name);
|
||||
if(bestFld->prompt)
|
||||
epicsPrintf(" (%s)", bestFld->prompt);
|
||||
epicsPrintf("\n");
|
||||
}
|
||||
}
|
||||
yyerror(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "iocsh.h"
|
||||
#include "errSymTbl.h"
|
||||
#include "errlog.h"
|
||||
|
||||
#include "dbStaticIocRegister.h"
|
||||
#include "dbStaticLib.h"
|
||||
@@ -254,7 +255,7 @@ static void dbCreateAliasCallFunc(const iocshArgBuf *args)
|
||||
}
|
||||
dbFinishEntry(&ent);
|
||||
if(status) {
|
||||
fprintf(stderr, "Error: %ld %s\n", status, errSymMsg(status));
|
||||
fprintf(stderr, ERL_ERROR ": %ld %s\n", status, errSymMsg(status));
|
||||
iocshSetError(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,10 +57,10 @@ static char *pNullString = "";
|
||||
*/
|
||||
STATIC_ASSERT(messagesize >= 21);
|
||||
|
||||
static char *ppstring[5]={" NPP"," PP"," CA"," CP"," CPP"};
|
||||
static char *msstring[4]={" NMS"," MS"," MSI"," MSS"};
|
||||
static const char *ppstring[5]={" NPP"," PP"," CA"," CP"," CPP"};
|
||||
static const char *msstring[4]={" NMS"," MS"," MSI"," MSS"};
|
||||
|
||||
maplinkType pamaplinkType[LINK_NTYPES] = {
|
||||
const maplinkType pamaplinkType[LINK_NTYPES] = {
|
||||
{"CONSTANT",CONSTANT},
|
||||
{"PV_LINK",PV_LINK},
|
||||
{"VME_IO",VME_IO},
|
||||
@@ -89,7 +89,7 @@ static FILE *openOutstream(const char *filename)
|
||||
errno = 0;
|
||||
stream = fopen(filename,"w");
|
||||
if(!stream) {
|
||||
fprintf(stderr,"error opening %s %s\n",filename,strerror(errno));
|
||||
fprintf(stderr,ERL_ERROR " opening %s %s\n",filename,strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
return stream;
|
||||
@@ -637,7 +637,7 @@ void dbFinishEntry(DBENTRY *pdbentry)
|
||||
}
|
||||
}
|
||||
|
||||
DBENTRY * dbCopyEntry(DBENTRY *pdbentry)
|
||||
DBENTRY * dbCopyEntry(const DBENTRY *pdbentry)
|
||||
{
|
||||
DBENTRY *pnew;
|
||||
|
||||
@@ -647,7 +647,7 @@ DBENTRY * dbCopyEntry(DBENTRY *pdbentry)
|
||||
return(pnew);
|
||||
}
|
||||
|
||||
void dbCopyEntryContents(DBENTRY *pfrom,DBENTRY *pto)
|
||||
void dbCopyEntryContents(const DBENTRY *pfrom,DBENTRY *pto)
|
||||
{
|
||||
*pto = *pfrom;
|
||||
pto->message = NULL;
|
||||
@@ -2204,12 +2204,12 @@ long dbInitRecordLinks(dbRecordType *rtyp, struct dbCommon *prec)
|
||||
*/
|
||||
|
||||
} else if(dbCanSetLink(plink, &link_info, devsup)!=0) {
|
||||
errlogPrintf("Error: %s.%s: can't initialize link type %d with \"%s\" (type %d)\n",
|
||||
prec->name, pflddes->name, plink->type, plink->text, link_info.ltype);
|
||||
errlogPrintf(ERL_ERROR ": %s.%s: can't initialize link type %d with \"%s\" (type %s)\n",
|
||||
prec->name, pflddes->name, plink->type, plink->text, pamaplinkType[link_info.ltype].strvalue);
|
||||
|
||||
} else if(dbSetLink(plink, &link_info, devsup)) {
|
||||
errlogPrintf("Error: %s.%s: failed to initialize link type %d with \"%s\" (type %d)\n",
|
||||
prec->name, pflddes->name, plink->type, plink->text, link_info.ltype);
|
||||
errlogPrintf(ERL_ERROR ": %s.%s: failed to initialize link type %d with \"%s\" (type %s)\n",
|
||||
prec->name, pflddes->name, plink->type, plink->text, pamaplinkType[link_info.ltype].strvalue);
|
||||
}
|
||||
free(plink->text);
|
||||
plink->text = NULL;
|
||||
|
||||
@@ -51,9 +51,9 @@ DBCORE_API void dbInitEntry(DBBASE *pdbbase,
|
||||
DBENTRY *pdbentry);
|
||||
|
||||
DBCORE_API void dbFinishEntry(DBENTRY *pdbentry);
|
||||
DBCORE_API DBENTRY * dbCopyEntry(DBENTRY *pdbentry);
|
||||
DBCORE_API void dbCopyEntryContents(DBENTRY *pfrom,
|
||||
DBENTRY *pto);
|
||||
DBCORE_API DBENTRY * dbCopyEntry(const DBENTRY *pdbentry);
|
||||
DBCORE_API void dbCopyEntryContents(const DBENTRY *pfrom,
|
||||
DBENTRY *pto);
|
||||
|
||||
DBCORE_API extern int dbBptNotMonotonic;
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ long dbAllocRecord(DBENTRY *pdbentry,const char *precordName)
|
||||
|
||||
status = dbPutStringNum(pdbentry,pflddes->initial);
|
||||
if(status)
|
||||
epicsPrintf("Error initializing %s.%s initial %s\n",
|
||||
epicsPrintf(ERL_ERROR " initializing %s.%s initial %s\n",
|
||||
pdbRecordType->name,pflddes->name,pflddes->initial);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -370,9 +370,9 @@ json_value: jsonNULL { $$ = dbmfStrdup("null"); }
|
||||
static int yyerror(char *str)
|
||||
{
|
||||
if (str)
|
||||
epicsPrintf("Error: %s\n", str);
|
||||
epicsPrintf(ERL_ERROR ": %s\n", str);
|
||||
else
|
||||
epicsPrintf("Error");
|
||||
epicsPrintf(ERL_ERROR "");
|
||||
if (!yyFailed) { /* Only print this stuff once */
|
||||
epicsPrintf(" at or before '%s'", yytext);
|
||||
dbIncludePrint();
|
||||
|
||||
@@ -43,11 +43,11 @@ extern "C" {
|
||||
#define VXI_IO 15
|
||||
#define LINK_NTYPES 16
|
||||
typedef struct maplinkType {
|
||||
char *strvalue;
|
||||
const char *strvalue;
|
||||
int value;
|
||||
} maplinkType;
|
||||
|
||||
DBCORE_API extern maplinkType pamaplinkType[];
|
||||
DBCORE_API extern const maplinkType pamaplinkType[LINK_NTYPES];
|
||||
|
||||
#define VXIDYNAMIC 0
|
||||
#define VXISTATIC 1
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
SRC_DIRS += $(IOCDIR)/dbtemplate
|
||||
|
||||
PROD_HOST += msi
|
||||
PROD_CMD += msi
|
||||
|
||||
msi_SRCS = msi.cpp
|
||||
msi_LIBS += Com
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "osiUnistd.h"
|
||||
#include "macLib.h"
|
||||
#include "dbmf.h"
|
||||
#include "errlog.h"
|
||||
|
||||
#include "epicsExport.h"
|
||||
#include "dbAccess.h"
|
||||
@@ -337,7 +338,7 @@ int dbLoadTemplate(const char *sub_file, const char *cmd_collect)
|
||||
|
||||
if (dbTemplateMaxVars < 1)
|
||||
{
|
||||
fprintf(stderr,"Error: dbTemplateMaxVars = %d, must be +ve\n",
|
||||
fprintf(stderr,ERL_ERROR ": dbTemplateMaxVars = %d, must be +ve\n",
|
||||
dbTemplateMaxVars);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ static void addMacroReplacements(MAC_HANDLE * const macPvt,
|
||||
if (status) {
|
||||
status = macInstallMacros(macPvt, pairs);
|
||||
if (!status) {
|
||||
fprintf(stderr, "Error from macInstallMacros\n");
|
||||
fprintf(stderr, ERL_ERROR " from macInstallMacros\n");
|
||||
usageExit(1);
|
||||
}
|
||||
free(pairs);
|
||||
@@ -522,7 +522,7 @@ static void inputOpenFile(inputData *pinputData, const char * const filename)
|
||||
}
|
||||
|
||||
if (!fp) {
|
||||
fprintf(stderr, "msi: Can't open file '%s'\n", filename);
|
||||
fprintf(stderr, ERL_ERROR " msi: Can't open file '%s'\n", filename);
|
||||
inputErrPrint(pinputData);
|
||||
abortExit(1);
|
||||
}
|
||||
@@ -672,7 +672,7 @@ static void substituteOpen(subInfo **ppvt, const std::string& substitutionName)
|
||||
|
||||
fp = fopen(substitutionName.c_str(), "r");
|
||||
if (!fp) {
|
||||
fprintf(stderr, "msi: Can't open file '%s'\n", substitutionName.c_str());
|
||||
fprintf(stderr, ERL_ERROR " msi: Can't open file '%s'\n", substitutionName.c_str());
|
||||
abortExit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ static int iocBuild_2(void)
|
||||
|
||||
scanInit();
|
||||
if (asInit()) {
|
||||
errlogPrintf("iocBuild: asInit Failed.\n");
|
||||
errlogPrintf(ERL_ERROR " iocBuild: asInit Failed.\n");
|
||||
return -1;
|
||||
}
|
||||
dbProcessNotifyInit();
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <epicsStdio.h>
|
||||
#include <epicsFindSymbol.h>
|
||||
#include <errlog.h>
|
||||
#include <registryRecordType.h>
|
||||
#include <registryDeviceSupport.h>
|
||||
#include <registryDriverSupport.h>
|
||||
@@ -248,7 +249,7 @@ registerAllRecordDeviceDrivers(DBBASE *pdbbase)
|
||||
|
||||
} catch(std::exception& e) {
|
||||
dbFinishEntry(&entry);
|
||||
fprintf(stderr, "Error: %s\n", e.what());
|
||||
fprintf(stderr, ERL_ERROR ": %s\n", e.what());
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user