ruby-changes:47428
From: usa <ko1@a...>
Date: Wed, 9 Aug 2017 19:29:04 +0900 (JST)
Subject: [ruby-changes:47428] usa:r59544 (ruby_2_3): merge revision(s) 58287: [Backport #13411]
usa 2017-08-09 19:28:56 +0900 (Wed, 09 Aug 2017) New Revision: 59544 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59544 Log: merge revision(s) 58287: [Backport #13411] configure.in: rpath with OPTDIR * configure.in: add rpath flags which is needed for OPTDIR as well as -L options, when it is given. [ruby-dev:50065] [Bug #13411] Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/configure.in branches/ruby_2_3/version.h Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 59543) +++ ruby_2_3/version.h (revision 59544) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.5" #define RUBY_RELEASE_DATE "2017-08-09" -#define RUBY_PATCHLEVEL 354 +#define RUBY_PATCHLEVEL 355 #define RUBY_RELEASE_YEAR 2017 #define RUBY_RELEASE_MONTH 8 Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 59543) +++ ruby_2_3/ChangeLog (revision 59544) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Wed Aug 9 19:28:40 2017 Nobuyoshi Nakada <nobu@r...> + + * configure.in: add rpath flags which is needed for OPTDIR as well + as -L options, when it is given. [Bug #13411] + Wed Aug 9 19:14:07 2017 Nobuyoshi Nakada <nobu@r...> * vm_insnhelper.c (vm_throw_start): size of catch table has been Index: ruby_2_3/configure.in =================================================================== --- ruby_2_3/configure.in (revision 59543) +++ ruby_2_3/configure.in (revision 59544) @@ -787,6 +787,24 @@ AC_DEFUN([RUBY_TRY_LDFLAGS], [ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/configure.in#L787 save_LDFLAGS= ]) +: ${RPATHFLAG=''} +rpathflag='' +AS_IF([test x"${RPATHFLAG}" = x], [ + AS_CASE(["$target_os"], + [hpux*], [AS_IF([test "$rb_cv_prog_gnu_ld" = no], [rpathflag='+b '])], + [aix*], [rpathflag='-blibpath:'], + [for rpathflag in -R "-rpath "; do + AS_CASE("$rpathflag", + [*" "], [AS_CASE(["${linker_flag}"], + [*,], [rpathflag=`echo "$rpathflag" | tr ' ' ,`])]) + rpathflag="${linker_flag}${rpathflag}" + RUBY_TRY_LDFLAGS([${rpathflag}.], [], [rpathflag=]) + AS_IF([test "x${rpathflag}" != x], []) + done]) +], [ + rpathflag=`echo "$RPATHFLAG" | sed 's/%.*//'` +]) + AS_CASE([$RUBY_PATCHLEVEL], [-*], [particular_werror_flags=yes], [particular_werror_flags=no]) AC_ARG_ENABLE(werror, @@ -986,7 +1004,7 @@ AC_ARG_WITH(opt-dir, https://github.com/ruby/ruby/blob/trunk/ruby_2_3/configure.in#L1004 [ val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -I\1/include|g;s/^ //"` CPPFLAGS="$CPPFLAGS $val" - val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -L\1/lib|g;s/^ //"` + val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -L\1/lib${rpathflag:+ $rpathflag\\\\1/lib}|g;s/^ //"` LDFLAGS="$LDFLAGS $val" LDFLAGS_OPTDIR="$val" OPT_DIR="$withval" @@ -3156,7 +3174,6 @@ AC_SUBST(LIBEXT)dnl https://github.com/ruby/ruby/blob/trunk/ruby_2_3/configure.in#L3174 AC_SUBST(ASMEXT, S)dnl STATIC= -: ${PATHFLAG=''} if test "$with_dln_a_out" != yes; then rb_cv_dlopen=unknown @@ -3195,9 +3212,6 @@ if test "$with_dln_a_out" != yes; then https://github.com/ruby/ruby/blob/trunk/ruby_2_3/configure.in#L3212 : ${LDSHARED='$(LD) -b'} XLDFLAGS="$XLDFLAGS -Wl,-E" : ${LIBPATHENV=SHLIB_PATH} - if test "$rb_cv_prog_gnu_ld" = no; then - RPATHFLAG=' +b %1$-s' - fi rb_cv_dlopen=yes], [solaris*], [ if test "$GCC" = yes; then : ${LDSHARED='$(CC) -shared'} @@ -3268,7 +3282,6 @@ if test "$with_dln_a_out" != yes; then https://github.com/ruby/ruby/blob/trunk/ruby_2_3/configure.in#L3282 TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)' TRY_LINK="$TRY_LINK"' $(CFLAGS) $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)' : ${LIBPATHENV=LIBPATH} - RPATHFLAG=" ${linker_flag}-blibpath:%1\$-s:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}" rb_cv_dlopen=yes], [nto-qnx*], [ DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib" : ${LDSHARED='$(LD) -Bshareable -x'} @@ -3304,21 +3317,11 @@ if test "$with_dln_a_out" != yes; then https://github.com/ruby/ruby/blob/trunk/ruby_2_3/configure.in#L3317 ]) fi - if test "$enable_rpath" = yes; then - if test x"${RPATHFLAG}" = x; then - for rpathflag in -R "-rpath "; do - AS_CASE("$rpathflag", - [*" "], [AS_CASE(["${linker_flag}"], - [*,], [rpathflag=`echo "$rpathflag" | tr ' ' ,`])]) - rpathflag="${linker_flag}${rpathflag}" - RUBY_TRY_LDFLAGS([${rpathflag}.], [], [rpathflag=]) - if test "x${rpathflag}" != x; then + AS_IF([test "$enable_rpath:${RPATHFLAG}" = yes:], [ + AS_IF([test "x$rpathflag" != x], [ RPATHFLAG=" ${rpathflag}%1\$-s" - break - fi - done - fi - fi + ]) + ]) fi if test "${LDSHAREDXX}" = ""; then AS_CASE(["${LDSHARED}"], Index: ruby_2_3 =================================================================== --- ruby_2_3 (revision 59543) +++ ruby_2_3 (revision 59544) Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r58287 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/