Changes to add ALL library dirs to the runtime search option on link line.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user