summaryrefslogtreecommitdiff
path: root/dev-libs/boehm-gc/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/boehm-gc/files
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/boehm-gc/files')
-rw-r--r--dev-libs/boehm-gc/files/boehm-gc-6.5-gentoo.patch83
-rw-r--r--dev-libs/boehm-gc/files/boehm-gc-7.2d-automake-1.13.patch13
-rw-r--r--dev-libs/boehm-gc/files/boehm-gc-7.2d-configure.patch33
-rw-r--r--dev-libs/boehm-gc/files/boehm-gc-7.2e-automake-1.13.patch13
-rw-r--r--dev-libs/boehm-gc/files/gc6.6-builtin-backtrace-uclibc.patch13
5 files changed, 155 insertions, 0 deletions
diff --git a/dev-libs/boehm-gc/files/boehm-gc-6.5-gentoo.patch b/dev-libs/boehm-gc/files/boehm-gc-6.5-gentoo.patch
new file mode 100644
index 000000000000..72eb881eef7d
--- /dev/null
+++ b/dev-libs/boehm-gc/files/boehm-gc-6.5-gentoo.patch
@@ -0,0 +1,83 @@
+diff -ur gc6.5.orig/include/private/gcconfig.h gc6.5/include/private/gcconfig.h
+--- gc6.5.orig/include/private/gcconfig.h 2005-08-05 00:03:00.000000000 +0200
++++ gc6.5/include/private/gcconfig.h 2005-08-05 00:08:42.000000000 +0200
+@@ -1100,6 +1100,9 @@
+ # endif
+ # define OS_TYPE "LINUX"
+ # define LINUX_STACKBOTTOM
++ /* On I386 Linux, enable HEURISTIC2 as a backup to /proc data */
++ /* for the case where /proc is missing or nobbled (grsec) */
++# define HEURISTIC2
+ # if 0
+ # define HEURISTIC1
+ # undef STACK_GRAN
+@@ -1901,6 +1904,9 @@
+ # ifdef LINUX
+ # define OS_TYPE "LINUX"
+ # define LINUX_STACKBOTTOM
++ /* On x86_64 Linux, enable HEURISTIC2 as a backup to /proc data */
++ /* for the case where /proc is missing or nobbled (grsec) */
++# define HEURISTIC2
+ # if !defined(GC_LINUX_THREADS) || !defined(REDIRECT_MALLOC)
+ # define MPROTECT_VDB
+ # else
+diff -ur gc6.5.orig/os_dep.c gc6.5/os_dep.c
+--- gc6.5.orig/os_dep.c 2005-08-05 00:03:00.000000000 +0200
++++ gc6.5/os_dep.c 2005-08-05 00:07:56.000000000 +0200
+@@ -967,7 +967,13 @@
+ # endif
+ f = open("/proc/self/stat", O_RDONLY);
+ if (f < 0 || STAT_READ(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) {
++ /* if /proc/self/stat isn't available, and HEURISTIC2 is possible, */
++ /* return NULL so that HEURISTIC2 will be tried. Otherwise bail. */
++# ifdef HEURISTIC2
++ return (ptr_t)NULL;
++# else
+ ABORT("Couldn't read /proc/self/stat");
++# endif
+ }
+ c = stat_buf[buf_offset++];
+ /* Skip the required number of fields. This number is hopefully */
+@@ -983,7 +989,16 @@
+ c = stat_buf[buf_offset++];
+ }
+ close(f);
+- if (result < 0x10000000) ABORT("Absurd stack bottom value");
++ if (result < 0x10000000) {
++ /* if stack base result is silly (e.g. is 0 due to grsec), and */
++ /* HEURISTIC2 is enabled, return NULL so that HEURISTIC2 will be */
++ /* tried. Otherwise bail. */
++# ifdef HEURISTIC2
++ return (ptr_t)NULL;
++# else
++ ABORT("Absurd stack bottom value");
++# endif
++ }
+ return (ptr_t)result;
+ }
+
+@@ -1045,6 +1060,12 @@
+ result = GC_freebsd_stack_base();
+ # endif
+ # ifdef HEURISTIC2
++/* if both LINUX_STACKBOTTOM and HEURISTIC2 are enabled, try HEURISTIC2 */
++/* when the LINUX_STACKBOTTOM returns NULL (indicating failure to get */
++/* a sensible result from /proc/self/stat) */
++# ifdef LINUX_STACKBOTTOM
++ if (result == (ptr_t)NULL) {
++# endif
+ # ifdef STACK_GROWS_DOWN
+ result = GC_find_limit((ptr_t)(&dummy), TRUE);
+ # ifdef HEURISTIC2_LIMIT
+@@ -1062,6 +1083,11 @@
+ }
+ # endif
+ # endif
++/* tail of extra 'if' condition when both LINUX_STACKBOTTOM and */
++/* HEURISTIC are configured. */
++# ifdef LINUX_STACKBOTTOM
++ }
++# endif
+
+ # endif /* HEURISTIC2 */
+ # ifdef STACK_GROWS_DOWN
diff --git a/dev-libs/boehm-gc/files/boehm-gc-7.2d-automake-1.13.patch b/dev-libs/boehm-gc/files/boehm-gc-7.2d-automake-1.13.patch
new file mode 100644
index 000000000000..e987c42a5852
--- /dev/null
+++ b/dev-libs/boehm-gc/files/boehm-gc-7.2d-automake-1.13.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index ee6693d..d258252 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,7 +26,7 @@ AC_PREREQ(2.64)
+ AC_REVISION($Revision: 1.1 $)
+ GC_SET_VERSION
+ AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc])
+-AM_CONFIG_HEADER([include/private/config.h])
++AC_CONFIG_HEADER([include/private/config.h])
+ AM_MAINTAINER_MODE
+
+ AC_SUBST(PACKAGE)
diff --git a/dev-libs/boehm-gc/files/boehm-gc-7.2d-configure.patch b/dev-libs/boehm-gc/files/boehm-gc-7.2d-configure.patch
new file mode 100644
index 000000000000..fdada4394cc4
--- /dev/null
+++ b/dev-libs/boehm-gc/files/boehm-gc-7.2d-configure.patch
@@ -0,0 +1,33 @@
+diff --git a/configure.ac b/configure.ac
+index ee6693d..45300c0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -337,7 +337,7 @@ if test $compiler_xlc = yes -a "$powerpc_darwin" = true; then
+ AC_DEFINE([DARWIN_DONT_PARSE_STACK], 1, [See doc/README.macros.])
+ fi
+
+-if test "$GCC" == yes; then
++if test "$GCC" = yes; then
+ # Disable aliasing optimization unless forced to.
+ AC_MSG_CHECKING([whether gcc supports -fno-strict-aliasing])
+ ac_cv_fno_strict_aliasing=no
+@@ -442,8 +442,8 @@ esac
+ AC_MSG_RESULT($enable_shared)
+
+ # Compile with GC_DLL defined unless building static libraries.
+-if test "${enable_shared}" == yes; then
+- if test "${enable_static}" == no; then
++if test "${enable_shared}" = yes; then
++ if test "${enable_static}" = no; then
+ AC_DEFINE(GC_DLL)
+ # FIXME: Also pass -fvisibility=hidden option if GCC v4+ and not Win32.
+ fi
+@@ -707,7 +707,7 @@ if test -n "${with_cross_host}"; then
+ [Define to tune the collector for small heap sizes.])
+ fi
+
+-if test "$enable_gc_debug" == "no"; then
++if test "$enable_gc_debug" = "no"; then
+ AC_DEFINE([NO_DEBUGGING], 1,
+ [Disable debugging, like GC_dump and its callees.])
+ fi
diff --git a/dev-libs/boehm-gc/files/boehm-gc-7.2e-automake-1.13.patch b/dev-libs/boehm-gc/files/boehm-gc-7.2e-automake-1.13.patch
new file mode 100644
index 000000000000..e987c42a5852
--- /dev/null
+++ b/dev-libs/boehm-gc/files/boehm-gc-7.2e-automake-1.13.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index ee6693d..d258252 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,7 +26,7 @@ AC_PREREQ(2.64)
+ AC_REVISION($Revision: 1.1 $)
+ GC_SET_VERSION
+ AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc])
+-AM_CONFIG_HEADER([include/private/config.h])
++AC_CONFIG_HEADER([include/private/config.h])
+ AM_MAINTAINER_MODE
+
+ AC_SUBST(PACKAGE)
diff --git a/dev-libs/boehm-gc/files/gc6.6-builtin-backtrace-uclibc.patch b/dev-libs/boehm-gc/files/gc6.6-builtin-backtrace-uclibc.patch
new file mode 100644
index 000000000000..1d3e5780e74d
--- /dev/null
+++ b/dev-libs/boehm-gc/files/gc6.6-builtin-backtrace-uclibc.patch
@@ -0,0 +1,13 @@
+--- include/gc.h 2006-02-25 15:49:52 +0000
++++ include/gc.h 2006-02-25 15:50:00 +0000
+@@ -473,7 +473,9 @@
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+ && !defined(__ia64__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+-# define GC_HAVE_BUILTIN_BACKTRACE
++# ifndef __UCLIBC__
++# define GC_HAVE_BUILTIN_BACKTRACE
++# endif
+ # endif
+ # endif
+ # if defined(__i386__) || defined(__x86_64__)