diff options
author | Jose <jose@zeroc.com> | 2014-11-21 00:25:58 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2014-11-21 00:25:58 +0100 |
commit | d91c43b27167233345d78255908fec24fb1d71af (patch) | |
tree | bbe89eff20f712d7badbbc81b8339c66ccef911b | |
parent | DistUtil typo (diff) | |
download | ice-d91c43b27167233345d78255908fec24fb1d71af.tar.bz2 ice-d91c43b27167233345d78255908fec24fb1d71af.tar.xz ice-d91c43b27167233345d78255908fec24fb1d71af.zip |
More updates for ICE-5931, ICE-5935
-rw-r--r-- | cpp/config/Make.rules | 14 | ||||
-rw-r--r-- | cpp/config/Make.rules.Darwin | 16 | ||||
-rw-r--r-- | cpp/config/Make.rules.Linux | 31 | ||||
-rw-r--r-- | cpp/src/FreezeScript/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/Glacier2/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IceBox/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IcePatch2/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IceStorm/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2confluence/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2cs/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2freeze/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2freezej/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2html/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2java/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2js/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2php/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2py/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/slice2rb/Makefile | 2 | ||||
-rw-r--r-- | cpp/test/Freeze/dbmap/Makefile | 2 | ||||
-rwxr-xr-x | cpp/test/Slice/errorDetection/run.py | 1 | ||||
-rw-r--r-- | demoscript/Util.py | 12 | ||||
-rw-r--r-- | distribution/src/common/Make.rules | 11 | ||||
-rwxr-xr-x | scripts/TestUtil.py | 19 |
25 files changed, 82 insertions, 58 deletions
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules index ebb87fc17ce..915d28b729c 100644 --- a/cpp/config/Make.rules +++ b/cpp/config/Make.rules @@ -20,6 +20,20 @@ prefix ?= /opt/Ice-$(VERSION) #OPTIMIZE = yes # +# The "root directory" for runpath embedded in executables. Can be set +# to change the runpath added to Ice executables. The default is +# platform dependent. +# +#embedded_runpath_prefix ?= /opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR) + +# +# Define create_runpath_symlink as yes if you would like 'make install' +# to automatically create a symbolic link for the embedded runpath +# directory. Only applies if embedded_runpath_prefix is also set. +# +create_runpath_symlink ?= no + +# # Define LP64 as yes or no if you want force a 32 or 64 bit. The # default is platform-dependent. This property has no effect on # OS X. On OS X, use CXXARCHFLAGS bellow to establish the build diff --git a/cpp/config/Make.rules.Darwin b/cpp/config/Make.rules.Darwin index baafa004a4d..802a78d7dcc 100644 --- a/cpp/config/Make.rules.Darwin +++ b/cpp/config/Make.rules.Darwin @@ -43,6 +43,15 @@ endif # CXXLIBS = +LOADER_PATH = @loader_path + +# +# If embedded_runpath_prefix is set it has preference +# +ifneq ($(embedded_runpath_prefix),) +RPATH_DIR = $(embedded_runpath_prefix) +endif + ifeq ($(RPATH_DIR),) ifdef ice_src_dist RPATH_DIR = @loader_path/$(libdir) @@ -51,6 +60,13 @@ RPATH_DIR = $(ice_dir)/$(libsubdir) endif endif +# +# Clear rpath setting when doing a system install +# +ifeq ($(ice_dir),/usr) +RPATH_DIR = +endif + ifneq ($(RPATH_DIR),) LDEXEFLAGS = -Wl,-rpath,$(RPATH_DIR) endif diff --git a/cpp/config/Make.rules.Linux b/cpp/config/Make.rules.Linux index ccee5486940..ef24cff950a 100644 --- a/cpp/config/Make.rules.Linux +++ b/cpp/config/Make.rules.Linux @@ -90,6 +90,31 @@ ifeq ($(CXX),g++) else CXXFLAGS += -g endif + + LOADER_PATH = \$$ORIGIN + + ifneq ($(embedded_runpath_prefix),) + RPATH_DIR = $(embedded_runpath_prefix) + endif + + ifeq ($(RPATH_DIR),) + ifdef ice_src_dist + RPATH_DIR = \$$ORIGIN/$(libdir) + else + RPATH_DIR = $(ice_dir)/$(libsubdir) + endif + endif + + # + # Clear the rpath dir when doing a system install. + # + ifeq ($(ice_dir), /usr) + RPATH_DIR = + endif + + ifneq ($(RPATH_DIR),) + LDEXEFLAGS = -Wl,-rpath,$(RPATH_DIR) + endif # # C++ run-time libraries, necessary for linking some shared libraries. @@ -102,12 +127,6 @@ ifeq ($(CXX),g++) rpathlink = -Wl,-rpath-link,$(1) - ifneq ($(embedded_runpath_prefix),) - LDPLATFORMFLAGS = -Wl,--enable-new-dtags -Wl,-rpath,$(runpath_libdir) - else - LDPLATFORMFLAGS = -Wl,--enable-new-dtags - endif - LDPLATFORMFLAGS += -rdynamic endif diff --git a/cpp/src/FreezeScript/Makefile b/cpp/src/FreezeScript/Makefile index aa54d63ad78..04d83e89767 100644 --- a/cpp/src/FreezeScript/Makefile +++ b/cpp/src/FreezeScript/Makefile @@ -37,7 +37,7 @@ OBJS = $(COMMON_OBJS) $(TRANSFORM_OBJS) $(DUMP_OBJS) HDIR = $(headerdir)/FreezeScript -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/Glacier2/Makefile b/cpp/src/Glacier2/Makefile index bd6df67448d..1f0de439f88 100644 --- a/cpp/src/Glacier2/Makefile +++ b/cpp/src/Glacier2/Makefile @@ -29,7 +29,7 @@ OBJS = Blobject.o \ SessionRouterI.o \ $(SLICE_OBJS) -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/IceBox/Makefile b/cpp/src/IceBox/Makefile index 791bbed83bc..7eab34ce886 100644 --- a/cpp/src/IceBox/Makefile +++ b/cpp/src/IceBox/Makefile @@ -36,7 +36,7 @@ OBJS = $(LIB_OBJS) \ HDIR = $(headerdir)/IceBox SDIR = $(slicedir)/IceBox -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/IceGrid/Makefile b/cpp/src/IceGrid/Makefile index efb2d4397b9..7ff86f06937 100644 --- a/cpp/src/IceGrid/Makefile +++ b/cpp/src/IceGrid/Makefile @@ -96,7 +96,7 @@ OBJS = $(ADMIN_OBJS) \ SDIR = $(slicedir)/IceGrid -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/IcePatch2/Makefile b/cpp/src/IcePatch2/Makefile index 3d90ffd2bfb..0f98285f0a2 100644 --- a/cpp/src/IcePatch2/Makefile +++ b/cpp/src/IcePatch2/Makefile @@ -26,7 +26,7 @@ OBJS = $(SOBJS) \ $(COBJS) \ $(CALCOBJS) -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/IceStorm/Makefile b/cpp/src/IceStorm/Makefile index c2e13f23f8c..03f056c7f18 100644 --- a/cpp/src/IceStorm/Makefile +++ b/cpp/src/IceStorm/Makefile @@ -62,7 +62,7 @@ OBJS = $(LIB_OBJS) \ $(AOBJS) \ $(MOBJS) -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib SLICE2FREEZECMD = $(SLICE2FREEZE) -I../.. --ice --include-dir IceStorm $(ICECPPFLAGS) diff --git a/cpp/src/slice2confluence/Makefile b/cpp/src/slice2confluence/Makefile index 832031d87ef..5ad81d6a5e3 100644 --- a/cpp/src/slice2confluence/Makefile +++ b/cpp/src/slice2confluence/Makefile @@ -17,7 +17,7 @@ OBJS = ConfluenceOutput.o \ Gen.o \ Main.o -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2cpp/Makefile b/cpp/src/slice2cpp/Makefile index 540c8609532..fbc5f7430df 100644 --- a/cpp/src/slice2cpp/Makefile +++ b/cpp/src/slice2cpp/Makefile @@ -16,7 +16,7 @@ TARGETS = $(NAME) OBJS = Gen.o \ Main.o -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2cs/Makefile b/cpp/src/slice2cs/Makefile index ed26cb5615c..38ff24ad63f 100644 --- a/cpp/src/slice2cs/Makefile +++ b/cpp/src/slice2cs/Makefile @@ -16,7 +16,7 @@ TARGETS = $(NAME) OBJS = Gen.o \ Main.o -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2freeze/Makefile b/cpp/src/slice2freeze/Makefile index 938b75b50f2..437127d8768 100644 --- a/cpp/src/slice2freeze/Makefile +++ b/cpp/src/slice2freeze/Makefile @@ -15,7 +15,7 @@ TARGETS = $(NAME) OBJS = Main.o -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2freezej/Makefile b/cpp/src/slice2freezej/Makefile index 75709f97478..a15b090fc22 100644 --- a/cpp/src/slice2freezej/Makefile +++ b/cpp/src/slice2freezej/Makefile @@ -15,7 +15,7 @@ TARGETS = $(NAME) OBJS = Main.o -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2html/Makefile b/cpp/src/slice2html/Makefile index 91daaa61089..9e6fa3afe31 100644 --- a/cpp/src/slice2html/Makefile +++ b/cpp/src/slice2html/Makefile @@ -16,7 +16,7 @@ TARGETS = $(NAME) OBJS = Gen.o \ Main.o -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2java/Makefile b/cpp/src/slice2java/Makefile index a70c830417a..80aef0db207 100644 --- a/cpp/src/slice2java/Makefile +++ b/cpp/src/slice2java/Makefile @@ -16,7 +16,7 @@ TARGETS = $(NAME) OBJS = Gen.o \ Main.o -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2js/Makefile b/cpp/src/slice2js/Makefile index 63053c3a533..7bbac96602b 100644 --- a/cpp/src/slice2js/Makefile +++ b/cpp/src/slice2js/Makefile @@ -17,7 +17,7 @@ OBJS = Gen.o \ JsUtil.o \ Main.o -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2php/Makefile b/cpp/src/slice2php/Makefile index f2a7e6cb7a3..fb119c74be1 100644 --- a/cpp/src/slice2php/Makefile +++ b/cpp/src/slice2php/Makefile @@ -15,7 +15,7 @@ TARGETS = $(NAME) OBJS = Main.o -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2py/Makefile b/cpp/src/slice2py/Makefile index 3f003a08cbe..75f8d6ebbbe 100644 --- a/cpp/src/slice2py/Makefile +++ b/cpp/src/slice2py/Makefile @@ -15,7 +15,7 @@ TARGETS = $(NAME) OBJS = Main.o -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/src/slice2rb/Makefile b/cpp/src/slice2rb/Makefile index b8029ca3a86..37f39017927 100644 --- a/cpp/src/slice2rb/Makefile +++ b/cpp/src/slice2rb/Makefile @@ -15,7 +15,7 @@ TARGETS = $(NAME) OBJS = Main.o -RPATH_DIR = @loader_path/../lib +RPATH_DIR = $(LOADER_PATH)/../lib include $(top_srcdir)/config/Make.rules diff --git a/cpp/test/Freeze/dbmap/Makefile b/cpp/test/Freeze/dbmap/Makefile index 71c8e5f93e9..82c1387fbd7 100644 --- a/cpp/test/Freeze/dbmap/Makefile +++ b/cpp/test/Freeze/dbmap/Makefile @@ -30,7 +30,7 @@ CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(OBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(DB_RPATH_LINK) -lFreeze $(LIBS) + $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(OBJS) $(DB_RPATH_LINK) -lFreeze $(LIBS) # The slice2freeze rules are structured like this to avoid issues with # parallel make. diff --git a/cpp/test/Slice/errorDetection/run.py b/cpp/test/Slice/errorDetection/run.py index 4f5e1d40d55..054340edeaa 100755 --- a/cpp/test/Slice/errorDetection/run.py +++ b/cpp/test/Slice/errorDetection/run.py @@ -39,7 +39,6 @@ for file in files: command = slice2cpp + ' --underscore -I. "%s"' % os.path.join(os.getcwd(), file) else: command = slice2cpp + ' -I. "%s"' % os.path.join(os.getcwd(), file) - p = TestUtil.runCommand(command) (stdin, stdout, stderr) = (p.stdin, p.stdout, p.stderr) diff --git a/demoscript/Util.py b/demoscript/Util.py index c295faa5e2a..446e5c7e6a1 100644 --- a/demoscript/Util.py +++ b/demoscript/Util.py @@ -284,8 +284,10 @@ def configurePaths(): if subdir: binDir = os.path.join(binDir, subdir) + if isUbuntu() and iceHome == "/usr": + libDir = os.path.join(libDir, "x86_64-linux-gnu" if x64 else "i386-linux-gnu") # Add x64 sub-directory - if x64: + elif x64: if isSolaris(): if isSparc(): libDir = os.path.join(libDir, "64") @@ -299,16 +301,12 @@ def configurePaths(): libDir = libDir + "64" binDir = binDir + "64" - if isDarwin() and cpp11: - libDir = os.path.join(libDir, "c++11") - binDir = os.path.join(binDir, "c++11") - if binDir != os.path.join(getIceDir("cpp"), "bin"): addenv("PATH", binDir) # # For OS X we don't need to set any library path for C++ # - if libDir and not isDarwin(): + if libDir and not isDarwin() and iceHome != "/usr": addLdPath(libDir) if not iceHome: @@ -832,6 +830,8 @@ def addLdPath(libpath): addenv("LD_LIBRARY_PATH_64", libpath) else: addenv("LD_LIBRARY_PATH", libpath) + elif isDarwin(): + addenv("DYLD_LIBRARY_PATH", libpath) else: addenv("LD_LIBRARY_PATH", libpath) diff --git a/distribution/src/common/Make.rules b/distribution/src/common/Make.rules index 83df85ef0dd..e3753ace47b 100644 --- a/distribution/src/common/Make.rules +++ b/distribution/src/common/Make.rules @@ -8,12 +8,6 @@ # ********************************************************************** # -# The "root directory" for runpath embedded in executables. Can be unset -# to avoid adding a runpath to Ice executables. -# -embedded_runpath_prefix ?= /opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR) - -# # Define OPTIMIZE as yes if you want to build with # optimization. Otherwise Ice is build with debug information. # @@ -80,10 +74,6 @@ includedir = $(ice_dir)/include # include $(top_srcdir)/config/Make.rules.$(UNAME) -ifneq ($(embedded_runpath_prefix),) - runpath_libdir := $(embedded_runpath_prefix)/$(libsubdir)$(cpp11suffix) -endif - ICECPPFLAGS = -I$(slicedir) SLICE2CPPFLAGS = $(ICECPPFLAGS) @@ -114,7 +104,6 @@ endif SLICEPARSERLIB = $(ice_dir)/$(libsubdir)/$(subst $(cpp11libsuffix),,$(call mklibfilename,Slice,$(VERSION))) SLICE2CPP = $(ice_dir)/$(binsubdir)/slice2cpp SLICE2FREEZE = $(ice_dir)/$(binsubdir)/slice2freeze -RPATH_DIR = $(ice_dir)/$(libsubdir) EVERYTHING = all clean EVERYTHING_EXCEPT_ALL = clean diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py index a1ac873cf85..88639a8c9ed 100755 --- a/scripts/TestUtil.py +++ b/scripts/TestUtil.py @@ -1750,22 +1750,9 @@ def getTestEnv(lang, testdir): addPathToEnv("NODE_PATH", os.path.join(testdir), env) return env # That's it, we're done! - if isWin32(): - libDir = getCppBinDir(lang) - else: - libDir = os.path.join(getIceDir("cpp", testdir), "lib") - if iceHome: - if x64: - if isSolaris(): - if isSparc(): - libDir = os.path.join(libDir, "64") - else: - libDir = os.path.join(libDir, "amd64") - elif not isDarwin(): - libDir = libDir + "64" - - addLdPath(libDir, env) - + if not isDarwin() and iceHome != "/usr": + addLdPath(getCppLibDir(), env) + if lang == "javae": javaDir = os.path.join(getIceDir("javae", testdir), "jdk", "lib") addClasspath(os.path.join(javaDir, "IceE.jar"), env) |