Merged changes from 3.15 branch, to revno 12807

This commit is contained in:
Andrew Johnson
2017-02-01 11:57:04 -06:00
90 changed files with 1401 additions and 959 deletions

View File

@@ -4,7 +4,7 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
# in the file LICENSE that is included with this distribution.
#*************************************************************************
#
# EPICS Version information
@@ -34,10 +34,10 @@ BASE_3_16 = YES
# EPICS_VERSION must be a number >0 and <256
EPICS_VERSION = 3
# EPICS_REVISION must be a number >=0 and <256
# EPICS_REVISION must be a number >=0 and <256
EPICS_REVISION = 16
# EPICS_MODIFICATION must be a number >=0 and <256
# EPICS_MODIFICATION must be a number >=0 and <256
EPICS_MODIFICATION = 0
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)

View File

@@ -14,7 +14,7 @@ build$(DIVIDER)$(ARCH) build: buildInstall
install$(DIVIDER)$(ARCH) install: buildInstall
$(ARCH): buildInstall
ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(ARCH))
ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(strip $(ARCH)))
buildInstall$(DIVIDER)$(ARCH) buildInstall: $(TARGETS)
clean$(DIVIDER)$(ARCH) clean:
@@ -35,4 +35,3 @@ envPaths: $(wildcard $(TOP)/configure/RELEASE*) \
realclean:
$(RM) cdCommands envPaths dllPath.bat relPaths.sh

View File

@@ -105,13 +105,17 @@ endif
PRODTARGETS += $(PRODNAME) $(MUNCHNAME) $(CTDT_SRCS) $(CTDT_OBJS) $(NMS)
#---------------------------------------------------------------
# Generate a test specification if any tests are defined.
# Test specifications and test result files
#
ifneq (,$(strip $(TESTS)))
TARGETS += testspec
endif
# Enable testing if this host can run tests on the current target
ifneq (,$(findstring $(T_A),$(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS)))
RUNTESTS_ENABLED = YES
TAPFILES += $(TESTSCRIPTS:.t=.tap)
endif
#---------------------------------------------------------------
# Libraries
@@ -324,7 +328,7 @@ $(MODNAME): %$(MODEXT): %$(EXE)
# Automated testing
runtests: $(TESTSCRIPTS)
ifneq (,$(findstring $(T_A),$(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS)))
ifdef RUNTESTS_ENABLED
-$(PERL) -MTest::Harness -e 'runtests @ARGV if @ARGV;' $^
endif
@@ -340,7 +344,7 @@ tapfiles: $(TESTSCRIPTS) $(TAPFILES)
# A .tap file is the output from running the associated test script
%.tap: %.t
ifneq (,$(findstring $(T_A),$(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS)))
ifdef RUNTESTS_ENABLED
-$(PERL) $< -tap > $@
endif

View File

@@ -22,7 +22,3 @@ GNU_LDLIBS_YES =
# Link with winsock2
OP_SYS_LDLIBS = -lws2_32
# Use static compiler-support libraries
OP_SYS_LDFLAGS += -static-libgcc -static-libstdc++
# There is no compiler flag for static libwinpthread

View File

