diff options
author | Jose <jose@zeroc.com> | 2013-02-01 23:24:19 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2013-02-01 23:24:19 +0100 |
commit | ae9584247364f32e4308b9fa3d0600d499aee4d0 (patch) | |
tree | d38d3a45d05086f7ac5c1fb109a797efabf69f13 /cpp | |
parent | Fix for ICE-5140 - an opaque endpoint which doesn't specify -e is assumed to ... (diff) | |
download | ice-ae9584247364f32e4308b9fa3d0600d499aee4d0.tar.bz2 ice-ae9584247364f32e4308b9fa3d0600d499aee4d0.tar.xz ice-ae9584247364f32e4308b9fa3d0600d499aee4d0.zip |
Fixed (ICE-5211) - use @loader_path in OS X libraries and binaries instead of the hard coding path
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/config/Make.rules | 24 | ||||
-rw-r--r-- | cpp/config/Make.rules.Darwin | 33 | ||||
-rw-r--r-- | cpp/src/FreezeScript/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/Glacier2/Makefile | 1 | ||||
-rw-r--r-- | cpp/src/IceBox/Makefile | 5 | ||||
-rw-r--r-- | cpp/src/IceGrid/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/IcePatch2/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/IceStorm/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/slice2confluence/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/slice2cs/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/slice2freeze/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/slice2freezej/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/slice2html/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/slice2java/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/slice2php/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/slice2py/Makefile | 6 | ||||
-rw-r--r-- | cpp/src/slice2rb/Makefile | 6 |
18 files changed, 109 insertions, 38 deletions
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules index 8c16b33b326..328cd9910c2 100644 --- a/cpp/config/Make.rules +++ b/cpp/config/Make.rules @@ -189,8 +189,8 @@ include $(top_srcdir)/config/Make.rules.$(UNAME) install_includedir := $(prefix)/include install_docdir := $(prefix)/doc -install_bindir := $(prefix)/$(binsubdir) -install_libdir := $(prefix)/$(libsubdir) +install_bindir := $(prefix)/$(binsubdir)$(cpp11suffix) +install_libdir := $(prefix)/$(libsubdir)$(cpp11suffix) install_configdir := $(prefix)/config ifneq ($(embedded_runpath_prefix),) @@ -222,9 +222,9 @@ endif ifneq ($(DB_HOME),) DB_FLAGS = -I$(DB_HOME)/include ifeq ($(DB_LIBS),) - DB_LIBS = -L$(DB_HOME)/$(libsubdir) -ldb_cxx + DB_LIBS = -L$(DB_HOME)/$(libsubdir)$(cpp11suffix) -ldb_cxx endif - DB_RPATH_LINK = $(call rpathlink,$(DB_HOME)/$(libsubdir)) + DB_RPATH_LINK = $(call rpathlink,$(DB_HOME)/$(libsubdir)$(cpp11suffix)) else ifeq ($(shell if [ -d /usr/include/db53 -a -d /usr/$(libsubdir)/db53 ] ; then echo yes; fi), yes) DB_FLAGS = -I/usr/include/db53 @@ -241,7 +241,7 @@ endif EXPAT_FLAGS = $(if $(EXPAT_HOME),-I$(EXPAT_HOME)/include) ifeq ($(EXPAT_LIBS),) - EXPAT_LIBS = $(if $(EXPAT_HOME),-L$(EXPAT_HOME)/$(libsubdir)) -lexpat + EXPAT_LIBS = $(if $(EXPAT_HOME),-L$(EXPAT_HOME)/$(libsudir)) -lexpat endif EXPAT_RPATH_LINK = $(if $(EXPAT_HOME),$(call rpathlink,$(EXPAT_HOME)/$(libsubdir))) @@ -269,7 +269,7 @@ else ifdef ice_src_dist LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir) else - LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(ice_dir)/$(libsubdir) + LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(ice_dir)/$(libsubdir)$(cpp11suffix) endif endif @@ -293,10 +293,16 @@ ifdef ice_src_dist SLICEPARSERLIB = $(libdir)/$(call mklibfilename,Slice,$(VERSION)) SLICE2CPP = $(bindir)/slice2cpp SLICE2FREEZE = $(bindir)/slice2freeze + ifeq ($(RPATH_DIR),) + RPATH_DIR = @loader_path/$(libdir) + endif else - SLICEPARSERLIB = $(ice_dir)/$(libsubdir)/$(call mklibfilename,Slice,$(VERSION)) - SLICE2CPP = $(ice_dir)/$(binsubdir)/slice2cpp - SLICE2FREEZE = $(ice_dir)/$(binsubdir)/slice2freeze + SLICEPARSERLIB = $(ice_dir)/$(libsubdir)$(cpp11suffix)/$(call mklibfilename,Slice,$(VERSION)) + SLICE2CPP = $(ice_dir)/$(binsubdir)$(cpp11suffix)/slice2cpp + SLICE2FREEZE = $(ice_dir)/$(binsubdir)$(cpp11suffix)/slice2freeze + ifeq ($(RPATH_DIR),) + RPATH_DIR = $(ice_dir)/$(libsubdir)$(cpp11suffix) + endif endif ifeq ($(SLICE_LIBS),) diff --git a/cpp/config/Make.rules.Darwin b/cpp/config/Make.rules.Darwin index f5f8682cdb8..054cf6cad3d 100644 --- a/cpp/config/Make.rules.Darwin +++ b/cpp/config/Make.rules.Darwin @@ -37,13 +37,8 @@ endif # CXXLIBS = -ifneq ($(embedded_runpath_prefix),) - # Only use -rpath if OS X >= 10.5 - release = $(shell uname -r) - ifeq ($(shell test $(firstword $(subst ., ,$(release))) -ge 9 && echo 0),0) - LDPLATFORMFLAGS = -Wl,-rpath,$(runpath_libdir) - endif -endif + +LDPLATFORMFLAGS = -Wl,-rpath,$(RPATH_DIR) ifeq ($(CXX),g++) LDPLATFORMFLAGS += -rdynamic @@ -53,7 +48,7 @@ endif ifdef ice_src_dist shlibldflags = $(CXXFLAGS) -L$(libdir) else - shlibldflags = $(CXXFLAGS) -L$(ice_dir)/$(libsubdir) + shlibldflags = $(CXXFLAGS) -L$(ice_dir)/$(libsubdir)$(cpp11suffix) endif mklibfilename = $(if $(2),lib$(1).$(2).dylib,lib$(1).dylib) @@ -62,27 +57,7 @@ mksoname = $(if $(2),lib$(1).$(2).dylib,lib$(1).dylib) mklibname = lib$(1).dylib curdir = $(shell pwd) -ifneq ($(embedded_runpath_prefix),) - mkshlib = $(CXX) -dynamiclib $(shlibldflags) -o $(1) -install_name $(runpath_libdir)/$(2) $(3) $(4) -else - mkshlib = $(CXX) -dynamiclib $(shlibldflags) -o $(1) -install_name $(2) $(3) $(4) -endif - -ifeq ($(DB_HOME),) - # - # If DB_HOME is not set and the BerkeleyDB library is not at the expected location - # but in the ICE_DIR/lib directory, we set DB_RPATH_LINK to tell the linker where - # to find it. - # - ifndef ice_src_dist - ifeq ($(shell test -f $(ice_dir)/$(libsubdir)/libFreeze.$(VERSION).dylib && echo 0),0) - dblib_install_name=$(firstword $(strip $(shell otool -L $(ice_dir)/$(libsubdir)/libFreeze.$(VERSION).dylib | grep libdb_cxx))) - ifeq ($(shell test ! -f $(dblib_install_name) -a -f $(ice_dir)/$(libsubdir)/$(notdir $(dblib_install_name)) && echo 0),0) - DB_RPATH_LINK=-dylib_file $(dblib_install_name):$(ice_dir)/$(libsubdir)/$(notdir $(dblib_install_name)) - endif - endif - endif -endif +mkshlib = $(CXX) -dynamiclib $(shlibldflags) -o $(1) -install_name @rpath/$(2) $(3) $(4) # # Avoid OpenSSL deprecation warnings on OS X diff --git a/cpp/src/FreezeScript/Makefile b/cpp/src/FreezeScript/Makefile index 55cab10a8a2..aefbc02cc44 100644 --- a/cpp/src/FreezeScript/Makefile +++ b/cpp/src/FreezeScript/Makefile @@ -37,6 +37,12 @@ SRCS = $(COMMON_OBJS:.o=.cpp) $(TRANSFORM_OBJS:.o=.cpp) $(DUMP_OBJS:.o=.cpp) HDIR = $(headerdir)/FreezeScript +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I.. $(CPPFLAGS) $(DB_FLAGS) diff --git a/cpp/src/Glacier2/Makefile b/cpp/src/Glacier2/Makefile index 54d695202b3..17fcd86fe47 100644 --- a/cpp/src/Glacier2/Makefile +++ b/cpp/src/Glacier2/Makefile @@ -31,6 +31,7 @@ OBJS = Blobject.o \ SRCS = $(OBJS:.o=.cpp) SLICE_SRCS = Instrumentation.ice +RPATH_DIR = @loader_path/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/IceBox/Makefile b/cpp/src/IceBox/Makefile index 9039c7a0c52..a734126913d 100644 --- a/cpp/src/IceBox/Makefile +++ b/cpp/src/IceBox/Makefile @@ -36,6 +36,11 @@ SLICE_SRCS = $(SDIR)/IceBox.ice HDIR = $(headerdir)/IceBox SDIR = $(slicedir)/IceBox +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/IceGrid/Makefile b/cpp/src/IceGrid/Makefile index 49fc81d4ae6..b1d86701bfb 100644 --- a/cpp/src/IceGrid/Makefile +++ b/cpp/src/IceGrid/Makefile @@ -91,6 +91,12 @@ SLICE_SRCS = ../IceGrid/Internal.ice HDIR = $(headerdir)/IceGrid SDIR = $(slicedir)/IceGrid +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := $(CPPFLAGS) -I.. $(OPENSSL_FLAGS) $(READLINE_FLAGS) diff --git a/cpp/src/IcePatch2/Makefile b/cpp/src/IcePatch2/Makefile index 1af3f6a3f96..739f0924c5f 100644 --- a/cpp/src/IcePatch2/Makefile +++ b/cpp/src/IcePatch2/Makefile @@ -26,6 +26,12 @@ SRCS = $(SOBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(CALCOBJS:.o=.cpp) +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I.. $(CPPFLAGS) $(OPENSSL_FLAGS) $(BZIP2_FLAGS) diff --git a/cpp/src/IceStorm/Makefile b/cpp/src/IceStorm/Makefile index 486feda466c..ce1df2ef93e 100644 --- a/cpp/src/IceStorm/Makefile +++ b/cpp/src/IceStorm/Makefile @@ -57,6 +57,12 @@ SLICE_SRCS = ../IceStorm/Instrumentation.ice \ HDIR = $(headerdir)/IceStorm SDIR = $(slicedir)/IceStorm +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := $(CPPFLAGS) -I.. -DICESTORM_SERVICE_API_EXPORTS $(READLINE_FLAGS) diff --git a/cpp/src/slice2confluence/Makefile b/cpp/src/slice2confluence/Makefile index 9f208b78d42..e089f793a3a 100644 --- a/cpp/src/slice2confluence/Makefile +++ b/cpp/src/slice2confluence/Makefile @@ -19,6 +19,12 @@ OBJS = Gen.o \ SRCS = $(OBJS:.o=.cpp) +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) diff --git a/cpp/src/slice2cpp/Makefile b/cpp/src/slice2cpp/Makefile index 23878a96552..2422a83f79b 100644 --- a/cpp/src/slice2cpp/Makefile +++ b/cpp/src/slice2cpp/Makefile @@ -18,6 +18,12 @@ OBJS = Gen.o \ SRCS = $(OBJS:.o=.cpp) +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) diff --git a/cpp/src/slice2cs/Makefile b/cpp/src/slice2cs/Makefile index 80fe27c260d..983407fc6a4 100644 --- a/cpp/src/slice2cs/Makefile +++ b/cpp/src/slice2cs/Makefile @@ -18,6 +18,12 @@ OBJS = Gen.o \ SRCS = $(OBJS:.o=.cpp) +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) diff --git a/cpp/src/slice2freeze/Makefile b/cpp/src/slice2freeze/Makefile index fd2bbf3d914..eaadda3cbac 100644 --- a/cpp/src/slice2freeze/Makefile +++ b/cpp/src/slice2freeze/Makefile @@ -17,6 +17,12 @@ OBJS = Main.o SRCS = $(OBJS:.o=.cpp) +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) diff --git a/cpp/src/slice2freezej/Makefile b/cpp/src/slice2freezej/Makefile index cd08aef06fb..5e618c5ec1e 100644 --- a/cpp/src/slice2freezej/Makefile +++ b/cpp/src/slice2freezej/Makefile @@ -17,6 +17,12 @@ OBJS = Main.o SRCS = $(OBJS:.o=.cpp) +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) diff --git a/cpp/src/slice2html/Makefile b/cpp/src/slice2html/Makefile index db66645c7e6..cbee8632156 100644 --- a/cpp/src/slice2html/Makefile +++ b/cpp/src/slice2html/Makefile @@ -18,6 +18,12 @@ OBJS = Gen.o \ SRCS = $(OBJS:.o=.cpp) +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) diff --git a/cpp/src/slice2java/Makefile b/cpp/src/slice2java/Makefile index e21e18b0d27..c5c28ed2d1d 100644 --- a/cpp/src/slice2java/Makefile +++ b/cpp/src/slice2java/Makefile @@ -18,6 +18,12 @@ OBJS = Gen.o \ SRCS = $(OBJS:.o=.cpp) +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) diff --git a/cpp/src/slice2php/Makefile b/cpp/src/slice2php/Makefile index a897e731637..b9a424bcfac 100644 --- a/cpp/src/slice2php/Makefile +++ b/cpp/src/slice2php/Makefile @@ -17,6 +17,12 @@ OBJS = Main.o SRCS = $(OBJS:.o=.cpp) +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) diff --git a/cpp/src/slice2py/Makefile b/cpp/src/slice2py/Makefile index caff4973fe4..7757501aa14 100644 --- a/cpp/src/slice2py/Makefile +++ b/cpp/src/slice2py/Makefile @@ -17,6 +17,12 @@ OBJS = Main.o SRCS = $(OBJS:.o=.cpp) +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) diff --git a/cpp/src/slice2rb/Makefile b/cpp/src/slice2rb/Makefile index 7e91e778da1..f56dbd07c07 100644 --- a/cpp/src/slice2rb/Makefile +++ b/cpp/src/slice2rb/Makefile @@ -17,6 +17,12 @@ OBJS = Main.o SRCS = $(OBJS:.o=.cpp) +ifeq ($(CPP11),yes) +RPATH_DIR = @loader_path/../../lib/c++11 +else +RPATH_DIR = @loader_path/../lib +endif + include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) |