summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--patchsets/patches-1.9.1_p429/003_mkmf-parallel-install.patch22
-rw-r--r--patchsets/patches-1.9.1_p429/004_gfbsd7.patch39
-rw-r--r--patchsets/patches-1.9.1_p429/005_no-undefined-ext.patch13
-rw-r--r--patchsets/patches-1.9.1_p429/006_revert-r25539.patch38
-rw-r--r--patchsets/patches-1.9.1_p429/102_dl-parallelmake.patch14
-rw-r--r--patchsets/patches-1.9.1_p429/series5
6 files changed, 131 insertions, 0 deletions
diff --git a/patchsets/patches-1.9.1_p429/003_mkmf-parallel-install.patch b/patchsets/patches-1.9.1_p429/003_mkmf-parallel-install.patch
new file mode 100644
index 0000000..1977f13
--- /dev/null
+++ b/patchsets/patches-1.9.1_p429/003_mkmf-parallel-install.patch
@@ -0,0 +1,22 @@
+Fixing parallel make, bug 279825. Patch by <flameeyes@gentoo.org>
+
+Index: ruby-1.9.1-p429/lib/mkmf.rb
+===================================================================
+--- ruby-1.9.1-p429.orig/lib/mkmf.rb
++++ ruby-1.9.1-p429/lib/mkmf.rb
+@@ -1683,6 +1683,7 @@ static: $(STATIC_LIB)#{$extout ? " insta
+ mfile.print "\t@-$(RMDIRS) #{fseprepl[dir]}\n"
+ else
+ mfile.print "#{dest}: #{f}\n"
++ mfile.print "\t@$(MAKEDIRS) #{dir}\n"
+ mfile.print "\t$(INSTALL_PROG) #{fseprepl[f]} #{fseprepl[dir]}\n"
+ if defined?($installed_list)
+ mfile.print "\t@echo #{dir}/#{File.basename(f)}>>$(INSTALLED_LIST)\n"
+@@ -1706,6 +1707,7 @@ static: $(STATIC_LIB)#{$extout ? " insta
+ dest = "#{dir}/#{File.basename(f)}"
+ mfile.print("install-rb#{sfx}: #{dest}\n")
+ mfile.print("#{dest}: #{f}\n")
++ mfile.print "\t@$(MAKEDIRS) #{dir}\n"
+ mfile.print("\t$(#{$extout ? 'COPY' : 'INSTALL_DATA'}) ")
+ mfile.print("#{fseprepl[f]} $(@D#{sep})\n")
+ if defined?($installed_list) and !$extout
diff --git a/patchsets/patches-1.9.1_p429/004_gfbsd7.patch b/patchsets/patches-1.9.1_p429/004_gfbsd7.patch
new file mode 100644
index 0000000..802db62
--- /dev/null
+++ b/patchsets/patches-1.9.1_p429/004_gfbsd7.patch
@@ -0,0 +1,39 @@
+Index: ruby-1.9.1-p429/configure.in
+===================================================================
+--- ruby-1.9.1-p429.orig/configure.in
++++ ruby-1.9.1-p429/configure.in
+@@ -1299,7 +1299,7 @@ if test "$rb_cv_binary_elf" = yes; then
+ fi
+
+ case "$target_os" in
+-linux* | gnu* | k*bsd*-gnu | bsdi*)
++linux* | gnu* | k*bsd*-gnu | bsdi* | freebsd* | dragonfly* )
+ if test "$rb_cv_binary_elf" = no; then
+ with_dln_a_out=yes
+ else
+@@ -1386,7 +1386,7 @@ if test "$with_dln_a_out" != yes; then
+ *shlicc*) : ${LDSHARED="$CC -r"}
+ rb_cv_dlopen=yes ;;
+ esac ;;
+- linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi*)
++ linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | freebsd7*)
+ : ${LDSHARED='${CC} -shared'}
+ if test "$rb_cv_binary_elf" = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+@@ -1398,7 +1398,6 @@ if test "$with_dln_a_out" != yes; then
+ rb_cv_dlopen=yes ;;
+ freebsd*|dragonfly*) : ${LDSHARED="$CC -shared"}
+ if test "$rb_cv_binary_elf" = yes; then
+- LDFLAGS="$LDFLAGS -rdynamic"
+ DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
+ else
+ test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
+@@ -1727,7 +1726,7 @@ if test "$enable_shared" = 'yes'; then
+ sunos4*)
+ LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
+ ;;
+- linux* | gnu* | k*bsd*-gnu | atheos*)
++ linux* | gnu* | k*bsd*-gnu | atheos* | freebsd7* )
+ LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'
+ LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
+ ;;
diff --git a/patchsets/patches-1.9.1_p429/005_no-undefined-ext.patch b/patchsets/patches-1.9.1_p429/005_no-undefined-ext.patch
new file mode 100644
index 0000000..15a1806
--- /dev/null
+++ b/patchsets/patches-1.9.1_p429/005_no-undefined-ext.patch
@@ -0,0 +1,13 @@
+Index: ruby-1.9.1-p429/configure.in
+===================================================================
+--- ruby-1.9.1-p429.orig/configure.in
++++ ruby-1.9.1-p429/configure.in
+@@ -1389,7 +1389,7 @@ if test "$with_dln_a_out" != yes; then
+ linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | freebsd7*)
+ : ${LDSHARED='${CC} -shared'}
+ if test "$rb_cv_binary_elf" = yes; then
+- LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined"
+ fi
+ rb_cv_dlopen=yes ;;
+ interix*) : ${LDSHARED="$CC -shared"}
diff --git a/patchsets/patches-1.9.1_p429/006_revert-r25539.patch b/patchsets/patches-1.9.1_p429/006_revert-r25539.patch
new file mode 100644
index 0000000..26c7d30
--- /dev/null
+++ b/patchsets/patches-1.9.1_p429/006_revert-r25539.patch
@@ -0,0 +1,38 @@
+Reverting revision 25539 which causes random segfaults related to
+threading.
+
+Reported upstream as http://redmine.ruby-lang.org/issues/show/2558
+
+Index: ruby-1.9.1-p429/thread.c
+===================================================================
+--- ruby-1.9.1-p429.orig/thread.c
++++ ruby-1.9.1-p429/thread.c
+@@ -298,9 +298,6 @@ rb_thread_terminate_all(void)
+ {
+ rb_thread_t *th = GET_THREAD(); /* main thread */
+ rb_vm_t *vm = th->vm;
+- VALUE einfo = vm->main_thread->errinfo;
+- int state;
+-
+ if (vm->main_thread != th) {
+ rb_bug("rb_thread_terminate_all: called by child thread (%p, %p)",
+ (void *)vm->main_thread, (void *)th);
+@@ -316,14 +313,13 @@ rb_thread_terminate_all(void)
+
+ while (!rb_thread_alone()) {
+ PUSH_TAG();
+- if ((state = EXEC_TAG()) == 0) {
++ if (EXEC_TAG() == 0) {
+ rb_thread_schedule();
+ }
+- POP_TAG();
+- if (state && einfo != vm->main_thread->errinfo &&
+- RUBY_VM_SET_INTERRUPT(vm->main_thread)) {
+- break;
++ else {
++ /* ignore exception */
+ }
++ POP_TAG();
+ }
+ rb_thread_stop_timer_thread();
+ }
diff --git a/patchsets/patches-1.9.1_p429/102_dl-parallelmake.patch b/patchsets/patches-1.9.1_p429/102_dl-parallelmake.patch
new file mode 100644
index 0000000..60f08d7
--- /dev/null
+++ b/patchsets/patches-1.9.1_p429/102_dl-parallelmake.patch
@@ -0,0 +1,14 @@
+Index: ruby-1.9.1-p129/ext/dl/depend
+===================================================================
+--- ruby-1.9.1-p129.orig/ext/dl/depend
++++ ruby-1.9.1-p129/ext/dl/depend
+@@ -18,7 +18,8 @@ callback-8.o: callback-8.c $(hdrdir)/rub
+
+ callback-0.c callback-1.c callback-2.c \
+ callback-3.c callback-4.c callback-5.c \
+-callback-6.c callback-7.c callback-8.c \
++callback-6.c callback-7.c callback-8.c: callback.h
++
+ callback.h: $(srcdir)/mkcallback.rb dl.h
+ @echo "generating callback.h"
+ @$(RUBY) $(srcdir)/mkcallback.rb $(srcdir)/dl.h
diff --git a/patchsets/patches-1.9.1_p429/series b/patchsets/patches-1.9.1_p429/series
new file mode 100644
index 0000000..b57a860
--- /dev/null
+++ b/patchsets/patches-1.9.1_p429/series
@@ -0,0 +1,5 @@
+003_mkmf-parallel-install.patch
+004_gfbsd7.patch
+005_no-undefined-ext.patch
+006_revert-r25539.patch
+102_dl-parallelmake.patch