From 03268bc68397bf6982481c7971eb85f0a04c59a9 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 11 Sep 2019 00:24:19 -0700 Subject: [PATCH 1/4] Shared lib rpath should not depend on whether or not static libs are also being built. --- configure/os/CONFIG.Common.linuxCommon | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure/os/CONFIG.Common.linuxCommon b/configure/os/CONFIG.Common.linuxCommon index 965de09b8..487d7f74b 100644 --- a/configure/os/CONFIG.Common.linuxCommon +++ b/configure/os/CONFIG.Common.linuxCommon @@ -23,10 +23,10 @@ STATIC_LDFLAGS_YES= -Wl,-Bstatic STATIC_LDFLAGS_NO= STATIC_LDLIBS_YES= -Wl,-Bdynamic -# Set runtime path for shared libraries if USE_RPATH=YES and STATIC_BUILD=NO -SHRLIBDIR_RPATH_LDFLAGS_YES_NO = $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%) +# Set runtime path for shared libraries if USE_RPATH=YES +SHRLIBDIR_RPATH_LDFLAGS_YES = $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%) SHRLIBDIR_LDFLAGS += \ - $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)_$(STATIC_BUILD)) + $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)) # Set runtime path for products if USE_RPATH=YES and STATIC_BUILD=NO PRODDIR_RPATH_LDFLAGS_YES_NO = $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%) From 8c5d93d0442b643c0ec940556b2b8f936fc2f4da Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 26 Sep 2019 16:13:49 -0700 Subject: [PATCH 2/4] Also apply rpath change to PRODDIR_RPATH_LDFLAGS --- configure/os/CONFIG.Common.linuxCommon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure/os/CONFIG.Common.linuxCommon b/configure/os/CONFIG.Common.linuxCommon index 487d7f74b..eefd5a340 100644 --- a/configure/os/CONFIG.Common.linuxCommon +++ b/configure/os/CONFIG.Common.linuxCommon @@ -29,9 +29,9 @@ SHRLIBDIR_LDFLAGS += \ $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)) # Set runtime path for products if USE_RPATH=YES and STATIC_BUILD=NO -PRODDIR_RPATH_LDFLAGS_YES_NO = $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%) +PRODDIR_RPATH_LDFLAGS_YES = $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%) PRODDIR_LDFLAGS += \ - $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)_$(STATIC_BUILD)) + $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)) # Link libraries controlled by COMMANDLINE_LIBRARY # The newest Linux versions only need readline, older ones need both From feb44624a1557eab363d2fb80a31cbdadf3d3d48 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 26 Sep 2019 16:32:08 -0700 Subject: [PATCH 3/4] Fix comment as well --- configure/os/CONFIG.Common.linuxCommon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure/os/CONFIG.Common.linuxCommon b/configure/os/CONFIG.Common.linuxCommon index eefd5a340..d7f5b414b 100644 --- a/configure/os/CONFIG.Common.linuxCommon +++ b/configure/os/CONFIG.Common.linuxCommon @@ -28,7 +28,7 @@ SHRLIBDIR_RPATH_LDFLAGS_YES = $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%) SHRLIBDIR_LDFLAGS += \ $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)) -# Set runtime path for products if USE_RPATH=YES and STATIC_BUILD=NO +# Set runtime path for products if USE_RPATH=YES PRODDIR_RPATH_LDFLAGS_YES = $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%) PRODDIR_LDFLAGS += \ $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)) From 4f0c9c97c6265f2a37ace54824ad4cf3bc453203 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 26 Sep 2019 16:34:21 -0700 Subject: [PATCH 4/4] Another comment fix --- configure/os/CONFIG.Common.linuxCommon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure/os/CONFIG.Common.linuxCommon b/configure/os/CONFIG.Common.linuxCommon index d7f5b414b..5405be723 100644 --- a/configure/os/CONFIG.Common.linuxCommon +++ b/configure/os/CONFIG.Common.linuxCommon @@ -23,12 +23,12 @@ STATIC_LDFLAGS_YES= -Wl,-Bstatic STATIC_LDFLAGS_NO= STATIC_LDLIBS_YES= -Wl,-Bdynamic -# Set runtime path for shared libraries if USE_RPATH=YES +# Set runtime path for shared libraries if LINKER_USE_RPATH=YES SHRLIBDIR_RPATH_LDFLAGS_YES = $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%) SHRLIBDIR_LDFLAGS += \ $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)) -# Set runtime path for products if USE_RPATH=YES +# Set runtime path for products if LINKER_USE_RPATH=YES PRODDIR_RPATH_LDFLAGS_YES = $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%) PRODDIR_LDFLAGS += \ $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))