summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-01-10 22:36:12 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-01-10 22:36:12 +0300
commita2cc0447e58c22ba24158c358c5bb9377945ea27 (patch)
tree1a817c4968be35d1bc076a65d4555a6a7237b4fb
parent3ddc2a8b6a50075c9727b77a5fa8c861484572de (diff)
downloadgcc-49-a2cc0447e58c22ba24158c358c5bb9377945ea27.tar.gz
Added debian/patches/illumos-boehm-gc.diff
-rw-r--r--debian/patches/illumos-boehm-gc.diff40
-rw-r--r--debian/rules.patch1
2 files changed, 41 insertions, 0 deletions
diff --git a/debian/patches/illumos-boehm-gc.diff b/debian/patches/illumos-boehm-gc.diff
new file mode 100644
index 0000000..e8ec1f5
--- /dev/null
+++ b/debian/patches/illumos-boehm-gc.diff
@@ -0,0 +1,40 @@
+Description: changes to libgcj.ver fix crashes of programs using boehm-gc.
+ Defining SOLARIS_STACKBOTTOM makes use of a native way to get stack bottom
+ (with thr_stksegment())
+Index: gcc-49/src/boehm-gc/include/private/gcconfig.h
+===================================================================
+--- gcc-49.orig/src/boehm-gc/include/private/gcconfig.h
++++ gcc-49/src/boehm-gc/include/private/gcconfig.h
+@@ -2114,7 +2114,7 @@
+ /* HEURISTIC2 probably works, but this appears to be preferable. */
+ /* # include <sys/vm.h> */
+ /* # define STACKBOTTOM USRSTACK */
+-# define HEURISTIC2
++# define SOLARIS_STACKBOTTOM
+ # define PROC_VDB
+ # define DYNAMIC_LOADING
+ # if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
+Index: gcc-49/src/libjava/libgcj.ver
+===================================================================
+--- gcc-49.orig/src/libjava/libgcj.ver
++++ gcc-49/src/libjava/libgcj.ver
+@@ -9,6 +9,19 @@
+ __gcj_personality_sj0;
+ __gcj_personality_seh0;
+ _Z*;
++
++# https://sourceware.org/ml/binutils/2010-02/msg00457.html
++# Otherwise boehm-gc cannot determine memory borders
++# and Java executables randomly crash
++# GNU ld add these symbols by default, but not in case
++# when version script is specified.
++ _GLOBAL_OFFSET_TABLE_;
++ _etext;
++ _DYNAMIC;
++ _edata;
++ _end;
++ _PROCEDURE_LINKAGE_TABLE_;
++
+ local:
+ *;
+ };
diff --git a/debian/rules.patch b/debian/rules.patch
index 0df23fb..5821a1a 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -317,6 +317,7 @@ ifeq ($(DEB_TARGET_ARCH_OS), illumos)
debian_patches += illumos-pragma-align
debian_patches += illumos-fclone-functions
debian_patches += illumos-strict-calling-conventions
+ debian_patches += illumos-boehm-gc
endif
series_stamp = $(stampdir)/02-series-stamp