From fc6cc0edd6589a01f53d497e3c3e4bf8b290f7e2 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 28 Feb 2014 16:16:51 +0000 Subject: With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202510 91177308-0d34-0410-b5e6-96231b3b80d8 --- Makefile.config.in | 3 --- autoconf/configure.ac | 4 ---- cmake/modules/AddLLVM.cmake | 10 ---------- configure | 11 +++-------- projects/sample/Makefile.llvm.config.in | 3 --- projects/sample/autoconf/configure.ac | 4 ---- projects/sample/configure | 9 ++------- test/Makefile | 1 - test/Unit/lit.cfg | 8 -------- test/Unit/lit.site.cfg.in | 1 - unittests/Makefile.unittest | 5 +---- 11 files changed, 6 insertions(+), 53 deletions(-) diff --git a/Makefile.config.in b/Makefile.config.in index 7633be29da..cf6a4f14d7 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -345,9 +345,6 @@ ENABLE_TIMESTAMPS := @ENABLE_TIMESTAMPS@ # Enable JIT for this platform TARGET_HAS_JIT = @TARGET_HAS_JIT@ -# Environment variable to set to change the runtime shared library search path. -SHLIBPATH_VAR = @SHLIBPATH_VAR@ - # Shared library extension for host platform. SHLIBEXT = @SHLIBEXT@ diff --git a/autoconf/configure.ac b/autoconf/configure.ac index f376e03d97..5b27873967 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -1902,10 +1902,6 @@ dnl Propagate the shared library extension that the libltdl checks did to dnl the Makefiles so we can use it there too AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext) -dnl Propagate the run-time library path variable that the libltdl -dnl checks found to the Makefiles so we can use it there too -AC_SUBST(SHLIBPATH_VAR,$libltdl_cv_shlibpath_var) - dnl Translate the various configuration directories and other basic dnl information into substitutions that will end up in Makefile.config.in dnl that these configured values can be used by the makefiles diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index eaf868801a..26e2a5aed4 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -571,15 +571,6 @@ function(configure_lit_site_cfg input output) set(LLVM_SHARED_LIBS_ENABLED "0") endif(BUILD_SHARED_LIBS) - if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(SHLIBPATH_VAR "DYLD_LIBRARY_PATH") - else() # Default for all other unix like systems. - # CMake hardcodes the library locaction using rpath. - # Therefore LD_LIBRARY_PATH is not required to run binaries in the - # build dir. We pass it anyways. - set(SHLIBPATH_VAR "LD_LIBRARY_PATH") - endif() - # Configuration-time: See Unit/lit.site.cfg.in if (CMAKE_CFG_INTDIR STREQUAL ".") set(LLVM_BUILD_MODE ".") @@ -598,7 +589,6 @@ function(configure_lit_site_cfg input output) set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED}) - set(SHLIBPATH_VAR ${SHLIBPATH_VAR}) if(LLVM_ENABLE_ASSERTIONS AND NOT MSVC_IDE) set(ENABLE_ASSERTIONS "1") diff --git a/configure b/configure index 46d557df21..42362e7da0 100755 --- a/configure +++ b/configure @@ -790,7 +790,6 @@ HAVE_LIBZ HUGE_VAL_SANITY MMAP_FILE SHLIBEXT -SHLIBPATH_VAR LLVM_PREFIX LLVM_BINDIR LLVM_DATADIR @@ -10710,7 +10709,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <conf$$subs.sed <<_ACEOF -LLVM_INCLUDEDIR!$LLVM_INCLUDEDIR$ac_delim LLVM_INFODIR!$LLVM_INFODIR$ac_delim LLVM_MANDIR!$LLVM_MANDIR$ac_delim LLVM_CONFIGTIME!$LLVM_CONFIGTIME$ac_delim @@ -23618,7 +23613,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 13; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/projects/sample/Makefile.llvm.config.in b/projects/sample/Makefile.llvm.config.in index c7df998b26..c448421f31 100644 --- a/projects/sample/Makefile.llvm.config.in +++ b/projects/sample/Makefile.llvm.config.in @@ -262,9 +262,6 @@ ENABLE_TIMESTAMPS := @ENABLE_TIMESTAMPS@ # Enable JIT for this platform TARGET_HAS_JIT = @TARGET_HAS_JIT@ -# Environment variable to set to change the runtime shared library search path. -SHLIBPATH_VAR = @SHLIBPATH_VAR@ - # Shared library extension for host platform. SHLIBEXT = @SHLIBEXT@ diff --git a/projects/sample/autoconf/configure.ac b/projects/sample/autoconf/configure.ac index 03cd214f66..6bbc17e259 100644 --- a/projects/sample/autoconf/configure.ac +++ b/projects/sample/autoconf/configure.ac @@ -1401,10 +1401,6 @@ dnl Propagate the shared library extension that the libltdl checks did to dnl the Makefiles so we can use it there too AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext) -dnl Propagate the run-time library path variable that the libltdl -dnl checks found to the Makefiles so we can use it there too -AC_SUBST(SHLIBPATH_VAR,$libltdl_cv_shlibpath_var) - # Translate the various configuration directories and other basic # information into substitutions that will end up in Makefile.config.in # that these configured values can be used by the makefiles diff --git a/projects/sample/configure b/projects/sample/configure index bc04c9628d..d381223ce0 100755 --- a/projects/sample/configure +++ b/projects/sample/configure @@ -771,7 +771,6 @@ HAVE_LIBZ HUGE_VAL_SANITY MMAP_FILE SHLIBEXT -SHLIBPATH_VAR LLVM_PREFIX LLVM_BINDIR LLVM_DATADIR @@ -10383,7 +10382,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 diff --git a/test/Makefile b/test/Makefile index e90370779c..dc99fe1a2f 100644 --- a/test/Makefile +++ b/test/Makefile @@ -146,7 +146,6 @@ Unit/lit.site.cfg: $(PROJ_OBJ_DIR)/Unit/.dir FORCE @$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> unit.tmp @$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> unit.tmp @$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> unit.tmp - @$(ECHOPATH) s=@SHLIBPATH_VAR@=$(SHLIBPATH_VAR)=g >> unit.tmp @$(ECHOPATH) s=@HOST_OS@=$(HOST_OS)=g >> unit.tmp @$(ECHOPATH) s=@HOST_ARCH@=$(HOST_ARCH)=g >> lit.tmp @sed -f unit.tmp $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@ diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg index 68ba0b36c4..04e8830688 100644 --- a/test/Unit/lit.cfg +++ b/test/Unit/lit.cfg @@ -80,11 +80,3 @@ if config.test_exec_root is None: lit_config.note('using out-of-tree build at %r' % llvm_obj_root) lit_config.load_config(config, site_cfg) raise SystemExit - -# If necessary, point the dynamic loader at libLLVM.so. -if config.enable_shared: - shlibpath = config.environment.get(config.shlibpath_var,'') - if shlibpath: - shlibpath = os.pathsep + shlibpath - shlibpath = config.shlibdir + shlibpath - config.environment[config.shlibpath_var] = shlibpath diff --git a/test/Unit/lit.site.cfg.in b/test/Unit/lit.site.cfg.in index 7ff8155dff..dd8de48951 100644 --- a/test/Unit/lit.site.cfg.in +++ b/test/Unit/lit.site.cfg.in @@ -8,7 +8,6 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" config.llvm_build_mode = "@LLVM_BUILD_MODE@" config.enable_shared = @ENABLE_SHARED@ config.shlibdir = "@SHLIBDIR@" -config.shlibpath_var = "@SHLIBPATH_VAR@" # Support substitution of the tools_dir and build_mode with user parameters. # This is used when we can't determine the tool dir at configuration time. diff --git a/unittests/Makefile.unittest b/unittests/Makefile.unittest index 695bee6d89..a39edc6756 100644 --- a/unittests/Makefile.unittest +++ b/unittests/Makefile.unittest @@ -52,9 +52,6 @@ ifeq ($(ENABLE_SHARED), 1) # we'll never install unittests. LD.Flags += $(RPATH) -Wl,$(SharedLibDir) endif - # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most - # of the time. - Run.Shared := $(SHLIBPATH_VAR)="$(SharedLibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)" endif $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) @@ -67,6 +64,6 @@ $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) all:: $(LLVMUnitTestExe) unitcheck:: $(LLVMUnitTestExe) - $(Run.Shared) $(LLVMUnitTestExe) + $(LLVMUnitTestExe) endif -- cgit v1.2.3