mirror of
https://git.freebsd.org/ports.git
synced 2025-06-20 04:00:41 -04:00
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
37 lines
1.5 KiB
Text
37 lines
1.5 KiB
Text
--- 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 <stdlib.h>
|
|
-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 <stdlib.h>
|
|
-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
|
|
LDFLAGS="$LDFLAGS -rdynamic"
|
|
- DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$@'
|
|
else
|
|
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED='$(LD) -Bshareable'
|
|
fi
|
|
@@ -3896,6 +3895,8 @@
|
|
[freebsd*|dragonfly*], [
|
|
SOLIBS='$(LIBS)'
|
|
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
|
|
+ RUBY_APPEND_OPTIONS(DLDFLAGS, ['-Wl,-soname,${LIBRUBY_SO}' "$LDFLAGS_OPTDIR"])
|
|
+ RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ['-Wl,-soname,${LIBRUBY_SO}' "$LDFLAGS_OPTDIR"])
|
|
if test "$rb_cv_binary_elf" != "yes" ; then
|
|
LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
|
|
LIBRUBY_ALIASES=''
|