зеркало из https://github.com/github/ruby.git
* configure.in (enable_rpath): use rpath flag to embed the library
path into extensions on ELF environment. [ruby-dev:25035] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8c299e6e26
Коммит
a965236490
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Dec 19 17:24:59 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* configure.in (enable_rpath): use rpath flag to embed the library
|
||||||
|
path into extensions on ELF environment. [ruby-dev:25035]
|
||||||
|
|
||||||
Sun Dec 19 11:01:25 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Dec 19 11:01:25 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/test/unit.rb: use standalone runner for -e.
|
* lib/test/unit.rb: use standalone runner for -e.
|
||||||
|
|
49
configure.in
49
configure.in
|
@ -785,14 +785,6 @@ linux* | gnu* | k*bsd*-gnu)
|
||||||
else
|
else
|
||||||
LDFLAGS="$LDFLAGS -rdynamic"
|
LDFLAGS="$LDFLAGS -rdynamic"
|
||||||
fi;;
|
fi;;
|
||||||
netbsd*|openbsd*)
|
|
||||||
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
|
||||||
then
|
|
||||||
netbsd_elf=yes
|
|
||||||
else
|
|
||||||
netbsd_elf=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
LIBEXT=a
|
LIBEXT=a
|
||||||
|
|
||||||
|
@ -860,8 +852,11 @@ if test "$with_dln_a_out" != yes; then
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
osf*) : ${LDSHARED="ld -shared -expect_unresolved \"*\""}
|
osf*) : ${LDSHARED="ld -shared -expect_unresolved \"*\""}
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
linux* | gnu* | k*bsd*-gnu)
|
linux* | gnu* | k*bsd*-gnu | netbsd*)
|
||||||
: ${LDSHARED="$CC -shared"}
|
: ${LDSHARED='${CC} -shared'}
|
||||||
|
if test "$rb_cv_binary_elf" = yes; then
|
||||||
|
LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
|
||||||
|
fi
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
interix*) : ${LDSHARED="$CC -shared"}
|
interix*) : ${LDSHARED="$CC -shared"}
|
||||||
XLDFLAGS="$XLDFLAGS -Wl,-E"
|
XLDFLAGS="$XLDFLAGS -Wl,-E"
|
||||||
|
@ -875,13 +870,6 @@ if test "$with_dln_a_out" != yes; then
|
||||||
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
|
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
|
||||||
fi
|
fi
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
netbsd*) : ${LDSHARED='${CC} -shared'}
|
|
||||||
if test "$rb_cv_binary_elf" = yes; then
|
|
||||||
LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
|
|
||||||
LIBPATHFLAG=" -L'%1\$-s'"
|
|
||||||
RPATHFLAG=" -Wl,-R'%1\$-s'"
|
|
||||||
fi
|
|
||||||
rb_cv_dlopen=yes ;;
|
|
||||||
openbsd*) : ${LDSHARED="\$(CC) -shared ${CCDLFLAGS}"}
|
openbsd*) : ${LDSHARED="\$(CC) -shared ${CCDLFLAGS}"}
|
||||||
if test "$rb_cv_binary_elf" = yes; then
|
if test "$rb_cv_binary_elf" = yes; then
|
||||||
LDFLAGS="$LDFLAGS -Wl,-E"
|
LDFLAGS="$LDFLAGS -Wl,-E"
|
||||||
|
@ -952,6 +940,14 @@ if test "$with_dln_a_out" != yes; then
|
||||||
*) : ${LDSHARED='ld'} ;;
|
*) : ${LDSHARED='ld'} ;;
|
||||||
esac
|
esac
|
||||||
AC_MSG_RESULT($rb_cv_dlopen)
|
AC_MSG_RESULT($rb_cv_dlopen)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(rpath,
|
||||||
|
[ --disable-rpath embedd run path.],
|
||||||
|
[enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"])
|
||||||
|
if test "$enable_rpath" = yes; then
|
||||||
|
LIBPATHFLAG=" -L'%1\$-s'"
|
||||||
|
RPATHFLAG=" -Wl,-R'%1\$-s'"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
AC_SUBST(LINK_SO)
|
AC_SUBST(LINK_SO)
|
||||||
AC_SUBST(LIBPATHFLAG)
|
AC_SUBST(LIBPATHFLAG)
|
||||||
|
@ -1162,7 +1158,7 @@ if test "$enable_shared" = 'yes'; then
|
||||||
sunos4*)
|
sunos4*)
|
||||||
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
|
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
|
||||||
;;
|
;;
|
||||||
linux* | gnu* | k*bsd*-gnu)
|
linux* | gnu* | k*bsd*-gnu | atheos*)
|
||||||
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'
|
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'
|
||||||
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
|
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
|
||||||
;;
|
;;
|
||||||
|
@ -1178,7 +1174,6 @@ if test "$enable_shared" = 'yes'; then
|
||||||
SOLIBS='$(LIBS)'
|
SOLIBS='$(LIBS)'
|
||||||
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
|
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
|
||||||
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
|
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
|
||||||
LIBRUBYARG_SHARED='-Wl,-R -Wl,${libdir} -L${libdir} -L. -l$(RUBY_SO_NAME)'
|
|
||||||
if test "$rb_cv_binary_elf" = yes; then # ELF platforms
|
if test "$rb_cv_binary_elf" = yes; then # ELF platforms
|
||||||
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so'
|
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so'
|
||||||
else # a.out platforms
|
else # a.out platforms
|
||||||
|
@ -1190,6 +1185,14 @@ if test "$enable_shared" = 'yes'; then
|
||||||
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
|
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
|
||||||
;;
|
;;
|
||||||
solaris*)
|
solaris*)
|
||||||
|
SOLIBS='$(LIBS)'
|
||||||
|
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)'
|
||||||
|
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY) lib$(RUBY_SO_NAME).so'
|
||||||
|
if test "$GCC" = yes; then
|
||||||
|
LIBRUBY_DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(@F)'
|
||||||
|
else
|
||||||
|
enable_rpath=no
|
||||||
|
fi
|
||||||
XLDFLAGS="$XLDFLAGS "'-R${libdir}'
|
XLDFLAGS="$XLDFLAGS "'-R${libdir}'
|
||||||
;;
|
;;
|
||||||
hpux*)
|
hpux*)
|
||||||
|
@ -1221,10 +1224,6 @@ if test "$enable_shared" = 'yes'; then
|
||||||
LIBRUBY_DLDFLAGS='-install_name $(libdir)/lib$(RUBY_SO_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)'
|
LIBRUBY_DLDFLAGS='-install_name $(libdir)/lib$(RUBY_SO_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)'
|
||||||
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_SO_NAME).dylib'
|
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_SO_NAME).dylib'
|
||||||
;;
|
;;
|
||||||
atheos*)
|
|
||||||
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'
|
|
||||||
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
|
|
||||||
;;
|
|
||||||
interix*)
|
interix*)
|
||||||
LIBRUBYARG_SHARED='-L${libdir} -L. -l$(RUBY_SO_NAME)'
|
LIBRUBYARG_SHARED='-L${libdir} -L. -l$(RUBY_SO_NAME)'
|
||||||
;;
|
;;
|
||||||
|
@ -1232,6 +1231,10 @@ if test "$enable_shared" = 'yes'; then
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
if test "$enable_rpath" = yes; then
|
||||||
|
LIBRUBYARG_SHARED='-Wl,-R -Wl,$(libdir) -L$(libdir) -L. '"$LIBRUBYARG_SHARED"
|
||||||
|
fi
|
||||||
|
|
||||||
XLDFLAGS="$XLDFLAGS -L."
|
XLDFLAGS="$XLDFLAGS -L."
|
||||||
AC_SUBST(ARCHFILE)
|
AC_SUBST(ARCHFILE)
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче