From c933d77963b7233dc98a577c85e95f4d32f5c2dc Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 26 Apr 2016 15:18:31 -0500 Subject: [PATCH] Add rule to install libraries before linking executables The rule must be disabled for building libCom and gdd though. --- configure/RULES_BUILD | 8 +++++++- documentation/RELEASE_NOTES.html | 12 ++++++++++++ src/ca/legacy/gdd/Makefile | 5 +++++ src/libCom/Makefile | 5 +++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 37e54372f..026246ee6 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -170,7 +170,13 @@ endif $(DIRECTORY_TARGETS) : $(MKDIR) -p $@ -$(PRODNAME): $(INSTALL_LIB_INSTALLS) +# Install LIB_INSTALLS libraries before linking executables +$(TESTPRODNAME) $(PRODNAME): | $(INSTALL_LIB_INSTALLS) + +# Install built libraries too, unless Makefile says to wait +ifneq ($(DELAY_INSTALL_LIBS),YES) +$(TESTPRODNAME) $(PRODNAME): | $(INSTALL_LIBS) $(INSTALL_DLLSTUB_LIBS) +endif # RELEASE file consistency checking checkRelease: diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index fc46ff8cb..05a9da078 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -15,6 +15,18 @@

Changes made on the 3.15 branch since 3.15.3

+

Build rules and DELAY_INSTALL_LIBS

+ +

A new order-only prerequisite build rule has been added to ensure that +library files (and DLL stubs on Windows) get installed before linking any +executables, which resolves parallel build problems on high-powered CPUs. There +are some (rare) cases though where a Makefile has to build an executable and run +it to be able to compile code for a library built by the same Makefile. With +this new build rule GNUmake will complain about a circular dependency and the +build will probably fail in those cases. To avoid this problem the failing +Makefile should set DELAY_INSTALL_LIBS = YES before including the +$(TOP)/configure/RULES file, disabling the new build rule.

+

CA server configuration changes

RSRV now honors EPICS_CAS_INTF_ADDR_LIST and binds only to the provided list diff --git a/src/ca/legacy/gdd/Makefile b/src/ca/legacy/gdd/Makefile index b1e8fceaa..9c5638eb4 100644 --- a/src/ca/legacy/gdd/Makefile +++ b/src/ca/legacy/gdd/Makefile @@ -69,6 +69,11 @@ CLEANS += $(COMMON_DIR)/aitConvertGenerated.cc USR_CXXFLAGS_Linux = -fno-strict-aliasing USR_CXXFLAGS_RTEMS = -fno-strict-aliasing +ifeq ($(T_A),$(EPICS_HOST_ARCH)) + # genApps and aitGen are needed to finish libgdd + DELAY_INSTALL_LIBS = YES +endif + include $(TOP)/configure/RULES # Manual dependencies diff --git a/src/libCom/Makefile b/src/libCom/Makefile index 767180316..33955acfd 100644 --- a/src/libCom/Makefile +++ b/src/libCom/Makefile @@ -45,6 +45,11 @@ Com_SYS_LIBS_WIN32 = ws2_32 advapi32 user32 Com_RCS = Com.rc +ifeq ($(T_A),$(EPICS_HOST_ARCH)) + # Antelope & flex are needed to finish libCom + DELAY_INSTALL_LIBS = YES +endif + include $(TOP)/configure/RULES include $(LIBCOM)/as/RULES