@@ -10,6 +10,8 @@ VALID_BUILDS = Host Ioc
CMPLR_CLASS = msvc
OPT_WHOLE_PROGRAM = YES
#-------------------------------------------------------
WINLINK = link
@@ -42,11 +44,13 @@ WARN_CFLAGS_NO = -W1
# -Ox maximum optimizations
# -GL whole program optimization
# -Oy- re-enable creation of frame pointers
OPT_CFLAGS_YES = -Ox -GL -Oy-
OPT_CFLAGS_YES_YES = -Ox -GL -Oy-
OPT_CFLAGS_YES_NO = -Ox -Oy-
OPT_CFLAGS_YES = $(OPT_CFLAGS_YES_$(OPT_WHOLE_PROGRAM))
#
# -Zi generate program database for debugging information
# -RTCsu catch bugs occuring only inoptimized code
# -RTCsu enable run-time error checks
OPT_CFLAGS_NO = -Zi -RTCsu
# specify object file name and location
@@ -96,17 +100,19 @@ CODE_CPPFLAGS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
# -w44355 set "'this' used in the base initializer list" to be level 4
# -w44344 "behavior change: use of explicit template arguments results in ..."
WARN_CXXFLAGS_YES = -W3 -w44355 -w44344
WARN_CXXFLAGS_NO = -W1
WARN_CXXFLAGS_NO = -W1
#
# -Ox maximum optimizations
# -GL whole program optimization
# -Oy- re-enable creation of frame pointers
OPT_CXXFLAGS_YES = -Ox -GL -Oy-
OPT_CXXFLAGS_YES_YES = -Ox -GL -Oy-
OPT_CXXFLAGS_YES_NO = -Ox -Oy-
OPT_CXXFLAGS_YES = $(OPT_CXXFLAGS_YES_$(OPT_WHOLE_PROGRAM))
#
# -Zi generate program database for debugging information
# -RTCsu catch bugs occurring only in optimized code
# -RTCsu enable run-time error checks
OPT_CXXFLAGS_NO = -RTCsu -Zi
# specify object file name and location
@@ -136,11 +142,14 @@ RANLIB=
# -fixed:no generate relocatable code
# -version:<major>.<minor> - only 2 components allowed, 0-65535 each
# -debug generate debugging info
LINK_OPT_FLAGS_YES = -LTCG -incremental:no -opt:ref \
-release $(PROD_VERSION:%=-version:%)
LINK_OPT_FLAGS_WHOLE_YES = -LTCG
LINK_OPT_FLAGS_YES = $(LINK_OPT_FLAGS_WHOLE_$(OPT_WHOLE_PROGRAM))
LINK_OPT_FLAGS_YES += -incremental:no -opt:ref
LINK_OPT_FLAGS_YES += -release $(PROD_VERSION:%=-version:%)
LINK_OPT_FLAGS_NO = -debug -incremental:no -fixed:no
OPT_LDFLAGS = $(LINK_OPT_FLAGS_$(HOST_OPT))
LIB_OPT_FLAGS_YES = -LTCG
LIB_OPT_FLAGS_YES = $(LINK_OPT_FLAGS_WHOLE_$(OPT_WHOLE_PROGRAM))
LIB_OPT_LDFLAGS = $(LIB_OPT_FLAGS_$(HOST_OPT))
ARCH_DEP_CFLAGS=
@@ -156,48 +165,38 @@ EXE=.exe
OBJ=.obj
RES=.res
# Problem: MS Visual C++ does not recognize *.cc as C++ source,
# so we do C++ compiles using the global flag -TP
# MS Visual C++ doesn't recognize *.cc as a C++ source file,
# so C++ compiles get the flag -TP
COMPILER_CXXFLAGS = -TP
# Operating system flags
# Operating system flags
OP_SYS_CFLAGS =
OP_SYS_CXXFLAGS = $(COMPILER_CXXFLAGS)
#
# Files and flags needed to link DLLs (used in RULES_BUILD)
#
WIN32_DLLFLAGS = /subsystem:windows /dll $(OPT_LDFLAGS) \
# Files and flags needed to link DLLs (used in RULES_BUILD)
WIN32_DLLFLAGS = -subsystem:windows -dll $(OPT_LDFLAGS) \
$(USR_LDFLAGS) $(CMD_LDFLAGS) $(TARGET_LDFLAGS) $(LIB_LDFLAGS)
#
# specify dll .def file only if it exists
#
# Specify dll .def file only if it exists
DLL_DEF_FLAG = $(addprefix -def:,$(wildcard ../$(addsuffix .def,$*)))
#
# A WIN32 dll has three parts:
# A WIN32 dll has three parts:
# x.dll: the real dll (SHRLIBNAME)
# x.lib: what you link to progs that use the dll (DLLSTUB_LIBNAME)
# x.exp: what you need to build the dll (in no variable)
#
LINK.shrlib = $(WINLINK) -nologo $(WIN32_DLLFLAGS) -out:$@ \
-implib:$(@:%$(SHRLIB_SUFFIX)=%$(LIB_SUFFIX)) \
$(DLL_DEF_FLAG) $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS)
# adjust names of libraries to build
#
# Adjust names of libraries to build
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
TESTSHRLIBNAME_YES = $(TESTBUILD_LIBRARY:%=%$(SHRLIB_SUFFIX_BASE))
#
# When SHARED_LIBRARIES is YES we are building a DLL link library
# and when SHARED_LIBRARIES is NO we are building an object library
#
# When SHARED_LIBRARIES is YES we are building a DLL shared library.
# When SHARED_LIBRARIES is NO we are building an object library
DLLSTUB_SUFFIX = .lib
DLLSTUB_LIBNAME_YES = $(BUILD_LIBRARY:%=%.lib)
DLLSTUB_LIBNAME = $(DLLSTUB_LIBNAME_$(SHARED_LIBRARIES))
@@ -211,7 +210,7 @@ LIBNAME = $(LIBNAME_$(SHARED_LIBRARIES))
TESTLIBNAME_NO = $(TESTBUILD_LIBRARY:%=%.lib)
TESTLIBNAME = $(TESTLIBNAME_$(SHARED_LIBRARIES))
# dll install location
# dll install location
INSTALL_SHRLIB = $(INSTALL_BIN)
@@ -271,7 +270,7 @@ LINK.cpp = $(WINLINK) -nologo $(STATIC_LDFLAGS) $(LDFLAGS) $(PROD_LDFLAGS) \
#--------------------------------------------------
# UseManifestTool.pl checks MS Visual c++ compiler version number to
# decide whether or not to use the Manifest Tool command to embed the
# linker created .manifest file into a library or product target.
# linker created .manifest file into a library or product target.
# useManifestTool.pl returns 0(don't use) or 1(use).
#
MT.exe = mt.exe -nologo -manifest $@.manifest
@@ -281,4 +280,3 @@ MT_EXE_COMMAND_NO = $(MT.exe) "-outputresource:$@;\#1"
MT_EXE_COMMAND1 = $(MT_EXE_COMMAND_$(STATIC_BUILD))
MT_DLL_COMMAND = $(MT_DLL_COMMAND$(shell $(PERL) $(TOOLS)/useManifestTool.pl))
MT_EXE_COMMAND = $(MT_EXE_COMMAND$(shell $(PERL) $(TOOLS)/useManifestTool.pl))

