From owner-svn-ports-head@freebsd.org Thu Sep 13 19:26:18 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B622A1096ED2; Thu, 13 Sep 2018 19:26:18 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 613817F4CA; Thu, 13 Sep 2018 19:26:18 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51E0119D3D; Thu, 13 Sep 2018 19:26:18 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8DJQIG4002986; Thu, 13 Sep 2018 19:26:18 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8DJQHXo002983; Thu, 13 Sep 2018 19:26:17 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201809131926.w8DJQHXo002983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 13 Sep 2018 19:26:17 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r479692 - in head/lang: ruby23/files ruby24/files ruby25/files X-SVN-Group: ports-head X-SVN-Commit-Author: ed X-SVN-Commit-Paths: in head/lang: ruby23/files ruby24/files ruby25/files X-SVN-Commit-Revision: 479692 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2018 19:26:19 -0000 Author: ed (src committer) Date: Thu Sep 13 19:26:17 2018 New Revision: 479692 URL: https://svnweb.freebsd.org/changeset/ports/479692 Log: lang/ruby2[345]: Improve qsort_r() detection This change merges the following upstream pull request into the Ruby interpreter ports: https://github.com/ruby/ruby/pull/1954 Adding this patch to these ports will ensure that once we patch up qsort_r() to be compatible with glibc, Ruby will automatically pick them up. Ruby should also build fine without this patch, but this will cause it to use its own implementation, which blows up the binary size slightly. Poudriere runs seem to pass for 11.x amd64. Logs indicate that this doesn't negatively affect the existing qsort_r() detection: checking whether qsort_r is GNU version... no checking whether qsort_r is BSD version... yes PR: 231256 Approved by: sunpoet Differential Revision: https://reviews.freebsd.org/D17157 Modified: head/lang/ruby23/files/patch-configure.in head/lang/ruby24/files/patch-configure.in head/lang/ruby25/files/patch-configure.ac Modified: head/lang/ruby23/files/patch-configure.in ============================================================================== --- head/lang/ruby23/files/patch-configure.in Thu Sep 13 19:20:05 2018 (r479691) +++ head/lang/ruby23/files/patch-configure.in Thu Sep 13 19:26:17 2018 (r479692) @@ -1,6 +1,6 @@ --- configure.in.orig 2017-03-27 17:59:49 UTC +++ configure.in -@@ -621,7 +621,7 @@ AC_DEFUN([RUBY_DTRACE_AVAILABLE], +@@ -633,7 +633,7 @@ [AC_CACHE_CHECK(whether dtrace USDT is available, rb_cv_dtrace_available, [ echo "provider conftest{ probe fire(); };" > conftest_provider.d @@ -9,7 +9,7 @@ AC_TRY_COMPILE([@%:@include "conftest_provider.h"], [CONFTEST_FIRE();], [ # DTrace is available on the system rb_cv_dtrace_available=yes -@@ -645,13 +645,13 @@ AC_DEFUN([RUBY_DTRACE_POSTPROCESS], +@@ -657,13 +657,13 @@ probe fire(); }; _PROBES @@ -25,7 +25,7 @@ : }; then if cmp -s conftest.o conftest.${ac_objext}.save; then -@@ -1260,10 +1260,10 @@ main() +@@ -1290,10 +1290,10 @@ ], [ LIBS="-lm $LIBS"]) @@ -40,7 +40,25 @@ dnl Checks for header files. AC_HEADER_DIRENT -@@ -2513,7 +2513,7 @@ main(int argc, char **argv) +@@ -2450,7 +2450,7 @@ + AC_CACHE_CHECK(whether qsort_r is GNU version, rb_cv_gnu_qsort_r, + [AC_TRY_COMPILE([ + @%:@include +-void qsort_r(void *base, size_t nmemb, size_t size, ++void (qsort_r)(void *base, size_t nmemb, size_t size, + int (*compar)(const void *, const void *, void *), + void *arg); + ],[ ], +@@ -2460,7 +2460,7 @@ + AC_CACHE_CHECK(whether qsort_r is BSD version, rb_cv_bsd_qsort_r, + [AC_TRY_COMPILE([ + @%:@include +-void qsort_r(void *base, size_t nmemb, size_t size, ++void (qsort_r)(void *base, size_t nmemb, size_t size, + void *arg, int (*compar)(void *, const void *, const void *)); + ],[ ], + [rb_cv_bsd_qsort_r=yes], +@@ -2549,7 +2549,7 @@ if test x"$ac_cv_func_clock_gettime" != xyes; then # glibc 2.17 moves clock_* functions from librt to the main C library. # http://sourceware.org/ml/libc-announce/2012/msg00001.html @@ -49,7 +67,7 @@ if test x"$ac_cv_lib_rt_clock_gettime" = xyes; then AC_DEFINE(HAVE_CLOCK_GETTIME, 1) fi -@@ -2920,7 +2920,7 @@ else +@@ -2956,7 +2956,7 @@ fi if test x"$enable_pthread" = xyes; then @@ -58,7 +76,7 @@ AC_CHECK_LIB($pthread_lib, pthread_kill, rb_with_pthread=yes, rb_with_pthread=no) if test "$rb_with_pthread" = "yes"; then break; fi -@@ -2934,6 +2934,7 @@ if test x"$enable_pthread" = xyes; then +@@ -2970,6 +2970,7 @@ [c], [], [root], [], [c_r], [MAINLIBS="-pthread $MAINLIBS"], @@ -66,7 +84,7 @@ [AS_CASE(["$target_os"], [openbsd*|mirbsd*], [LIBS="-pthread $LIBS"], [LIBS="-l$pthread_lib $LIBS"])]) -@@ -3246,7 +3247,6 @@ if test "$with_dln_a_out" != yes; then +@@ -3278,7 +3279,6 @@ : ${LDSHARED='$(CC) -shared'} if test "$rb_cv_binary_elf" = yes; then LDFLAGS="$LDFLAGS -rdynamic" @@ -74,7 +92,7 @@ else test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED='$(LD) -Bshareable' fi -@@ -3730,6 +3730,7 @@ AS_CASE("$enable_shared", [yes], [ +@@ -3751,6 +3751,7 @@ [freebsd*|dragonfly*], [ SOLIBS='$(LIBS)' LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)' Modified: head/lang/ruby24/files/patch-configure.in ============================================================================== --- head/lang/ruby24/files/patch-configure.in Thu Sep 13 19:20:05 2018 (r479691) +++ head/lang/ruby24/files/patch-configure.in Thu Sep 13 19:26:17 2018 (r479692) @@ -1,5 +1,23 @@ --- configure.in.orig 2018-03-02 20:59:11.000000000 +0800 +++ configure.in 2018-07-19 14:22:04.753721000 +0800 +@@ -2573,7 +2573,7 @@ + AC_CACHE_CHECK(whether qsort_r is GNU version, rb_cv_gnu_qsort_r, + [AC_TRY_COMPILE([ + @%:@include +-void qsort_r(void *base, size_t nmemb, size_t size, ++void (qsort_r)(void *base, size_t nmemb, size_t size, + int (*compar)(const void *, const void *, void *), + void *arg); + ],[ ], +@@ -2583,7 +2583,7 @@ + AC_CACHE_CHECK(whether qsort_r is BSD version, rb_cv_bsd_qsort_r, + [AC_TRY_COMPILE([ + @%:@include +-void qsort_r(void *base, size_t nmemb, size_t size, ++void (qsort_r)(void *base, size_t nmemb, size_t size, + void *arg, int (*compar)(void *, const void *, const void *)); + ],[ ], + [rb_cv_bsd_qsort_r=yes], @@ -3423,7 +3423,6 @@ : ${LDSHARED='$(CC) -shared'} if test "$rb_cv_binary_elf" = yes; then Modified: head/lang/ruby25/files/patch-configure.ac ============================================================================== --- head/lang/ruby25/files/patch-configure.ac Thu Sep 13 19:20:05 2018 (r479691) +++ head/lang/ruby25/files/patch-configure.ac Thu Sep 13 19:26:17 2018 (r479692) @@ -1,5 +1,23 @@ --- configure.ac.orig 2018-01-04 02:12:16.000000000 +0800 +++ configure.ac 2018-07-19 14:45:11.636321000 +0800 +@@ -2482,7 +2482,7 @@ + AC_CACHE_CHECK(whether qsort_r is GNU version, rb_cv_gnu_qsort_r, + [AC_TRY_COMPILE([ + @%:@include +-void qsort_r(void *base, size_t nmemb, size_t size, ++void (qsort_r)(void *base, size_t nmemb, size_t size, + int (*compar)(const void *, const void *, void *), + void *arg); + ],[ ], +@@ -2492,7 +2492,7 @@ + AC_CACHE_CHECK(whether qsort_r is BSD version, rb_cv_bsd_qsort_r, + [AC_TRY_COMPILE([ + @%:@include +-void qsort_r(void *base, size_t nmemb, size_t size, ++void (qsort_r)(void *base, size_t nmemb, size_t size, + void *arg, int (*compar)(void *, const void *, const void *)); + ],[ ], + [rb_cv_bsd_qsort_r=yes], @@ -3245,7 +3245,6 @@ : ${LDSHARED='$(CC) -shared'} AS_IF([test "$rb_cv_binary_elf" = yes], [