From b38c8dc195b63f87783971991afa1210f6d1252d Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Thu, 13 Sep 2018 19:26:17 +0000 Subject: 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 --- lang/ruby25/files/patch-configure.ac | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lang/ruby25/files/patch-configure.ac') diff --git a/lang/ruby25/files/patch-configure.ac b/lang/ruby25/files/patch-configure.ac index e16888525232..747a706e6fd9 100644 --- a/lang/ruby25/files/patch-configure.ac +++ b/lang/ruby25/files/patch-configure.ac @@ -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], [ -- cgit v1.2.3