View File

@@ -8,8 +8,7 @@
include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
-include $(CONFIG)/os/CONFIG_SITE.win32-x86.win32-x86
OPT_LDFLAGS += /MACHINE:X64
# /MACHINE:X64
# /MACHINE:IA64 (Itanium)
# /MACHINE:X86
OPT_LDFLAGS += -MACHINE:X64
# -MACHINE:X64
# -MACHINE:IA64 (Itanium)
# -MACHINE:X86

View File

@@ -0,0 +1,8 @@
# CONFIG_SITE.Common.win32-x86-static
#
# Site-specific settings for the win32-x86-static target
# Whole-program optimization doesn't work with Visual Studio 2010 when
# building static binaries. Newer versions of Visual Studio than 2010
# may work though, comment out or set this to YES to try.
OPT_WHOLE_PROGRAM = NO

View File

@@ -1,9 +1,8 @@
# CONFIG_SITE.Common.windows-x64-static
#
# Site Specific definitions for windows-x64-static target
# Only the local epics system manager should modify this file
# 64-bit Visual Studio 2010 builds fail when built optimized.
# If you are using a newer version you can try removing this:
HOST_OPT = NO
# Site-specific settings for the windows-x64-static target
# Whole-program optimization doesn't work with Visual Studio 2010 when
# building static binaries. Newer versions of Visual Studio than 2010
# may work though, comment out or set this to YES to try.
OPT_WHOLE_PROGRAM = NO

View File

@@ -4,10 +4,10 @@
#-------------------------------------------------------
# Early versions of the MinGW cross-build tools can only build
# static (non-DLL) libraries. For example RHEL's cross-gcc 4.4.6
# needs these uncommented, cross-gcc 4.6.3 for Ubuntu does not:
SHARED_LIBRARIES = NO
STATIC_BUILD = YES
# static (non-DLL) libraries. RHEL's cross-build of gcc 4.4.6
# needs these uncommented, cross-gcc 4.6.3 from Ubuntu does not:
#SHARED_LIBRARIES = NO
#STATIC_BUILD = YES
# The cross-build tools are in $(GNU_DIR)/bin
# Default is /usr
@@ -20,3 +20,6 @@ CMPLR_PREFIX = i686-w64-mingw32-
#CMPLR_PREFIX = i686-pc-mingw32-
# Debian?
#CMPLR_PREFIX = i586-mingw32msvc-
# Use static compiler-support libraries
OP_SYS_LDFLAGS += -static-libgcc -static-libstdc++

View File

@@ -18,3 +18,6 @@
#CMPLR_PREFIX = i686-w64-mingw32-
# RHEL:
CMPLR_PREFIX = x86_64-w64-mingw32-
# Use static compiler-support libraries
OP_SYS_LDFLAGS += -static-libgcc -static-libstdc++