Skip to content

Commit

Permalink
Switch to using -Wl,-R on Solaris.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65927 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
nlewycky committed Mar 3, 2009
1 parent 1c08c0e commit 1dace48
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Makefile.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ LLVMGCC_LANGS := @LLVMGCC_LANGS@
# 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):

Expand Down
6 changes: 3 additions & 3 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ ifdef LOADABLE_MODULE
endif

ifdef SHARED_LIBRARY
LD.Flags += -Wl,-rpath -Wl,$(LibDir)
LD.Flags += $(RPATH) -Wl,$(LibDir)
endif

ifdef TOOL_VERBOSE
Expand Down Expand Up @@ -458,9 +458,9 @@ endif
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
Expand Down
7 changes: 7 additions & 0 deletions autoconf/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,13 @@ fi
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
Expand Down

0 comments on commit 1dace48

Please sign in to comment.