ruby-changes:55486
From: svn <ko1@a...>
Date: Tue, 23 Apr 2019 14:14:47 +0900 (JST)
Subject: [ruby-changes:55486] svn:1306ae8a46 (ruby_1_9_1): * 2011-08-25
svn 2011-08-25 06:27:18 +0900 (Thu, 25 Aug 2011) New Revision: 1306ae8a46 https://git.ruby-lang.org/ruby.git/commit/?id=1306ae8a46 Log: * 2011-08-25 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@33056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Modified files: version.h Index: ruby_1_6/configure.in =================================================================== --- ruby_1_6/configure.in (revision 1305) +++ ruby_1_6/configure.in (revision 1306) @@ -169,6 +169,14 @@ if test "$rb_cv_have_attr_noreturn" = ye https://github.com/ruby/ruby/blob/trunk/ruby_1_6/configure.in#L169 AC_DEFINE(HAVE_ATTR_NORETURN) fi +dnl wheather link libc_r or not +AC_ARG_WITH(libc_r, + [--with-libc_r link libc_r if possible (FreeBSD only)], [ + case $withval in + yes) with_libc_r=yes;; + *) with_libc_r=no;; + esac], [with_libc_r=yes]) + dnl Checks for libraries. case "$target_os" in nextstep*) ;; @@ -208,6 +216,25 @@ freebsd*) LIBS="-lm $LIBS" https://github.com/ruby/ruby/blob/trunk/ruby_1_6/configure.in#L216 if test "$rb_cv_lib_xpg4_needed" = yes; then AC_CHECK_LIB(xpg4, setlocale) fi + if test "$with_libc_r" = yes; then + AC_CACHE_CHECK([whether libc_r is supplementary to libc], + rb_cv_supplementary_lib_c_r, + [AC_TRY_CPP([ +#include <osreldate.h> +#if 500016 <= __FreeBSD_version +#error libc_r is supplementary to libc +#endif + ], + rb_cv_supplementary_lib_c_r=no, + rb_cv_supplementary_lib_c_r=yes, + rb_cv_supplementary_lib_c_r=yes)]) + if test "$rb_cv_supplementary_lib_c_r" = yes; then + MAINLIBS="-lc_r $MAINLIBS" + else + MAINLIBS="-pthread $MAINLIBS" + CFLAGS="-D_THREAD_SAFE $CFLAGS" + fi + fi ;; *) LIBS="-lm $LIBS";; esac @@ -389,7 +416,7 @@ AC_ARG_WITH(default-kcode, https://github.com/ruby/ruby/blob/trunk/ruby_1_6/configure.in#L416 esac]) AC_DEFINE_UNQUOTED(DEFAULT_KCODE, $DEFAULT_KCODE) -dnl wheather use dln_a_out ot not +dnl wheather use dln_a_out or not AC_ARG_WITH(dln-a-out, [--with-dln-a-out use dln_a_out if possible], [ case $withval in @@ -910,6 +937,7 @@ AC_SUBST(LIBRUBYARG) https://github.com/ruby/ruby/blob/trunk/ruby_1_6/configure.in#L937 AC_SUBST(SOLIBS) AC_SUBST(DLDLIBS) AC_SUBST(ENABLE_SHARED) +AC_SUBST(MAINLIBS) ri_prefix= test "$program_prefix" != NONE && Index: ruby_1_6/ChangeLog =================================================================== --- ruby_1_6/ChangeLog (revision 1305) +++ ruby_1_6/ChangeLog (revision 1306) @@ -1,3 +1,15 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_6/ChangeLog#L1 +Tue Apr 3 15:29:10 2001 Akinori MUSHA <knu@i...> + + * Makefile.in: Introduce MAINLIBS. + + * configure.in: Link libc_r against the ruby executable on + FreeBSD, which is the first attempt to work around a certain + problem regarding pthread on FreeBSD. It should make ruby/libruby + happy when it loads an extention to a library compiled and linked + with -pthread. Note, however, that libruby is _not_ linked with + libc_r so as not to mess up pthread unfriendly stuff including + apache+mod_ruby and vim6+ruby_interp. + Tue Apr 3 09:56:20 2001 WATANABE Hirofumi <eban@r...> * ext/extmk.rb.in (create_makefile): create def file only if Index: ruby_1_6/Makefile.in =================================================================== --- ruby_1_6/Makefile.in (revision 1305) +++ ruby_1_6/Makefile.in (revision 1306) @@ -22,6 +22,7 @@ MISSING = @LIBOBJS@ @ALLOCA@ https://github.com/ruby/ruby/blob/trunk/ruby_1_6/Makefile.in#L22 LDSHARED = @LIBRUBY_LDSHARED@ DLDFLAGS = @LIBRUBY_DLDFLAGS@ SOLIBS = @SOLIBS@ +MAINLIBS = @MAINLIBS@ RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@ RUBY_SO_NAME=@RUBY_SO_NAME@ @@ -91,7 +92,7 @@ miniruby$(EXEEXT): config.status $(LIBRU https://github.com/ruby/ruby/blob/trunk/ruby_1_6/Makefile.in#L92 $(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(EXTOBJS) @rm -f $@ - $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@ + $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@ $(LIBRUBY_A): $(OBJS) dmyext.@OBJEXT@ @AR@ rcu $@ $(OBJS) dmyext.@OBJEXT@ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/