diff --git a/configure/os/CONFIG.Common.UnixCommon b/configure/os/CONFIG.Common.UnixCommon index c1c9acf5d..60daafa0f 100644 --- a/configure/os/CONFIG.Common.UnixCommon +++ b/configure/os/CONFIG.Common.UnixCommon @@ -16,11 +16,6 @@ VALID_BUILDS = Host Ioc # Gnu directory GNU_DIR = /usr/local -#------------------------------------------------------- -# Get fullpathname of relative dirs -SHRLIB_SEARCH_FULLPATHDIRS = $(foreach dir,$(SHRLIB_SEARCH_DIRS), \ - $(shell perl $(TOOLS)/fullPathName.pl $(dir))) - #------------------------------------------------------- # Unix prefix and suffix definitions EXE = @@ -55,8 +50,10 @@ SHRLIB_DEPLIBS=$(foreach lib, $(LIB_LIBS) $(USR_LIBS), \ SHRLIB_LDLIBS = $(addprefix -l, $($*_LDLIBS) $(LIB_LIBS) $(USR_LIBS) \ $($*_SYS_LIBS) $(LIB_SYS_LIBS) $(USR_SYS_LIBS)) $(LDLIBS) -SHRLIB_DEPLIB_DIRS = $(dir $($*_DEPLIBS)) $(dir $(SHRLIB_DEPLIBS)) -SHRLIBDIR_LDFLAGS += $(sort $(SHRLIB_DEPLIB_DIRS:%=-L%)) +SHRLIB_DEPLIB_DIRS = $(foreach word,$(sort $(dir $($*_DEPLIBS) $(SHRLIB_DEPLIBS))), \ + $(shell perl $(TOOLS)/fullPathName.pl $(word))) + +SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-L%) #------------------------------------------------------- # Prod: DEPLIBS, LDFLAGS, and LDLIBS definitions @@ -75,8 +72,10 @@ LDLIBS_SHARED_NO = LDLIBS PROD_LDLIBS += $($(firstword $(LDLIBS_STATIC_$(STATIC_BUILD)) \ $(LDLIBS_SHARED_$(SHARED_LIBRARIES)))) -PROD_DEPLIB_DIRS = $(dir $($*_DEPLIBS)) $(dir $(PROD_DEPLIBS)) -PRODDIR_LDFLAGS += $(sort $(PROD_DEPLIB_DIRS:%=-L%)) +PROD_DEPLIB_DIRS = $(foreach word,$(sort $(dir $($*_DEPLIBS) $(PROD_DEPLIBS))), \ + $(shell perl $(TOOLS)/fullPathName.pl $(word))) + +PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-L%) #-------------------------------------------------- # Link definitions diff --git a/configure/os/CONFIG.Common.cygwin-x86 b/configure/os/CONFIG.Common.cygwin-x86 index 7cf061514..ac9e3029a 100644 --- a/configure/os/CONFIG.Common.cygwin-x86 +++ b/configure/os/CONFIG.Common.cygwin-x86 @@ -27,7 +27,10 @@ ARCH_DEP_CPPFLAGS += -D_X86_ OP_SYS_CPPFLAGS += -DCYGWIN32 -U_WIN32 # Set runtime path for shared libraries -RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-Wl,-rpath,%) +SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%) + +# Set runtime path for products +PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%) # Definitions used when COMMANDLINE_LIBRARY is READLINE INCLUDES_READLINE = -I$(GNU_DIR)/include diff --git a/configure/os/CONFIG.Common.freebsdCommon b/configure/os/CONFIG.Common.freebsdCommon index 5a920eb65..e8253a517 100644 --- a/configure/os/CONFIG.Common.freebsdCommon +++ b/configure/os/CONFIG.Common.freebsdCommon @@ -23,7 +23,10 @@ OP_SYS_CPPFLAGS += -Dfreebsd #OP_SYS_LDLIBS += -lrt # Set runtime path for shared libraries -RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-Wl,-rpath,%) +SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%) + +# Set runtime path for products +PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%) # Definitions used when COMMANDLINE_LIBRARY is READLINE LDLIBS_READLINE = -lreadline -lcurses diff --git a/configure/os/CONFIG.Common.hpux-parisc b/configure/os/CONFIG.Common.hpux-parisc index fa3a30894..93a1cee7b 100644 --- a/configure/os/CONFIG.Common.hpux-parisc +++ b/configure/os/CONFIG.Common.hpux-parisc @@ -26,6 +26,9 @@ LOADABLE_SHRLIB_SUFFIX = .sl$(addprefix .,$(LOADABLE_SHRLIB_VERSION)) # Set runtime path for shared libraries empty:= # trick from the make docs... space:= $(empty) $(empty) -RUNTIME_LDFLAGS = -Wl,+b$(subst $(space),:,$(sort $(SHRLIB_SEARCH_FULLPATHDIRS))),+s +SHRLIBDIR_LDFLAGS += -Wl,+b$(subst $(space),:,$(SHRLIB_DEPLIB_DIRS)),+s + +# Set runtime path for products +PRODDIR_LDFLAGS += -Wl,+b$(subst $(space),:,$(PROD_DEPLIB_DIRS)),+s GNU_TARGET=parisc-hp-unix diff --git a/configure/os/CONFIG.Common.interix-x86 b/configure/os/CONFIG.Common.interix-x86 index 56baa2997..2a4c9e15e 100644 --- a/configure/os/CONFIG.Common.interix-x86 +++ b/configure/os/CONFIG.Common.interix-x86 @@ -29,7 +29,10 @@ ARCH_DEP_CPPFLAGS += -D_X86_ OP_SYS_CPPFLAGS += -DUNIX # Set runtime path for shared libraries -RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-Wl,-rpath,%) +SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%) + +# Set runtime path for products +PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%) # Definitions used when COMMANDLINE_LIBRARY is READLINE INCLUDES_READLINE = -I$(GNU_DIR)/include diff --git a/configure/os/CONFIG.Common.linux-arm b/configure/os/CONFIG.Common.linux-arm index 49324b5c3..eddb0625e 100644 --- a/configure/os/CONFIG.Common.linux-arm +++ b/configure/os/CONFIG.Common.linux-arm @@ -15,8 +15,10 @@ ARCH_CLASS = arm ARCH_DEP_CPPFLAGS += -D_ARM_NWFP_ # Set runtime path for shared libraries -#RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_DIRS:%=-Wl,-rpath,%) -RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_DIRS:%=-Wl,-rpath-link,%) +SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%) + +# Set runtime path for products +PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%) ifdef CROSS GNU_TARGET=arm-linux diff --git a/configure/os/CONFIG.Common.linuxCommon b/configure/os/CONFIG.Common.linuxCommon index fafa7f9dc..d1cae64e3 100644 --- a/configure/os/CONFIG.Common.linuxCommon +++ b/configure/os/CONFIG.Common.linuxCommon @@ -23,7 +23,10 @@ OP_SYS_CPPFLAGS += -Dlinux OP_SYS_LDLIBS += -lrt # Set runtime path for shared libraries -RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-Wl,-rpath,%) +SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%) + +# Set runtime path for products +PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%) # Definitions used when COMMANDLINE_LIBRARY is READLINE LDLIBS_READLINE = -lreadline -lcurses diff --git a/configure/os/CONFIG.Common.solaris-sparc b/configure/os/CONFIG.Common.solaris-sparc index ce2427b59..42c39ff37 100644 --- a/configure/os/CONFIG.Common.solaris-sparc +++ b/configure/os/CONFIG.Common.solaris-sparc @@ -28,7 +28,11 @@ OP_SYS_CPPFLAGS += -DSOLARIS=$(SOLARIS_VERSION) $(COMPILER_CPPFLAGS) OP_SYS_LDFLAGS += $(COMPILER_LDFLAGS) # Set runtime path for shared libraries -RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-R%) +SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-R%) + +# Set runtime path for products +PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-R%) + RUNTIME_LDFLAGS += $(RUNTIME_LDFLAGS_$(COMMANDLINE_LIBRARY)) GNU_TARGET=sparc-sun-solaris2 diff --git a/configure/os/CONFIG.Common.solaris-x86 b/configure/os/CONFIG.Common.solaris-x86 index 0601b60bd..22bdf43bc 100644 --- a/configure/os/CONFIG.Common.solaris-x86 +++ b/configure/os/CONFIG.Common.solaris-x86 @@ -29,7 +29,11 @@ OP_SYS_LDFLAGS += $(COMPILER_LDFLAGS) ARCH_DEP_CPPFLAGS = -D_X86_ # Set runtime path for shared libraries -RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-R%) +SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-R%) + +# Set runtime path for products +PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-R%) + RUNTIME_LDFLAGS += $(RUNTIME_LDFLAGS_$(COMMANDLINE_LIBRARY)) GNU_TARGET=x86-sun-solaris2 diff --git a/configure/os/CONFIG.Common.win32-x86-cygwin b/configure/os/CONFIG.Common.win32-x86-cygwin index 4af24518d..c1905b66b 100644 --- a/configure/os/CONFIG.Common.win32-x86-cygwin +++ b/configure/os/CONFIG.Common.win32-x86-cygwin @@ -18,7 +18,10 @@ EXE=.exe COMPILER_CPPFLAGS = -D_REENTRANT # Set runtime path for shared libraries -RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-Wl,-rpath,%) +SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%) + +# Set runtime path for products +PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%) # Definitions used when COMMANDLINE_LIBRARY is READLINE INCLUDES_READLINE = -I$(GNU_DIR)/include diff --git a/configure/os/CONFIG.darwinCommon.darwinCommon b/configure/os/CONFIG.darwinCommon.darwinCommon index 15e056a23..1cd927905 100644 --- a/configure/os/CONFIG.darwinCommon.darwinCommon +++ b/configure/os/CONFIG.darwinCommon.darwinCommon @@ -74,7 +74,7 @@ CCC = $(GNU_BIN)/c++ # SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION) SHRLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined suppress \ - -install_name $(firstword $(SHRLIB_SEARCH_FULLPATHDIRS))/$@ \ + -install_name $(shell perl $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \ -compatibility_version $(EPICS_VERSION).$(EPICS_REVISION) \ -current_version $(SHRLIB_VERSION) SHRLIB_SUFFIX = .$(SHRLIB_VERSION).dylib diff --git a/configure/os/CONFIG_SITE.Common.hpux-parisc b/configure/os/CONFIG_SITE.Common.hpux-parisc index 2e54cfb29..62f142f77 100644 --- a/configure/os/CONFIG_SITE.Common.hpux-parisc +++ b/configure/os/CONFIG_SITE.Common.hpux-parisc @@ -10,9 +10,10 @@ # to $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) (or wherever you install # the EPICS shared libraries on your system) when invoking base # executables, or -# b) Add the path to SHRLIB_SEARCH_FULLPATHDIRS below, which will burn +# b) Add the path to SHRLIB_DEPLIB_DIRS and PROD_DEPLIB_DIRS below, which will burn # the runtime search path into the executables. #SHARED_LIBRARIES=YES # This is the absolute path to the generic INSTALL_LOCATION, for SHARED_LIBRARY searches. -SHRLIB_SEARCH_FULLPATHDIRS += /opt/epics/R$(EPICS_SHORT_VERSION)/base/$(EPICS_VERSION)-$(EPICS_REVISION)-$(EPICS_MODIFICATION)-$(EPICS_PATCH_LEVEL)$(EPICS_CVS_SNAPSHOT)$(EPICS_SITE_VSTRING)/lib/$(EPICS_HOST_ARCH) +SHRLIB_DEPLIB_DIRS += /opt/epics/R$(EPICS_SHORT_VERSION)/base/$(EPICS_VERSION)-$(EPICS_REVISION)-$(EPICS_MODIFICATION)-$(EPICS_PATCH_LEVEL)$(EPICS_CVS_SNAPSHOT)$(EPICS_SITE_VSTRING)/lib/$(EPICS_HOST_ARCH) +PROD_DEPLIB_DIRS += /opt/epics/R$(EPICS_SHORT_VERSION)/base/$(EPICS_VERSION)-$(EPICS_REVISION)-$(EPICS_MODIFICATION)-$(EPICS_PATCH_LEVEL)$(EPICS_CVS_SNAPSHOT)$(EPICS_SITE_VSTRING)/lib/$(EPICS_HOST_ARCH) diff --git a/configure/os/CONFIG_SITE.Common.linux-x86 b/configure/os/CONFIG_SITE.Common.linux-x86 index 9b5dde3b8..a963c5c83 100644 --- a/configure/os/CONFIG_SITE.Common.linux-x86 +++ b/configure/os/CONFIG_SITE.Common.linux-x86 @@ -12,8 +12,8 @@ # a) LD_LIBRARY_PATH must include the full absolute pathname to # $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) when invoking base # executables. -# b) Add the runtime path to SHRLIB_SEARCH_FULLPATHDIRS, which will add -# the named directory to the list contained in the executables. +# b) Add the runtime path to SHRLIB_DEPLIB_DIRS and PROD_DEPLIB_DIRS, which +# will add the named directory to the list contained in the executables. # c) Add the runtime path to /etc/ld.so.conf and run ldconfig # to inform the system of the shared library location. diff --git a/configure/os/CONFIG_SITE.Common.linux-x86_64 b/configure/os/CONFIG_SITE.Common.linux-x86_64 index 4c1387910..d4ba6a94a 100644 --- a/configure/os/CONFIG_SITE.Common.linux-x86_64 +++ b/configure/os/CONFIG_SITE.Common.linux-x86_64 @@ -12,8 +12,8 @@ # a) LD_LIBRARY_PATH must include the full absolute pathname to # $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) when invoking base # executables. -# b) Add the runtime path to SHRLIB_SEARCH_DIRS, which will add -# the named directory to the list contained in the executables. +# b) Add the runtime path to SHRLIB_DEPLIB_DIRS and PROD_DEPLIB_DIRS, which +# will add the named directory to the list contained in the executables. # c) Add the runtime path to /etc/ld.so.conf and run ldconfig # to inform the system of the shared library location.