summary refs log tree commit diff
diff options
context:
space:
mode:
authorGábor Boskovits <boskovits@gmail.com>2018-07-02 11:02:11 +0200
committerGábor Boskovits <boskovits@gmail.com>2018-07-02 14:41:27 +0200
commit1cdff8cdb7b4822bd16fe713bc0b138a01a546aa (patch)
treed51b5b8784c642e3322d237ff6bf8631f43a2624
parent79f9b054dff6fc76073b1b040db9d80881e55f42 (diff)
downloadguix-1cdff8cdb7b4822bd16fe713bc0b138a01a546aa.tar.gz
gnu: icedtea: Work around gcc segfault.
* gnu/packages/java.scm (icedtea-6)[arguments]: Modify phases to extract
hostspot, as after the patching it becomes an archive.
[native-inputs]: add patch to hotspot-src.
* gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Add it.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/java.scm9
-rw-r--r--gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch42
3 files changed, 50 insertions, 2 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 3213e504a7..0776be05ec 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -801,6 +801,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/icecat-CVE-2018-5157-and-CVE-2018-5158.patch	\
   %D%/packages/patches/icecat-use-system-graphite2.patch	\
   %D%/packages/patches/icecat-use-system-harfbuzz.patch		\
+  %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch  \
   %D%/packages/patches/id3lib-CVE-2007-4460.patch			\
   %D%/packages/patches/ilmbase-fix-tests.patch			\
   %D%/packages/patches/intltool-perl-compatibility.patch	\
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f04a3828e6..1b4cc4d3b0 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -684,8 +684,11 @@ machine.")))
                                    (assoc-ref inputs
                                               (string-append part "-src"))
                                    part))
-                                '("jdk" "hotspot" "corba"
+                                '("jdk" "corba"
                                   "langtools" "jaxp" "jaxws")))
+                    (with-directory-excursion "openjdk"
+                      (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
+                      (rename-file "hg-checkout" "hotspot"))
                     (substitute* "Makefile.in"
                       (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
                        "echo \"trust me\";")
@@ -905,7 +908,9 @@ machine.")))
                  (changeset "jdk6-b41")))
            (sha256
             (base32
-             "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
+             "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
+           (patches
+            (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
        ("corba-src"
         ,(origin
            (method hg-fetch)
diff --git a/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch b/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch
new file mode 100644
index 0000000000..ef090e0ec9
--- /dev/null
+++ b/gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch
@@ -0,0 +1,42 @@
+# HG changeset patch
+# User Gábor Boskovits <boskovits@gmail.com>
+# Date 1530519413 -7200
+#      Mon Jul 02 10:16:53 2018 +0200
+# Node ID 77e5bc9e238a28d17e097647badc04ed67a6a452
+# Parent  1ae05a34e052d1672b4a7894ddf5fc2f662eb861
+Fix gcc segfault.
+
+diff -r 1ae05a34e052 -r 77e5bc9e238a src/share/vm/opto/output.cpp
+--- a/src/share/vm/opto/output.cpp	Sun Dec 25 23:52:13 2016 +0000
++++ b/src/share/vm/opto/output.cpp	Mon Jul 02 10:16:53 2018 +0200
+@@ -1758,6 +1758,8 @@
+ 
+ // Initializer for class Scheduling
+ 
++volatile const void *eePointer = Pipeline_Use::elaborated_elements;
++
+ Scheduling::Scheduling(Arena *arena, Compile &compile)
+   : _arena(arena),
+     _cfg(compile.cfg()),
+@@ -1802,8 +1804,8 @@
+ 
+   // Clear the bundling information
+   memcpy(_bundle_use_elements,
+-    Pipeline_Use::elaborated_elements,
+-    sizeof(Pipeline_Use::elaborated_elements));
++	 (void *)eePointer,
++    11*sizeof(Pipeline_Use_Element));
+ 
+   // Get the last node
+   Block *bb = _cfg->_blocks[_cfg->_blocks.size()-1];
+@@ -1854,8 +1856,8 @@
+   _bundle_use.reset();
+ 
+   memcpy(_bundle_use_elements,
+-    Pipeline_Use::elaborated_elements,
+-    sizeof(Pipeline_Use::elaborated_elements));
++	 (void *)eePointer,
++    11*sizeof(Pipeline_Use_Element));
+ }
+ 
+ //------------------------------ScheduleAndBundle------------------------------