[llvm-commits] [llvm] r65927 - in /llvm/trunk: Makefile.config.in Makefile.rules autoconf/configure.ac

Nick Lewycky nicholas at mxc.ca
Mon Mar 2 20:55:15 PST 2009


Author: nicholas
Date: Mon Mar  2 22:55:15 2009
New Revision: 65927

URL: http://llvm.org/viewvc/llvm-project?rev=65927&view=rev
Log:
Switch to using -Wl,-R on Solaris.

Modified:
    llvm/trunk/Makefile.config.in
    llvm/trunk/Makefile.rules
    llvm/trunk/autoconf/configure.ac

Modified: llvm/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=65927&r1=65926&r2=65927&view=diff

==============================================================================
--- llvm/trunk/Makefile.config.in (original)
+++ llvm/trunk/Makefile.config.in Mon Mar  2 22:55:15 2009
@@ -200,6 +200,9 @@
 # object files.
 OBJ_ROOT := .
 
+# What to pass as rpath flag to g++
+RPATH := @RPATH@
+
 # These are options that can either be enabled here, or can be enabled on the
 # make command line (ie, make ENABLE_PROFILING=1):
 

Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=65927&r1=65926&r2=65927&view=diff

==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Mon Mar  2 22:55:15 2009
@@ -428,7 +428,7 @@
 endif
 
 ifdef SHARED_LIBRARY
-  LD.Flags += -Wl,-rpath -Wl,$(LibDir)
+  LD.Flags += $(RPATH) -Wl,$(LibDir)
 endif
 
 ifdef TOOL_VERBOSE
@@ -458,9 +458,9 @@
 ifneq ($(OS),Darwin)
 ifdef TOOLNAME
 ifdef EXAMPLE_TOOL
-  LD.Flags += -Wl,-rpath -Wl,$(ExmplDir) -export-dynamic
+  LD.Flags += $(RPATH) -Wl,$(ExmplDir) -export-dynamic
 else
-  LD.Flags += -Wl,-rpath -Wl,$(ToolDir) -export-dynamic
+  LD.Flags += $(RPATH) -Wl,$(ToolDir) -export-dynamic
 endif
 endif
 endif

Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=65927&r1=65926&r2=65927&view=diff

==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Mon Mar  2 22:55:15 2009
@@ -1016,6 +1016,13 @@
 dnl Determine if the compiler supports -fvisibility-inlines-hidden.
 AC_CXX_USE_VISIBILITY_INLINES_HIDDEN
 
+dnl Determine linker rpath flag
+case $llvm_cv_os_type in
+  SunOS) RPATH="-Wl,-R" ;;
+  *) RPATH="-Wl,-rpath" ;;
+esac
+AC_SUBST(RPATH)
+
 dnl===-----------------------------------------------------------------------===
 dnl===
 dnl=== SECTION 10: Specify the output files and generate it





More information about the llvm-commits mailing list