From 9c0e8016749124de2ab7ac040fc40c086052ef38 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 13 Dec 2002 17:17:07 +0000 Subject: [PATCH] Added SHRLIB_SEARCH_DIRS option to linux-x86, allows absolute paths to shared library directories to be burned into executable and shared library products. --- configure/os/CONFIG.Common.linux-x86 | 6 ++++++ configure/os/CONFIG_SITE.Common.linux-x86 | 17 +++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/configure/os/CONFIG.Common.linux-x86 b/configure/os/CONFIG.Common.linux-x86 index 81bbc798c..fa173c315 100644 --- a/configure/os/CONFIG.Common.linux-x86 +++ b/configure/os/CONFIG.Common.linux-x86 @@ -29,6 +29,12 @@ OP_SYS_LDLIBS += -lrt ARCH_DEP_CPPFLAGS += -D_X86_ ARCH_DEP_CFLAGS += -mcpu=pentium +ifeq ($(SHARED_LIBRARIES),YES) + # Set runtime path for shared libraries + PROD_LDFLAGS += $(sort $(SHRLIB_SEARCH_DIRS:%=-Wl,-rpath,%/lib/$(T_A))) + SHRLIB_LDFLAGS += $(sort $(SHRLIB_SEARCH_DIRS:%=-Wl,-rpath,%/lib/$(T_A))) +endif + ifdef CROSS GNU_TARGET=i586-pc-linux-gnu CMPLR_SUFFIX= diff --git a/configure/os/CONFIG_SITE.Common.linux-x86 b/configure/os/CONFIG_SITE.Common.linux-x86 index 0653ffd05..83c48a6e1 100644 --- a/configure/os/CONFIG_SITE.Common.linux-x86 +++ b/configure/os/CONFIG_SITE.Common.linux-x86 @@ -5,14 +5,19 @@ # Site Specific definitions for linux-x86 target # Only the local epics system manager should modify this file -# NOTE: If YES then LD_LIBRARY_PATH must include the full -# pathname $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) for -# both the base build and when invoking base executables. -# Alternatively the full pathname can be added to /etc/ld.so.conf -# and ldconfig run to inform the system of the shared libraries. - +# NOTE for SHARED_LIBRARIES: If YES then either +# a) LD_LIBRARY_PATH must include the full absolute pathname to +# $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) when invoking base +# executables. +# b) Add the path to SHRLIB_SEARCH_DIRS below, which will burn +# the runtime search path into the executables. +# c) the full pathname above can be added to /etc/ld.so.conf +# and ldconfig run to inform the system of the shared libraries. #SHARED_LIBRARIES=YES +# This is the absolute path to base, for SHARED_LIBRARY searches. +#SHRLIB_SEARCH_DIRS += /usr/local/epics/R3.14.1/base + # If readline is installed uncomment the following lines # to get command-line editing and history support #COMMANDLINE_LIBRARY = READLINE